jdk/src/share/classes/javax/swing/JSeparator.java

Print this page

        

*** 20,40 **** * * 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.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, --- 20,39 ---- * * 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.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,79 **** * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; * 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 */ @SuppressWarnings("serial") public class JSeparator extends JComponent implements SwingConstants, Accessible { /** * @see #getUIClassID --- 61,76 ---- * the same version of Swing. As of 1.4, support for long term storage * of all JavaBeans&trade; * has been added to the <code>java.beans</code> package. * Please see {@link java.beans.XMLEncoder}. * * @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,135 **** /** * Sets the L&amp;F object that renders this component. * * @param ui the SeparatorUI L&amp;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(SeparatorUI ui) { super.setUI(ui); } /** --- 117,129 ---- /** * Sets the L&amp;F object that renders this component. * * @param ui the SeparatorUI L&amp;F object * @see UIDefaults#getUI */ + @BeanProperty(hidden = true, visualUpdate = true, description + = "The UI object that implements the Component's LookAndFeel.") public void setUI(SeparatorUI ui) { super.setUI(ui); } /**
*** 147,156 **** --- 141,151 ---- * * @return the string "SeparatorUI" * @see JComponent#getUIClassID * @see UIDefaults#getUI */ + @BeanProperty(bound = false) public String getUIClassID() { return uiClassID; }
*** 194,211 **** * 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. */ public void setOrientation( int orientation ) { if (this.orientation == orientation) { return; } int oldValue = this.orientation; --- 189,203 ---- * is neither <code>SwingConstants.HORIZONTAL</code> * nor <code>SwingConstants.VERTICAL</code> * * @see SwingConstants * @see #getOrientation */ + @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,267 **** --- 250,260 ---- * 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;