67 * components is greater than the size of the split pane the divider
68 * will not allow you to resize it. To alter the minimum size of a
69 * <code>JComponent</code>, see {@link JComponent#setMinimumSize}.
70 * <p>
71 * When the user resizes the split pane the new space is distributed between
72 * the two components based on the <code>resizeWeight</code> property.
73 * A value of 0,
74 * the default, indicates the right/bottom component gets all the space,
75 * where as a value of 1 indicates the left/top component gets all the space.
76 * <p>
77 * <strong>Warning:</strong> Swing is not thread safe. For more
78 * information see <a
79 * href="package-summary.html#threading">Swing's Threading
80 * Policy</a>.
81 * <p>
82 * <strong>Warning:</strong>
83 * Serialized objects of this class will not be compatible with
84 * future Swing releases. The current serialization support is
85 * appropriate for short term storage or RMI between applications running
86 * the same version of Swing. As of 1.4, support for long term storage
87 * of all JavaBeans™
88 * has been added to the <code>java.beans</code> package.
89 * Please see {@link java.beans.XMLEncoder}.
90 *
91 * @see #setDividerLocation
92 * @see #resetToPreferredSizes
93 *
94 * @author Scott Violet
95 * @since 1.2
96 */
97 @JavaBean(defaultProperty = "UI")
98 @SuppressWarnings("serial") // Same-version serialization only
99 public class JSplitPane extends JComponent implements Accessible
100 {
101 /**
102 * @see #getUIClassID
103 * @see #readObject
104 */
105 private static final String uiClassID = "SplitPaneUI";
106
107 /**
1111 @BeanProperty(bound = false, expert = true, description
1112 = "The AccessibleContext associated with this SplitPane.")
1113 public AccessibleContext getAccessibleContext() {
1114 if (accessibleContext == null) {
1115 accessibleContext = new AccessibleJSplitPane();
1116 }
1117 return accessibleContext;
1118 }
1119
1120
1121 /**
1122 * This class implements accessibility support for the
1123 * <code>JSplitPane</code> class. It provides an implementation of the
1124 * Java Accessibility API appropriate to split pane user-interface elements.
1125 * <p>
1126 * <strong>Warning:</strong>
1127 * Serialized objects of this class will not be compatible with
1128 * future Swing releases. The current serialization support is
1129 * appropriate for short term storage or RMI between applications running
1130 * the same version of Swing. As of 1.4, support for long term storage
1131 * of all JavaBeans™
1132 * has been added to the <code>java.beans</code> package.
1133 * Please see {@link java.beans.XMLEncoder}.
1134 */
1135 @SuppressWarnings("serial") // Same-version serialization only
1136 protected class AccessibleJSplitPane extends AccessibleJComponent
1137 implements AccessibleValue {
1138 /**
1139 * Gets the state set of this object.
1140 *
1141 * @return an instance of AccessibleState containing the current state
1142 * of the object
1143 * @see AccessibleState
1144 */
1145 public AccessibleStateSet getAccessibleStateSet() {
1146 AccessibleStateSet states = super.getAccessibleStateSet();
1147 // FIXME: [[[WDW - Should also add BUSY if this implements
1148 // Adjustable at some point. If this happens, we probably
1149 // should also add actions.]]]
1150 if (getOrientation() == VERTICAL_SPLIT) {
1151 states.add(AccessibleState.VERTICAL);
|
67 * components is greater than the size of the split pane the divider
68 * will not allow you to resize it. To alter the minimum size of a
69 * <code>JComponent</code>, see {@link JComponent#setMinimumSize}.
70 * <p>
71 * When the user resizes the split pane the new space is distributed between
72 * the two components based on the <code>resizeWeight</code> property.
73 * A value of 0,
74 * the default, indicates the right/bottom component gets all the space,
75 * where as a value of 1 indicates the left/top component gets all the space.
76 * <p>
77 * <strong>Warning:</strong> Swing is not thread safe. For more
78 * information see <a
79 * href="package-summary.html#threading">Swing's Threading
80 * Policy</a>.
81 * <p>
82 * <strong>Warning:</strong>
83 * Serialized objects of this class will not be compatible with
84 * future Swing releases. The current serialization support is
85 * appropriate for short term storage or RMI between applications running
86 * the same version of Swing. As of 1.4, support for long term storage
87 * of all JavaBeans
88 * has been added to the <code>java.beans</code> package.
89 * Please see {@link java.beans.XMLEncoder}.
90 *
91 * @see #setDividerLocation
92 * @see #resetToPreferredSizes
93 *
94 * @author Scott Violet
95 * @since 1.2
96 */
97 @JavaBean(defaultProperty = "UI")
98 @SuppressWarnings("serial") // Same-version serialization only
99 public class JSplitPane extends JComponent implements Accessible
100 {
101 /**
102 * @see #getUIClassID
103 * @see #readObject
104 */
105 private static final String uiClassID = "SplitPaneUI";
106
107 /**
1111 @BeanProperty(bound = false, expert = true, description
1112 = "The AccessibleContext associated with this SplitPane.")
1113 public AccessibleContext getAccessibleContext() {
1114 if (accessibleContext == null) {
1115 accessibleContext = new AccessibleJSplitPane();
1116 }
1117 return accessibleContext;
1118 }
1119
1120
1121 /**
1122 * This class implements accessibility support for the
1123 * <code>JSplitPane</code> class. It provides an implementation of the
1124 * Java Accessibility API appropriate to split pane user-interface elements.
1125 * <p>
1126 * <strong>Warning:</strong>
1127 * Serialized objects of this class will not be compatible with
1128 * future Swing releases. The current serialization support is
1129 * appropriate for short term storage or RMI between applications running
1130 * the same version of Swing. As of 1.4, support for long term storage
1131 * of all JavaBeans
1132 * has been added to the <code>java.beans</code> package.
1133 * Please see {@link java.beans.XMLEncoder}.
1134 */
1135 @SuppressWarnings("serial") // Same-version serialization only
1136 protected class AccessibleJSplitPane extends AccessibleJComponent
1137 implements AccessibleValue {
1138 /**
1139 * Gets the state set of this object.
1140 *
1141 * @return an instance of AccessibleState containing the current state
1142 * of the object
1143 * @see AccessibleState
1144 */
1145 public AccessibleStateSet getAccessibleStateSet() {
1146 AccessibleStateSet states = super.getAccessibleStateSet();
1147 // FIXME: [[[WDW - Should also add BUSY if this implements
1148 // Adjustable at some point. If this happens, we probably
1149 // should also add actions.]]]
1150 if (getOrientation() == VERTICAL_SPLIT) {
1151 states.add(AccessibleState.VERTICAL);
|