|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pivot.wtk.skin.ComponentSkin
public abstract class ComponentSkin
Abstract base class for component skins.
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentListener |
|---|
ComponentListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentStateListener |
|---|
ComponentStateListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseListener |
|---|
ComponentMouseListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseButtonListener |
|---|
ComponentMouseButtonListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentKeyListener |
|---|
ComponentKeyListener.Adapter |
| Constructor Summary | |
|---|---|
ComponentSkin()
|
|
| Method Summary | |
|---|---|
void |
cursorChanged(Component componentArgument,
Cursor previousCursor)
Called when a component's cursor has changed. |
static Font |
decodeFont(String value)
Interpret a string as a font specification |
void |
dragSourceChanged(Component componentArgument,
DragSource previousDragSource)
Called when a component's drag source has changed. |
void |
dropTargetChanged(Component componentArgument,
DropTarget previousDropTarget)
Called when a component's drop target has changed. |
void |
enabledChanged(Component componentArgument)
Called when a component's enabled state has changed. |
void |
focusedChanged(Component componentArgument,
Component obverseComponent)
Called when a component's focused state has changed. |
int |
getBaseline()
Returns the visual's baseline. |
int |
getBaseline(int widthArgument,
int heightArgument)
Returns the baseline for a given width and height. |
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 |
heightLimitsChanged(Component componentArgument,
int previousMinimumHeight,
int previousMaximumHeight)
Called when a component's preferred height limits have changed. |
void |
install(Component componentArgument)
Associates a skin with a component. |
protected void |
invalidateComponent()
|
boolean |
isFocusable()
By default, skins are focusable. |
boolean |
isOpaque()
By default, skins are assumed to be opaque. |
boolean |
keyPressed(Component componentArgument,
int keyCode,
Keyboard.KeyLocation keyLocation)
TAB Transfers focus forwardsTAB + SHIFT Transfers focus
backwards |
boolean |
keyReleased(Component componentArgument,
int keyCode,
Keyboard.KeyLocation keyLocation)
Called when a key has been released. |
boolean |
keyTyped(Component componentArgument,
char character)
Called when a key has been typed. |
void |
locationChanged(Component componentArgument,
int previousX,
int previousY)
Called when a component's location has changed. |
void |
menuHandlerChanged(Component componentArgument,
MenuHandler previousMenuHandler)
Called when a component's context menu handler has changed. |
boolean |
mouseClick(Component componentArgument,
Mouse.Button button,
int x,
int y,
int count)
Called when a mouse button is clicked over a component. |
boolean |
mouseDown(Component componentArgument,
Mouse.Button button,
int x,
int y)
Called when a mouse button is pressed over a component. |
boolean |
mouseMove(Component componentArgument,
int x,
int y)
Called when the mouse is moved over a component. |
void |
mouseOut(Component componentArgument)
Called when the mouse exits a component. |
void |
mouseOver(Component componentArgument)
Called when the mouse enters a component. |
boolean |
mouseUp(Component componentArgument,
Mouse.Button button,
int x,
int y)
Called when a mouse button is released over a component. |
boolean |
mouseWheel(Component componentArgument,
Mouse.ScrollType scrollType,
int scrollAmount,
int wheelRotation,
int x,
int y)
Called when the mouse wheel is scrolled over a component. |
void |
nameChanged(Component componentArgument,
String previousName)
Called when a component's name has changed. |
void |
parentChanged(Component componentArgument,
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 componentArgument,
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 widthArgument,
int heightArgument)
|
protected void |
repaintComponent(int x,
int y,
int widthArgument,
int heightArgument,
boolean immediate)
|
void |
setSize(int width,
int height)
Sets the visual's render size. |
void |
sizeChanged(Component componentArgument,
int previousWidth,
int previousHeight)
Called when a component's size has changed. |
void |
tooltipDelayChanged(Component componentArgument,
int previousTooltipDelay)
Called when a component's tooltip delay has changed. |
void |
tooltipTextChanged(Component componentArgument,
String previousTooltipText)
Called when a component's tooltip text has changed. |
void |
tooltipTriggered(Component componentArgument,
int x,
int y)
Called when a tooltip has been triggered over a component. |
void |
visibleChanged(Component componentArgument)
Called when a component's visible flag has changed. |
void |
widthLimitsChanged(Component componentArgument,
int previousMinimumWidth,
int previousMaximumWidth)
Called when a component's preferred width limits have changed. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.apache.pivot.wtk.Skin |
|---|
layout |
| Methods inherited from interface org.apache.pivot.wtk.ConstrainedVisual |
|---|
getPreferredHeight, getPreferredWidth |
| Methods inherited from interface org.apache.pivot.wtk.Visual |
|---|
paint |
| Constructor Detail |
|---|
public ComponentSkin()
| Method Detail |
|---|
public int getWidth()
Visual
getWidth in interface Visualpublic int getHeight()
Visual
getHeight in interface Visual
public void setSize(int width,
int height)
ConstrainedVisual
setSize in interface ConstrainedVisualpublic Dimensions getPreferredSize()
ConstrainedVisual
getPreferredSize in interface ConstrainedVisualpublic final int getBaseline()
Visual
getBaseline in interface Visual
public int getBaseline(int widthArgument,
int heightArgument)
ConstrainedVisual
getBaseline in interface ConstrainedVisualpublic void install(Component componentArgument)
Skin
install in interface SkincomponentArgument - The component to which the skin is being attached.public Component getComponent()
Skin
getComponent in interface Skinpublic boolean isFocusable()
isFocusable in interface Skinpublic boolean isOpaque()
isOpaque in interface Skin
public void parentChanged(Component componentArgument,
Container previousParent)
ComponentListener
parentChanged in interface ComponentListener
public void sizeChanged(Component componentArgument,
int previousWidth,
int previousHeight)
ComponentListener
sizeChanged in interface ComponentListener
public void preferredSizeChanged(Component componentArgument,
int previousPreferredWidth,
int previousPreferredHeight)
ComponentListener
preferredSizeChanged in interface ComponentListener
public void widthLimitsChanged(Component componentArgument,
int previousMinimumWidth,
int previousMaximumWidth)
ComponentListener
widthLimitsChanged in interface ComponentListener
public void heightLimitsChanged(Component componentArgument,
int previousMinimumHeight,
int previousMaximumHeight)
ComponentListener
heightLimitsChanged in interface ComponentListener
public void locationChanged(Component componentArgument,
int previousX,
int previousY)
ComponentListener
locationChanged in interface ComponentListenerpublic void visibleChanged(Component componentArgument)
ComponentListener
visibleChanged in interface ComponentListener
public void cursorChanged(Component componentArgument,
Cursor previousCursor)
ComponentListener
cursorChanged in interface ComponentListener
public void tooltipTextChanged(Component componentArgument,
String previousTooltipText)
ComponentListener
tooltipTextChanged in interface ComponentListener
public void tooltipDelayChanged(Component componentArgument,
int previousTooltipDelay)
ComponentListener
tooltipDelayChanged in interface ComponentListener
public void dragSourceChanged(Component componentArgument,
DragSource previousDragSource)
ComponentListener
dragSourceChanged in interface ComponentListener
public void dropTargetChanged(Component componentArgument,
DropTarget previousDropTarget)
ComponentListener
dropTargetChanged in interface ComponentListener
public void menuHandlerChanged(Component componentArgument,
MenuHandler previousMenuHandler)
ComponentListener
menuHandlerChanged in interface ComponentListener
public void nameChanged(Component componentArgument,
String previousName)
ComponentListener
nameChanged in interface ComponentListenerpublic void enabledChanged(Component componentArgument)
ComponentStateListener Called both when the component is enabled and when it is disabled.
The component's enabled flag has already been set when this
method is called so the new state can be determined by calling the
Component.isEnabled() method.
enabledChanged in interface ComponentStateListenercomponentArgument - The component whose enabled state is changing.
public void focusedChanged(Component componentArgument,
Component obverseComponent)
ComponentStateListener This will be called both when a component gains focus and when it loses
focus. The currently focused component has already been set when this method
is called, so that the new state of the component can be determined by calling
the Component.isFocused() method.
focusedChanged in interface ComponentStateListenercomponentArgument - The component that is either gaining focus or the one that
previously had focus and is now losing it.obverseComponent - If the component is gaining focus, this is the component
that is losing focus. If the component is losing focus
this is the component that is gaining the focus instead.
public boolean mouseMove(Component componentArgument,
int x,
int y)
ComponentMouseListener
mouseMove in interface ComponentMouseListenerpublic void mouseOver(Component componentArgument)
ComponentMouseListener
mouseOver in interface ComponentMouseListenerpublic void mouseOut(Component componentArgument)
ComponentMouseListener
mouseOut in interface ComponentMouseListener
public boolean mouseDown(Component componentArgument,
Mouse.Button button,
int x,
int y)
ComponentMouseButtonListener
mouseDown in interface ComponentMouseButtonListener
public boolean mouseUp(Component componentArgument,
Mouse.Button button,
int x,
int y)
ComponentMouseButtonListener
mouseUp in interface ComponentMouseButtonListener
public boolean mouseClick(Component componentArgument,
Mouse.Button button,
int x,
int y,
int count)
ComponentMouseButtonListener
mouseClick in interface ComponentMouseButtonListener
public boolean mouseWheel(Component componentArgument,
Mouse.ScrollType scrollType,
int scrollAmount,
int wheelRotation,
int x,
int y)
ComponentMouseWheelListener
mouseWheel in interface ComponentMouseWheelListener
public boolean keyTyped(Component componentArgument,
char character)
ComponentKeyListener
keyTyped in interface ComponentKeyListener
public boolean keyPressed(Component componentArgument,
int keyCode,
Keyboard.KeyLocation keyLocation)
TAB Transfers focus forwardsTAB + SHIFT Transfers focus
backwards
keyPressed in interface ComponentKeyListener
public boolean keyReleased(Component componentArgument,
int keyCode,
Keyboard.KeyLocation keyLocation)
ComponentKeyListener
keyReleased in interface ComponentKeyListener
public void tooltipTriggered(Component componentArgument,
int x,
int y)
ComponentTooltipListener
tooltipTriggered in interface ComponentTooltipListenerprotected void invalidateComponent()
protected void repaintComponent()
protected void repaintComponent(boolean immediate)
protected void repaintComponent(Bounds area)
protected void repaintComponent(int x,
int y,
int widthArgument,
int heightArgument)
protected void repaintComponent(int x,
int y,
int widthArgument,
int heightArgument,
boolean immediate)
public static Font decodeFont(String value)
value - Either a JSON dictionary
describing a font relative to the current theme, or
one of the standard Java font specifications.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||