You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

Section.java 2.3KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. /*
  2. * Copyright 2000-2014 Vaadin Ltd.
  3. *
  4. * Licensed under the Apache License, Version 2.0 (the "License"); you may not
  5. * use this file except in compliance with the License. You may obtain a copy of
  6. * the License at
  7. *
  8. * http://www.apache.org/licenses/LICENSE-2.0
  9. *
  10. * Unless required by applicable law or agreed to in writing, software
  11. * distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
  12. * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
  13. * License for the specific language governing permissions and limitations under
  14. * the License.
  15. */
  16. package com.vaadin.client.debug.internal;
  17. import com.google.gwt.user.client.ui.Widget;
  18. import com.vaadin.client.ApplicationConnection;
  19. import com.vaadin.client.ValueMap;
  20. /**
  21. * A Section is displayed as a tab in the {@link VDebugWindow}.
  22. *
  23. * @since 7.1
  24. * @author Vaadin Ltd
  25. */
  26. public interface Section {
  27. /**
  28. * Returns a button that will be used to activate this section, displayed as
  29. * a tab in {@link VDebugWindow}.
  30. * <p>
  31. * <em>The same instance <b>must</b> be returned each time this method is called.</em>
  32. * </p>
  33. * <p>
  34. * The button should preferably only have an icon (no caption), and should
  35. * have a longer description as title (tooltip).
  36. * </p>
  37. *
  38. * @return section id
  39. */
  40. public DebugButton getTabButton();
  41. /**
  42. * Returns a widget that is placed on top of the Section content when the
  43. * Section (tab) is active in the {@link VDebugWindow}.
  44. *
  45. * @return section controls
  46. */
  47. public Widget getControls();
  48. /**
  49. * Returns a widget that is the main content of the section, displayed when
  50. * the section is active in the {@link VDebugWindow}.
  51. *
  52. * @return
  53. */
  54. public Widget getContent();
  55. /**
  56. * Called when the section is activated in {@link VDebugWindow}. Provides an
  57. * opportunity to e.g start timers, add listeners etc.
  58. */
  59. public void show();
  60. /**
  61. * Called when the section is deactivated in {@link VDebugWindow}. Provides
  62. * an opportunity to e.g stop timers, remove listeners etc.
  63. */
  64. public void hide();
  65. public void meta(ApplicationConnection ac, ValueMap meta);
  66. public void uidl(ApplicationConnection ac, ValueMap uidl);
  67. }