|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectpivot.wtk.skin.ComponentSkin
public abstract class ComponentSkin
Abstract base class for component skins.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface pivot.wtk.ComponentListener |
---|
ComponentListener.Adapter |
Nested classes/interfaces inherited from interface pivot.wtk.ComponentStateListener |
---|
ComponentStateListener.Adapter |
Nested classes/interfaces inherited from interface pivot.wtk.ComponentMouseListener |
---|
ComponentMouseListener.Adapter |
Nested classes/interfaces inherited from interface pivot.wtk.ComponentMouseButtonListener |
---|
ComponentMouseButtonListener.Adapter |
Nested classes/interfaces inherited from interface pivot.wtk.ComponentKeyListener |
---|
ComponentKeyListener.Adapter |
Field Summary | |
---|---|
static int |
SHOW_TOOLTIP_TIMEOUT
|
Constructor Summary | |
---|---|
ComponentSkin()
|
Method Summary | |
---|---|
void |
cursorChanged(Component component,
Cursor previousCursor)
Called when a component's cursor has changed. |
void |
displayableChanged(Component component)
Called when a component's displayable flag has changed. |
void |
enabledChanged(Component component)
Called when a component's enabled state has changed. |
void |
focusedChanged(Component component,
boolean temporary)
Called when a component's focused state has changed. |
Component |
getComponent()
Returns the component with which a skin is associated. |
int |
getHeight()
Returns the visual's height. |
Dimensions |
getPreferredSize()
Returns the visual's unconstrained preferred size. |
int |
getWidth()
Returns the visual's width. |
void |
install(Component component)
Associates a skin with a component. |
protected void |
invalidateComponent()
|
boolean |
isFocusable()
By default, components are focusable. |
boolean |
isOpaque()
By default, skins are assumed to be opaque. |
boolean |
keyPressed(Component component,
int keyCode,
Keyboard.KeyLocation keyLocation)
Called when a key has been pressed. |
boolean |
keyReleased(Component component,
int keyCode,
Keyboard.KeyLocation keyLocation)
Called when a key has been released. |
boolean |
keyTyped(Component component,
char character)
Called when a key has been typed. |
void |
locationChanged(Component component,
int previousX,
int previousY)
Called when a component's location has changed. |
boolean |
mouseClick(Component component,
Mouse.Button button,
int x,
int y,
int count)
Called when a mouse button is clicked over a component. |
boolean |
mouseDown(Component component,
Mouse.Button button,
int x,
int y)
Called when a mouse button is pressed over a component. |
boolean |
mouseMove(Component component,
int x,
int y)
Called when the mouse is moved over a component. |
void |
mouseOut(Component component)
Called when the mouse exits a component. |
void |
mouseOver(Component component)
Called when the mouse enters a component. |
boolean |
mouseUp(Component component,
Mouse.Button button,
int x,
int y)
Called when a mouse button is released over a component. |
boolean |
mouseWheel(Component component,
Mouse.ScrollType scrollType,
int scrollAmount,
int wheelRotation,
int x,
int y)
Called when the mouse wheel is scrolled over a component. |
void |
parentChanged(Component component,
Container previousParent)
Called when a component's parent has changed (when the component is either added to or removed from a container). |
void |
preferredSizeChanged(Component component,
int previousPreferredWidth,
int previousPreferredHeight)
Called when a component's preferred size has changed. |
protected void |
repaintComponent()
|
protected void |
repaintComponent(boolean immediate)
|
protected void |
repaintComponent(Bounds area)
|
protected void |
repaintComponent(int x,
int y,
int width,
int height)
|
void |
setSize(int width,
int height)
Sets the visual's render size. |
void |
sizeChanged(Component component,
int previousWidth,
int previousHeight)
Called when a component's size has changed. |
void |
styleUpdated(Component component,
String styleKey,
Object previousValue)
Called when a component style has been updated. |
void |
tooltipTextChanged(Component component,
String previousTooltipText)
Called when a component's tooltip text has changed. |
void |
uninstall()
Dissociates a skin from a component. |
void |
visibleChanged(Component component)
Called when a component's visible flag has changed. |
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 |
Methods inherited from interface pivot.wtk.ConstrainedVisual |
---|
getPreferredHeight, getPreferredWidth |
Methods inherited from interface pivot.wtk.Visual |
---|
paint |
Field Detail |
---|
public static final int SHOW_TOOLTIP_TIMEOUT
Constructor Detail |
---|
public ComponentSkin()
Method Detail |
---|
public int getWidth()
Visual
getWidth
in interface Visual
public int getHeight()
Visual
getHeight
in interface Visual
public void setSize(int width, int height)
ConstrainedVisual
setSize
in interface ConstrainedVisual
public Dimensions getPreferredSize()
ConstrainedVisual
getPreferredSize
in interface ConstrainedVisual
public void install(Component component)
Skin
install
in interface Skin
component
- The component to which the skin is being attached.public void uninstall()
Skin
uninstall
in interface Skin
public Component getComponent()
Skin
getComponent
in interface Skin
public boolean isFocusable()
isFocusable
in interface Skin
public boolean isOpaque()
isOpaque
in interface Skin
public void parentChanged(Component component, Container previousParent)
ComponentListener
parentChanged
in interface ComponentListener
public void sizeChanged(Component component, int previousWidth, int previousHeight)
ComponentListener
sizeChanged
in interface ComponentListener
public void locationChanged(Component component, int previousX, int previousY)
ComponentListener
locationChanged
in interface ComponentListener
public void visibleChanged(Component component)
ComponentListener
visibleChanged
in interface ComponentListener
public void styleUpdated(Component component, String styleKey, Object previousValue)
ComponentListener
styleUpdated
in interface ComponentListener
public void cursorChanged(Component component, Cursor previousCursor)
ComponentListener
cursorChanged
in interface ComponentListener
public void tooltipTextChanged(Component component, String previousTooltipText)
ComponentListener
tooltipTextChanged
in interface ComponentListener
public void preferredSizeChanged(Component component, int previousPreferredWidth, int previousPreferredHeight)
ComponentLayoutListener
preferredSizeChanged
in interface ComponentLayoutListener
public void displayableChanged(Component component)
ComponentLayoutListener
displayableChanged
in interface ComponentLayoutListener
public void enabledChanged(Component component)
ComponentStateListener
enabledChanged
in interface ComponentStateListener
public void focusedChanged(Component component, boolean temporary)
ComponentStateListener
focusedChanged
in interface ComponentStateListener
public boolean mouseMove(Component component, int x, int y)
ComponentMouseListener
mouseMove
in interface ComponentMouseListener
public void mouseOver(Component component)
ComponentMouseListener
mouseOver
in interface ComponentMouseListener
public void mouseOut(Component component)
ComponentMouseListener
mouseOut
in interface ComponentMouseListener
public boolean mouseDown(Component component, Mouse.Button button, int x, int y)
ComponentMouseButtonListener
mouseDown
in interface ComponentMouseButtonListener
public boolean mouseUp(Component component, Mouse.Button button, int x, int y)
ComponentMouseButtonListener
mouseUp
in interface ComponentMouseButtonListener
public boolean mouseClick(Component component, Mouse.Button button, int x, int y, int count)
ComponentMouseButtonListener
mouseClick
in interface ComponentMouseButtonListener
public boolean mouseWheel(Component component, Mouse.ScrollType scrollType, int scrollAmount, int wheelRotation, int x, int y)
ComponentMouseWheelListener
mouseWheel
in interface ComponentMouseWheelListener
public boolean keyTyped(Component component, char character)
ComponentKeyListener
keyTyped
in interface ComponentKeyListener
public boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
ComponentKeyListener
keyPressed
in interface ComponentKeyListener
public boolean keyReleased(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
ComponentKeyListener
keyReleased
in interface ComponentKeyListener
protected void invalidateComponent()
protected void repaintComponent()
protected void repaintComponent(boolean immediate)
protected void repaintComponent(Bounds area)
protected void repaintComponent(int x, int y, int width, int height)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |