Class org.aswing.plaf.basic.BasicScrollBarUI

Implemented Interfaces

LayoutManager

Description

Method Index

new BasicScrollBarUI()
addLayoutComponent(), create(), getLayoutAlignmentX(), getLayoutAlignmentY(), getMaximumSize(), getMinimumSize(), getPreferredSize(), installUI(), invalidateLayout(), layoutContainer(), maximumLayoutSize(), minimumLayoutSize(), paint(), preferredLayoutSize(), removeLayoutComponent(), uninstallUI()

Inherited from ComponentUI

Constructor Detail

BasicScrollBarUI

public function BasicScrollBarUI()

Method Detail

installUI

public function installUI(c:Component):Void

Description copied from ComponentUI

Configures the specified component appropriate 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 any 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. Install keyboard UI (mnemonics, traversal, etc.) on the component.
  6. Initialize any appropriate instance data.

Overrides

installUI() in org.aswing.plaf.ComponentUI

uninstallUI

public function uninstallUI(c:Component):Void

Description copied from ComponentUI

Reverses configuration which was done on the specified component during installUI. This method is invoked when this ComponentUI 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 Component 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 listeners from the component.
  5. Remove any UI-installed keyboard UI from the component.
  6. Remove any UI-added MCs from this component.
  7. Nullify any allocated instance data objects to allow for GC.

Overrides

uninstallUI() in org.aswing.plaf.ComponentUI

create

public function create(c:Component):Void

Description copied from ComponentUI

Notifies this UI delegate that it's time to create the specified component's ui MCs. This method is invoked by Component when the specified component is being created.

In general this method need not be overridden by subclasses; all look-and-feel ui creating code should reside in this method.

Overrides

create() in org.aswing.plaf.ComponentUI

paint

public function paint(c:Component, g:Graphics, b:Rectangle):Void

Description copied from ComponentUI

Notifies this UI delegate that it's time to paint the specified component. This method is invoked by Component when the specified component is being painted.

In general this method need be overridden by subclasses; all look-and-feel rendering code should reside in this method. And there is a default background paint method, you should call it in your overridden paint method.

Overrides

paint() in org.aswing.plaf.ComponentUI

getPreferredSize

public function getPreferredSize(c:Component):Dimension

Description copied from ComponentUI

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.

Overrides

getPreferredSize() in org.aswing.plaf.ComponentUI

getMaximumSize

public function getMaximumSize(c:Component):Dimension

Description copied from ComponentUI

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.

Overrides

getMaximumSize() in org.aswing.plaf.ComponentUI

getMinimumSize

public function getMinimumSize(c:Component):Dimension

Description copied from ComponentUI

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.

Overrides

getMinimumSize() in org.aswing.plaf.ComponentUI

layoutContainer

public function layoutContainer(target:Container):Void

Description copied from LayoutManager

Lays out the specified container.

Specified By

layoutContainer() in org.aswing.LayoutManager

preferredLayoutSize

public function preferredLayoutSize(target:Container):Dimension

Parameters

target

Throws

Errorwhen the target is not a JScrollBar

Specified By

preferredLayoutSize() in org.aswing.LayoutManager

maximumLayoutSize

public function maximumLayoutSize(target:Container):Dimension

Parameters

target

Throws

Errorwhen the target is not a JScrollBar

Specified By

maximumLayoutSize() in org.aswing.LayoutManager

minimumLayoutSize

public function minimumLayoutSize(target:Container):Dimension

Description copied from LayoutManager

Calculates the minimum size dimensions for the specified container, given the components it contains.

Specified By

minimumLayoutSize() in org.aswing.LayoutManager

getLayoutAlignmentX

public function getLayoutAlignmentX(target:Container):Number

Description copied from LayoutManager

Returns the alignment along the x axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.

Specified By

getLayoutAlignmentX() in org.aswing.LayoutManager

getLayoutAlignmentY

public function getLayoutAlignmentY(target:Container):Number

Description copied from LayoutManager

Returns the alignment along the y axis. This specifies how the component would like to be aligned relative to other components. The value should be a number between 0 and 1 where 0 represents alignment along the origin, 1 is aligned the furthest away from the origin, 0.5 is centered, etc.

Specified By

getLayoutAlignmentY() in org.aswing.LayoutManager

addLayoutComponent

public function addLayoutComponent(comp:Component, constraints:Object):Void

Description copied from LayoutManager

Adds the specified component to the layout, using the specified constraint object.

Specified By

addLayoutComponent() in org.aswing.LayoutManager

removeLayoutComponent

public function removeLayoutComponent(comp:Component):Void

Description copied from LayoutManager

Removes the specified component from the layout.

Specified By

removeLayoutComponent() in org.aswing.LayoutManager

invalidateLayout

public function invalidateLayout(target:Container):Void

Description copied from LayoutManager

Invalidates the layout, indicating that if the layout manager has cached information it should be discarded.

Specified By

invalidateLayout() in org.aswing.LayoutManager