|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpivot.wtk.skin.ComponentSkin
pivot.wtk.skin.ContainerSkin
public abstract class ContainerSkin
Abstract base class for container skins.
Nested Class Summary | |
---|---|
static class |
ContainerSkin.IndexFocusTraversalPolicy
Focus traversal policy that determines traversal order based on the order of components in the container's component sequence. |
Field Summary |
---|
Fields inherited from class pivot.wtk.skin.ComponentSkin |
---|
SHOW_TOOLTIP_TIMEOUT |
Constructor Summary | |
---|---|
ContainerSkin()
|
Method Summary | |
---|---|
void |
componentInserted(Container container,
int index)
Called when a component has been inserted into a container's component sequence. |
void |
componentsRemoved(Container container,
int index,
Sequence<Component> removed)
Called when components have been removed from a container's component sequence. |
void |
contextKeyChanged(Container container,
java.lang.String previousContextKey)
Called when a container's context key has changed. |
void |
focusTraversalPolicyChanged(Container container,
FocusTraversalPolicy previousFocusTraversalPolicy)
Called when a container's focus traversal policy has changed. |
java.awt.Color |
getBackgroundColor()
|
java.awt.Paint |
getBackgroundPaint()
|
int |
getPreferredHeight(int width)
Returns the visual's preferred height given the provided width constraint. |
int |
getPreferredWidth(int height)
Returns the visual's preferred width given the provided height constraint. |
void |
install(Component component)
Associates a skin with a component. |
boolean |
isFocusable()
By default, components are focusable. |
void |
paint(java.awt.Graphics2D graphics)
Paints the visual. |
void |
setBackgroundColor(java.awt.Color backgroundColor)
|
void |
setBackgroundColor(java.lang.String backgroundColor)
|
void |
setBackgroundPaint(java.awt.Paint backgroundPaint)
|
void |
uninstall()
Dissociates a skin from a component. |
Methods inherited from class pivot.wtk.skin.ComponentSkin |
---|
cursorChanged, decodeColor, displayableChanged, enabledChanged, focusedChanged, getComponent, getHeight, getPreferredSize, getWidth, invalidateComponent, keyPressed, keyReleased, keyTyped, locationChanged, mouseClick, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, mouseWheel, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, setSize, sizeChanged, styleUpdated, tooltipTextChanged, visibleChanged |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface pivot.wtk.Skin |
---|
layout |
Constructor Detail |
---|
public ContainerSkin()
Method Detail |
---|
public void install(Component component)
Skin
install
in interface Skin
install
in class ComponentSkin
component
- The component to which the skin is being attached.public void uninstall()
Skin
uninstall
in interface Skin
uninstall
in class ComponentSkin
public int getPreferredWidth(int height)
ConstrainedVisual
getPreferredWidth
in interface ConstrainedVisual
height
- The height by which to constrain the preferred width, or -1
for no constraint.public int getPreferredHeight(int width)
ConstrainedVisual
getPreferredHeight
in interface ConstrainedVisual
width
- The width by which to constrain the preferred height, or -1
for no constraint.public void paint(java.awt.Graphics2D graphics)
Visual
paint
in interface Visual
graphics
- The graphics context in which to paint the visual.public final boolean isFocusable()
ComponentSkin
isFocusable
in interface Skin
isFocusable
in class ComponentSkin
public java.awt.Paint getBackgroundPaint()
public void setBackgroundPaint(java.awt.Paint backgroundPaint)
public java.awt.Color getBackgroundColor()
public void setBackgroundColor(java.awt.Color backgroundColor)
public final void setBackgroundColor(java.lang.String backgroundColor)
public void componentInserted(Container container, int index)
ContainerListener
componentInserted
in interface ContainerListener
public void componentsRemoved(Container container, int index, Sequence<Component> removed)
ContainerListener
componentsRemoved
in interface ContainerListener
public void contextKeyChanged(Container container, java.lang.String previousContextKey)
ContainerListener
contextKeyChanged
in interface ContainerListener
public void focusTraversalPolicyChanged(Container container, FocusTraversalPolicy previousFocusTraversalPolicy)
ContainerListener
focusTraversalPolicyChanged
in interface ContainerListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |