Methods Summary |
---|
private void | checkOrientation(int orientation)
switch ( orientation )
{
case VERTICAL:
case HORIZONTAL:
break;
default:
throw new IllegalArgumentException( "orientation must be one of: VERTICAL, HORIZONTAL" );
}
|
public javax.accessibility.AccessibleContext | getAccessibleContext()Gets the AccessibleContext associated with this JSeparator.
For separators, the AccessibleContext takes the form of an
AccessibleJSeparator.
A new AccessibleJSeparator instance is created if necessary.
if (accessibleContext == null) {
accessibleContext = new AccessibleJSeparator();
}
return accessibleContext;
|
public int | getOrientation()Returns the orientation of this separator.
return this.orientation;
|
public javax.swing.plaf.SeparatorUI | getUI()Returns the L&F object that renders this component.
return (SeparatorUI)ui;
|
public java.lang.String | getUIClassID()Returns the name of the L&F class that renders this component.
return uiClassID;
|
protected java.lang.String | paramString()Returns a string representation of this JSeparator .
This method
is intended to be used only for debugging purposes, and the
content and format of the returned string may vary between
implementations. The returned string may be empty but may not
be null .
String orientationString = (orientation == HORIZONTAL ?
"HORIZONTAL" : "VERTICAL");
return super.paramString() +
",orientation=" + orientationString;
|
public void | setOrientation(int orientation)Sets the orientation of the separator.
The default value of this property is HORIZONTAL.
if (this.orientation == orientation) {
return;
}
int oldValue = this.orientation;
checkOrientation( orientation );
this.orientation = orientation;
firePropertyChange("orientation", oldValue, orientation);
revalidate();
repaint();
|
public void | setUI(javax.swing.plaf.SeparatorUI ui)Sets the L&F object that renders this component.
super.setUI(ui);
|
public void | updateUI()Resets the UI property to a value from the current look and feel.
setUI((SeparatorUI)UIManager.getUI(this));
|
private void | writeObject(java.io.ObjectOutputStream s)See readObject and writeObject in
JComponent for more
information about serialization in Swing.
s.defaultWriteObject();
if (getUIClassID().equals(uiClassID)) {
byte count = JComponent.getWriteObjCounter(this);
JComponent.setWriteObjCounter(this, --count);
if (count == 0 && ui != null) {
ui.installUI(this);
}
}
|