Ви не можете вибрати більше 25 тем Теми мають розпочинатися з літери або цифри, можуть містити дефіси (-) і не повинні перевищувати 35 символів.

VerticalSplitPanel.java 2.1KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768
  1. /*
  2. * Copyright 2000-2018 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.ui;
  17. import com.vaadin.shared.ui.splitpanel.VerticalSplitPanelState;
  18. /**
  19. * A vertical split panel contains two components and lays them vertically. The
  20. * first component is above the second component.
  21. *
  22. * <pre>
  23. * +--------------------------+
  24. * | |
  25. * | The first component |
  26. * | |
  27. * +==========================+ <-- splitter
  28. * | |
  29. * | The second component |
  30. * | |
  31. * +--------------------------+
  32. * </pre>
  33. *
  34. */
  35. public class VerticalSplitPanel extends AbstractSplitPanel {
  36. public VerticalSplitPanel() {
  37. super();
  38. setSizeFull();
  39. }
  40. /**
  41. * Creates a horizontal split panel containing the given components.
  42. *
  43. * @param firstComponent
  44. * The component to be placed above the splitter
  45. * @param secondComponent
  46. * The component to be placed below of the splitter
  47. */
  48. public VerticalSplitPanel(Component firstComponent,
  49. Component secondComponent) {
  50. this();
  51. setFirstComponent(firstComponent);
  52. setSecondComponent(secondComponent);
  53. }
  54. @Override
  55. protected VerticalSplitPanelState getState() {
  56. return (VerticalSplitPanelState) super.getState();
  57. }
  58. @Override
  59. protected VerticalSplitPanelState getState(boolean markAsDirty) {
  60. return (VerticalSplitPanelState) super.getState(markAsDirty);
  61. }
  62. }