APIdia Launch Partner
Top Description Fields Constructors Methods
javax.swing.plaf.basic

public Class BasicSeparatorUI

extends SeparatorUI
Class Inheritance
Known Direct Subclasses
javax.swing.plaf.basic.BasicToolBarSeparatorUI, javax.swing.plaf.basic.BasicPopupMenuSeparatorUI, javax.swing.plaf.metal.MetalSeparatorUI, com.sun.java.swing.plaf.motif.MotifSeparatorUI
Imports
java.awt.Color, .Dimension, .Graphics, javax.swing.JComponent, .JSeparator, .LookAndFeel, javax.swing.plaf.ComponentUI, .SeparatorUI

A Basic L&F implementation of SeparatorUI. This implementation is a "combined" view/controller.
Authors
Georges Saab, Jeff Shapiro

Field Summary

Modifier and TypeField and Description
protected Color
highlight

The color of the highlighting.

protected Color
shadow

The color of the shadow.

Constructor Summary

AccessConstructor and Description
public
BasicSeparatorUI()

Constructs a BasicSeparatorUI.

Method Summary

Modifier and TypeMethod and Description
public static ComponentUI

Returns:

a new instance of BasicSeparatorUI
createUI
(JComponent
a component
c
)

Hides javax.swing.plaf.ComponentUI.createUI.

Returns a new instance of BasicSeparatorUI.

public Dimension
getMaximumSize(JComponent c)

Overrides javax.swing.plaf.ComponentUI.getMaximumSize.

Returns the specified component's maximum size appropriate for the look and feel.

public Dimension
getMinimumSize(JComponent c)

Overrides javax.swing.plaf.ComponentUI.getMinimumSize.

Returns the specified component's minimum size appropriate for the look and feel.

public Dimension
getPreferredSize(JComponent c)

Overrides javax.swing.plaf.ComponentUI.getPreferredSize.

Returns the specified component's preferred size appropriate for the look and feel.

protected void
installDefaults(JSeparator
an instance of JSeparator
s
)

Installs default properties.

protected void
installListeners(JSeparator
an instance of JSeparator
s
)

Registers listeners.

public void
installUI(JComponent c)

Overrides javax.swing.plaf.ComponentUI.installUI.

Configures the specified component appropriately for the look and feel.

public void
paint(Graphics g, JComponent c)

Overrides javax.swing.plaf.ComponentUI.paint.

Paints the specified component appropriately for the look and feel.

protected void
uninstallDefaults(JSeparator
an instance of JSeparator
s
)

Uninstalls default properties.

protected void
uninstallListeners(JSeparator
an instance of JSeparator
s
)

Unregisters listeners.

public void
uninstallUI(JComponent c)

Overrides javax.swing.plaf.ComponentUI.uninstallUI.

Reverses configuration which was done on the specified component during installUI.

Field Detail

highlightback to summary
protected Color highlight

The color of the highlighting.

shadowback to summary
protected Color shadow

The color of the shadow.

Constructor Detail

BasicSeparatorUIback to summary
public BasicSeparatorUI()

Constructs a BasicSeparatorUI.

Method Detail

createUIback to summary
public static ComponentUI createUI(JComponent c)

Hides javax.swing.plaf.ComponentUI.createUI.

Returns a new instance of BasicSeparatorUI.

Parameters
c:JComponent

a component

Returns:ComponentUI

a new instance of BasicSeparatorUI

getMaximumSizeback to summary
public Dimension getMaximumSize(JComponent c)

Overrides javax.swing.plaf.ComponentUI.getMaximumSize.

Doc from javax.swing.plaf.ComponentUI.getMaximumSize.

Returns the specified component's maximum size appropriate for the look and feel. If null is returned, the maximum size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method invokes getPreferredSize and returns that value.

getMinimumSizeback to summary
public Dimension getMinimumSize(JComponent c)

Overrides javax.swing.plaf.ComponentUI.getMinimumSize.

Doc from javax.swing.plaf.ComponentUI.getMinimumSize.

Returns the specified component's minimum size appropriate for the look and feel. If null is returned, the minimum size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method invokes getPreferredSize and returns that value.

getPreferredSizeback to summary
public Dimension getPreferredSize(JComponent c)

Overrides javax.swing.plaf.ComponentUI.getPreferredSize.

Doc from javax.swing.plaf.ComponentUI.getPreferredSize.

Returns the specified component's preferred size appropriate for the look and feel. If null is returned, the preferred size will be calculated by the component's layout manager instead (this is the preferred approach for any component with a specific layout manager installed). The default implementation of this method returns null.

installDefaultsback to summary
protected void installDefaults(JSeparator s)

Installs default properties.

Parameters
s:JSeparator

an instance of JSeparator

installListenersback to summary
protected void installListeners(JSeparator s)

Registers listeners.

Parameters
s:JSeparator

an instance of JSeparator

installUIback to summary
public void installUI(JComponent c)

Overrides javax.swing.plaf.ComponentUI.installUI.

Doc from javax.swing.plaf.ComponentUI.installUI.

Configures the specified component appropriately for the look and feel. This method is invoked when the ComponentUI instance is being installed as the UI delegate on the specified component. This method should completely configure the component for the look and feel, including the following:

  1. Install default property values for color, fonts, borders, icons, opacity, etc. on the component. Whenever possible, property values initialized by the client program should not be overridden.
  2. Install a LayoutManager on the component if necessary.
  3. Create/add any required sub-components to the component.
  4. Create/install event listeners on the component.
  5. Create/install a PropertyChangeListener on the component in order to detect and respond to component property changes appropriately.
  6. Install keyboard UI (mnemonics, traversal, etc.) on the component.
  7. Initialize any appropriate instance data.
paintback to summary
public void paint(Graphics g, JComponent c)

Overrides javax.swing.plaf.ComponentUI.paint.

Doc from javax.swing.plaf.ComponentUI.paint.

Paints the specified component appropriately for the look and feel. This method is invoked from the ComponentUI.update method when the specified component is being painted. Subclasses should override this method and use the specified Graphics object to render the content of the component.

uninstallDefaultsback to summary
protected void uninstallDefaults(JSeparator s)

Uninstalls default properties.

Parameters
s:JSeparator

an instance of JSeparator

uninstallListenersback to summary
protected void uninstallListeners(JSeparator s)

Unregisters listeners.

Parameters
s:JSeparator

an instance of JSeparator

uninstallUIback to summary
public void uninstallUI(JComponent c)

Overrides javax.swing.plaf.ComponentUI.uninstallUI.

Doc from javax.swing.plaf.ComponentUI.uninstallUI.

Reverses configuration which was done on the specified component during installUI. This method is invoked when this UIComponent instance is being removed as the UI delegate for the specified component. This method should undo the configuration performed in installUI, being careful to leave the JComponent instance in a clean state (no extraneous listeners, look-and-feel-specific property objects, etc.). This should include the following:

  1. Remove any UI-set borders from the component.
  2. Remove any UI-set layout managers on the component.
  3. Remove any UI-added sub-components from the component.
  4. Remove any UI-added event/property listeners from the component.
  5. Remove any UI-installed keyboard UI from the component.
  6. Nullify any allocated instance data objects to allow for GC.