Class org.aswing.plaf.basic.BasicTextComponentUI

Description

Method Index

new BasicTextComponentUI()
getMaximumSize(), getMinimumSize(), installUI(), paint(), uninstallUI()

Inherited from ComponentUI

Constructor Detail

BasicTextComponentUI

public function BasicTextComponentUI()

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

paint

public function paint(c:Component, g:Graphics, r: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

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

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