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

public Class BasicViewportUI

extends ViewportUI
Class Inheritance
Imports
java.awt.*, java.awt.*, javax.swing.*, javax.swing.border.*, javax.swing.plaf.*, java.awt.event.*

BasicViewport implementation
Author
Rich Schiavi

Field Summary

Modifier and TypeField and Description
private static ViewportUI

Constructor Summary

AccessConstructor and Description
public
BasicViewportUI()

Constructs a BasicViewportUI.

Method Summary

Modifier and TypeMethod and Description
public static ComponentUI

Returns:

an instance of BasicViewportUI
createUI
(JComponent
a component
c
)

Hides javax.swing.plaf.ComponentUI.createUI.

Returns an instance of BasicViewportUI.

protected void
installDefaults(JComponent
a component
c
)

Installs view port properties.

public void
installUI(JComponent c)

Overrides javax.swing.plaf.ComponentUI.installUI.

Configures the specified component appropriately for the look and feel.

protected void
uninstallDefaults(JComponent
a component
c
)

Uninstall view port properties.

public void
uninstallUI(JComponent c)

Overrides javax.swing.plaf.ComponentUI.uninstallUI.

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

Field Detail

viewportUIback to summary
private static ViewportUI viewportUI

Constructor Detail

BasicViewportUIback to summary
public BasicViewportUI()

Constructs a BasicViewportUI.

Method Detail

createUIback to summary
public static ComponentUI createUI(JComponent c)

Hides javax.swing.plaf.ComponentUI.createUI.

Returns an instance of BasicViewportUI.

Parameters
c:JComponent

a component

Returns:ComponentUI

an instance of BasicViewportUI

installDefaultsback to summary
protected void installDefaults(JComponent c)

Installs view port properties.

Parameters
c:JComponent

a component

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.
uninstallDefaultsback to summary
protected void uninstallDefaults(JComponent c)

Uninstall view port properties.

Parameters
c:JComponent

a component

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.