--- old/jdk/src/share/classes/javax/swing/JSplitPane.java 2014-08-11 11:50:56.243870100 +0400
+++ new/jdk/src/share/classes/javax/swing/JSplitPane.java 2014-08-11 11:50:55.825846200 +0400
@@ -23,12 +23,10 @@
* questions.
*/
-
-
package javax.swing;
-
-
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
import java.beans.ConstructorProperties;
import javax.swing.plaf.*;
import javax.accessibility.*;
@@ -36,11 +34,8 @@
import java.awt.*;
import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
import java.io.IOException;
-
-
/**
* JSplitPane
is used to divide two (and only two)
* Component
s. The two Component
s
@@ -99,6 +94,7 @@
* @author Scott Violet
* @since 1.2
*/
+@JavaBean(defaultProperty = "UI")
@SuppressWarnings("serial") // Same-version serialization only
public class JSplitPane extends JComponent implements Accessible
{
@@ -365,11 +361,6 @@
*
* @param ui the SplitPaneUI
L&F object
* @see UIDefaults#getUI
- * @beaninfo
- * bound: true
- * hidden: true
- * attribute: visualUpdate true
- * description: The UI object that implements the Component's LookAndFeel.
*/
public void setUI(SplitPaneUI ui) {
if ((SplitPaneUI)this.ui != ui) {
@@ -384,10 +375,9 @@
* current look and feel.
*
* @return the SplitPaneUI
object that renders this component
- * @beaninfo
- * expert: true
- * description: The L&F object that renders this component.
*/
+ @BeanProperty(bound = false, expert = true, description
+ = "The L&F object that renders this component.")
public SplitPaneUI getUI() {
return (SplitPaneUI)ui;
}
@@ -412,10 +402,9 @@
* @return the string "SplitPaneUI"
* @see JComponent#getUIClassID
* @see UIDefaults#getUI
- * @beaninfo
- * expert: true
- * description: A string that specifies the name of the L&F class.
*/
+ @BeanProperty(bound = false, expert = true, description
+ = "A string that specifies the name of the L&F class.")
public String getUIClassID() {
return uiClassID;
}
@@ -425,10 +414,9 @@
* Sets the size of the divider.
*
* @param newSize an integer giving the size of the divider in pixels
- * @beaninfo
- * bound: true
- * description: The size of the divider.
*/
+ @BeanProperty(description
+ = "The size of the divider.")
public void setDividerSize(int newSize) {
int oldSize = dividerSize;
@@ -471,10 +459,9 @@
* Returns the component to the left (or above) the divider.
*
* @return the Component
displayed in that position
- * @beaninfo
- * preferred: true
- * description: The component to the left (or above) the divider.
*/
+ @BeanProperty(bound = false, preferred = true, description
+ = "The component to the left (or above) the divider.")
public Component getLeftComponent() {
return leftComponent;
}
@@ -484,9 +471,9 @@
* Sets the component above, or to the left of the divider.
*
* @param comp the Component
to display in that position
- * @beaninfo
- * description: The component above, or to the left of the divider.
*/
+ @BeanProperty(bound = false, description
+ = "The component above, or to the left of the divider.")
public void setTopComponent(Component comp) {
setLeftComponent(comp);
}
@@ -506,10 +493,9 @@
* Sets the component to the right (or below) the divider.
*
* @param comp the Component
to display in that position
- * @beaninfo
- * preferred: true
- * description: The component to the right (or below) the divider.
*/
+ @BeanProperty(bound = false, preferred = true, description
+ = "The component to the right (or below) the divider.")
public void setRightComponent(Component comp) {
if (comp == null) {
if (rightComponent != null) {
@@ -536,9 +522,9 @@
* Sets the component below, or to the right of the divider.
*
* @param comp the Component
to display in that position
- * @beaninfo
- * description: The component below, or to the right of the divider.
*/
+ @BeanProperty(bound = false, description
+ = "The component below, or to the right of the divider.")
public void setBottomComponent(Component comp) {
setRightComponent(comp);
}
@@ -565,13 +551,11 @@
*
* @param newValue true
to specify that the split pane should provide a
* collapse/expand widget
- * @beaninfo
- * bound: true
- * description: UI widget on the divider to quickly
- * expand/collapse the divider.
*
* @see #isOneTouchExpandable
*/
+ @BeanProperty(description
+ = "UI widget on the divider to quickly expand/collapse the divider.")
public void setOneTouchExpandable(boolean newValue) {
boolean oldValue = oneTouchExpandable;
@@ -600,10 +584,9 @@
* @param newLastLocation an integer specifying the last divider location
* in pixels, from the left (or upper) edge of the pane to the
* left (or upper) edge of the divider
- * @beaninfo
- * bound: true
- * description: The last location the divider was at.
*/
+ @BeanProperty(description
+ = "The last location the divider was at.")
public void setLastDividerLocation(int newLastLocation) {
int oldLocation = lastDividerLocation;
@@ -635,12 +618,11 @@
* @param orientation an integer specifying the orientation
* @exception IllegalArgumentException if orientation is not one of:
* HORIZONTAL_SPLIT or VERTICAL_SPLIT.
- * @beaninfo
- * bound: true
- * description: The orientation, or how the splitter is divided.
- * enum: HORIZONTAL_SPLIT JSplitPane.HORIZONTAL_SPLIT
- * VERTICAL_SPLIT JSplitPane.VERTICAL_SPLIT
*/
+ @BeanProperty(enumerationValues = {
+ "JSplitPane.HORIZONTAL_SPLIT",
+ "JSplitPane.VERTICAL_SPLIT"}, description
+ = "The orientation, or how the splitter is divided.")
public void setOrientation(int orientation) {
if ((orientation != VERTICAL_SPLIT) &&
(orientation != HORIZONTAL_SPLIT)) {
@@ -679,13 +661,10 @@
*
* @param newContinuousLayout true
if the components
* should continuously be redrawn as the divider changes position
- * @beaninfo
- * bound: true
- * description: Whether the child components are
- * continuously redisplayed and laid out during
- * user intervention.
* @see #isContinuousLayout
*/
+ @BeanProperty(description
+ = "Whether the child components are continuously redisplayed and laid out during user intervention.")
public void setContinuousLayout(boolean newContinuousLayout) {
boolean oldCD = continuousLayout;
@@ -718,11 +697,9 @@
* @param value as described above
* @exception IllegalArgumentException if value
is < 0 or > 1
* @since 1.3
- * @beaninfo
- * bound: true
- * description: Specifies how to distribute extra space when the split pane
- * resizes.
*/
+ @BeanProperty(description
+ = "Specifies how to distribute extra space when the split pane resizes.")
public void setResizeWeight(double value) {
if (value < 0 || value > 1) {
throw new IllegalArgumentException("JSplitPane weight must be between 0 and 1");
@@ -773,9 +750,9 @@
* (bottom/right)
* @exception IllegalArgumentException if the specified location is < 0
* or > 1.0
- * @beaninfo
- * description: The location of the divider.
*/
+ @BeanProperty(description
+ = "The location of the divider.")
public void setDividerLocation(double proportionalLocation) {
if (proportionalLocation < 0.0 ||
proportionalLocation > 1.0) {
@@ -802,10 +779,9 @@
*
* @param location an int specifying a UI-specific value (typically a
* pixel count)
- * @beaninfo
- * bound: true
- * description: The location of the divider.
*/
+ @BeanProperty(description
+ = "The location of the divider.")
public void setDividerLocation(int location) {
int oldValue = dividerLocation;
@@ -846,9 +822,9 @@
* @return an integer specifying a UI-specific value for the minimum
* location (typically a pixel count); or -1 if the UI is
* null
- * @beaninfo
- * description: The minimum location of the divider from the L&F.
*/
+ @BeanProperty(bound = false, description
+ = "The minimum location of the divider from the L&F.")
public int getMinimumDividerLocation() {
SplitPaneUI ui = getUI();
@@ -867,6 +843,7 @@
* location (typically a pixel count); or -1 if the UI is
* null
*/
+ @BeanProperty(bound = false)
public int getMaximumDividerLocation() {
SplitPaneUI ui = getUI();
@@ -947,11 +924,9 @@
* @return true
* @see JComponent#revalidate
* @see java.awt.Container#isValidateRoot
- *
- * @beaninfo
- * hidden: true
*/
@Override
+ @BeanProperty(hidden = true)
public boolean isValidateRoot() {
return true;
}
@@ -1132,10 +1107,9 @@
*
* @return an AccessibleJSplitPane that serves as the
* AccessibleContext of this JSplitPane
- * @beaninfo
- * expert: true
- * description: The AccessibleContext associated with this SplitPane.
*/
+ @BeanProperty(bound = false, expert = true, description
+ = "The AccessibleContext associated with this SplitPane.")
public AccessibleContext getAccessibleContext() {
if (accessibleContext == null) {
accessibleContext = new AccessibleJSplitPane();