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

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677
  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
  32. * called.</em>
  33. * </p>
  34. * <p>
  35. * The button should preferably only have an icon (no caption), and should
  36. * have a longer description as title (tooltip).
  37. * </p>
  38. *
  39. * @return section id
  40. */
  41. public DebugButton getTabButton();
  42. /**
  43. * Returns a widget that is placed on top of the Section content when the
  44. * Section (tab) is active in the {@link VDebugWindow}.
  45. *
  46. * @return section controls
  47. */
  48. public Widget getControls();
  49. /**
  50. * Returns a widget that is the main content of the section, displayed when
  51. * the section is active in the {@link VDebugWindow}.
  52. *
  53. * @return
  54. */
  55. public Widget getContent();
  56. /**
  57. * Called when the section is activated in {@link VDebugWindow}. Provides an
  58. * opportunity to e.g start timers, add listeners etc.
  59. */
  60. public void show();
  61. /**
  62. * Called when the section is deactivated in {@link VDebugWindow}. Provides
  63. * an opportunity to e.g stop timers, remove listeners etc.
  64. */
  65. public void hide();
  66. public void meta(ApplicationConnection ac, ValueMap meta);
  67. public void uidl(ApplicationConnection ac, ValueMap uidl);
  68. }