jdk/src/share/classes/javax/swing/JSeparator.java
Print this page
@@ -20,21 +20,20 @@
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*/
-
package javax.swing;
import javax.swing.plaf.*;
import javax.accessibility.*;
+import java.beans.JavaBean;
+import java.beans.BeanProperty;
import java.io.ObjectOutputStream;
-import java.io.ObjectInputStream;
import java.io.IOException;
-
/**
* <code>JSeparator</code> provides a general purpose component for
* implementing divider lines - most commonly used as a divider
* between menu items that breaks them up into logical groupings.
* Instead of using <code>JSeparator</code> directly,
@@ -62,18 +61,16 @@
* the same version of Swing. As of 1.4, support for long term storage
* of all JavaBeans™
* has been added to the <code>java.beans</code> package.
* Please see {@link java.beans.XMLEncoder}.
*
- * @beaninfo
- * attribute: isContainer false
- * description: A divider between menu items.
- *
* @author Georges Saab
* @author Jeff Shapiro
* @since 1.2
*/
+@JavaBean(defaultProperty = "UI", description = "A divider between menu items.")
+@SwingContainer(false)
@SuppressWarnings("serial")
public class JSeparator extends JComponent implements SwingConstants, Accessible
{
/**
* @see #getUIClassID
@@ -120,16 +117,13 @@
/**
* Sets the L&F object that renders this component.
*
* @param ui the SeparatorUI L&F object
* @see UIDefaults#getUI
- * @beaninfo
- * bound: true
- * hidden: true
- * attribute: visualUpdate true
- * description: The UI object that implements the Component's LookAndFeel.
*/
+ @BeanProperty(hidden = true, visualUpdate = true, description
+ = "The UI object that implements the Component's LookAndFeel.")
public void setUI(SeparatorUI ui) {
super.setUI(ui);
}
/**
@@ -147,10 +141,11 @@
*
* @return the string "SeparatorUI"
* @see JComponent#getUIClassID
* @see UIDefaults#getUI
*/
+ @BeanProperty(bound = false)
public String getUIClassID() {
return uiClassID;
}
@@ -194,18 +189,15 @@
* is neither <code>SwingConstants.HORIZONTAL</code>
* nor <code>SwingConstants.VERTICAL</code>
*
* @see SwingConstants
* @see #getOrientation
- * @beaninfo
- * bound: true
- * preferred: true
- * enum: HORIZONTAL SwingConstants.HORIZONTAL
- * VERTICAL SwingConstants.VERTICAL
- * attribute: visualUpdate true
- * description: The orientation of the separator.
*/
+ @BeanProperty(preferred = true, visualUpdate = true, enumerationValues = {
+ "SwingConstants.HORIZONTAL",
+ "SwingConstants.VERTICAL"}, description
+ = "The orientation of the separator.")
public void setOrientation( int orientation ) {
if (this.orientation == orientation) {
return;
}
int oldValue = this.orientation;
@@ -258,10 +250,11 @@
* A new AccessibleJSeparator instance is created if necessary.
*
* @return an AccessibleJSeparator that serves as the
* AccessibleContext of this JSeparator
*/
+ @BeanProperty(bound = false)
public AccessibleContext getAccessibleContext() {
if (accessibleContext == null) {
accessibleContext = new AccessibleJSeparator();
}
return accessibleContext;