A Basic L&F implementation of SeparatorUI. This implementation is a "combined" view/controller.
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:
LayoutManager
on the component if necessary.
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:
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.
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
.
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.