|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.pivot.wtk.skin.ComponentSkin
org.apache.pivot.wtk.skin.ContainerSkin
org.apache.pivot.wtk.skin.terra.TerraSpinnerSkin
public class TerraSpinnerSkin
Spinner skin.
| Nested Class Summary | |
|---|---|
protected class |
TerraSpinnerSkin.SpinButton
Spinner button. |
protected class |
TerraSpinnerSkin.SpinButtonImage
Abstract base class for button images. |
protected class |
TerraSpinnerSkin.SpinButtonSkin
Spinner button skin. |
protected class |
TerraSpinnerSkin.SpinDownImage
|
protected class |
TerraSpinnerSkin.SpinnerContent
Component that holds the content of a spinner. |
protected class |
TerraSpinnerSkin.SpinnerContentSkin
SpinnerContent skin. |
protected class |
TerraSpinnerSkin.SpinUpImage
|
| Nested classes/interfaces inherited from class org.apache.pivot.wtk.skin.ContainerSkin |
|---|
ContainerSkin.IndexFocusTraversalPolicy |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.SpinnerListener |
|---|
SpinnerListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.SpinnerSelectionListener |
|---|
SpinnerSelectionListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ContainerListener |
|---|
ContainerListener.Adapter |
| Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ContainerMouseListener |
|---|
ContainerMouseListener.Adapter |
| 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 |
| Field Summary | |
|---|---|
static int |
BUTTON_IMAGE_SIZE
|
| Constructor Summary | |
|---|---|
TerraSpinnerSkin()
|
|
| Method Summary | |
|---|---|
void |
circularChanged(Spinner spinner)
Called when a spinner's circular property has changed. |
void |
enabledChanged(Component component)
Called when a component's enabled state has changed. |
int |
getBaseline(int width,
int height)
Returns the baseline for a given width and height. |
Color |
getBorderColor()
|
Color |
getButtonBackgroundColor()
|
Color |
getButtonColor()
|
Color |
getColor()
|
Bounds |
getContentBounds()
|
Color |
getDisabledColor()
|
Font |
getFont()
|
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. |
protected void |
invalidateContent()
|
boolean |
isSizeToContent()
|
void |
itemRendererChanged(Spinner spinner,
Spinner.ItemRenderer previousItemRenderer)
Called when a spinner's item renderer has changed. |
void |
layout()
If the component on which the skin is installed is a container, lays out the container's children. |
boolean |
mouseClick(Component component,
Mouse.Button button,
int x,
int y,
int count)
Called when a mouse button is clicked over a component. |
void |
paint(Graphics2D graphics)
Paints the visual. |
void |
selectedIndexChanged(Spinner spinner,
int previousSelectedIndex)
Called when a spinner's selected index has changed. |
void |
selectedItemChanged(Spinner spinner,
Object previousSelectedItem)
Called when a spinners's selected item has changed. |
void |
setBorderColor(Color borderColor)
|
void |
setBorderColor(String borderColor)
|
void |
setButtonBackgroundColor(Color buttonBackgroundColor)
|
void |
setButtonBackgroundColor(String buttonBackgroundColor)
|
void |
setButtonColor(String buttonColor)
|
void |
setButtonImageColor(Color buttonColor)
|
void |
setColor(Color color)
|
void |
setColor(String color)
|
void |
setDisabledColor(Color disabledColor)
|
void |
setDisabledColor(String disabledColor)
|
void |
setFont(Dictionary<String,?> font)
|
void |
setFont(Font font)
|
void |
setFont(String font)
|
void |
setSize(int width,
int height)
Sets the visual's render size. |
void |
setSizeToContent(boolean sizeToContent)
|
void |
spinnerDataChanged(Spinner spinner,
List<?> previousSpinnerData)
Called when a spinner's data has changed. |
| Methods inherited from class org.apache.pivot.wtk.skin.ContainerSkin |
|---|
componentInserted, componentMoved, componentsRemoved, focusTraversalPolicyChanged, getBackgroundColor, getBackgroundPaint, isFocusable, isOpaque, mouseDown, mouseMove, mouseUp, mouseWheel, setBackgroundColor, setBackgroundColor, setBackgroundPaint, setBackgroundPaint, setBackgroundPaint |
| Methods inherited from class org.apache.pivot.wtk.skin.ComponentSkin |
|---|
cursorChanged, decodeFont, dragSourceChanged, dropTargetChanged, focusedChanged, getBaseline, getComponent, getHeight, getPreferredSize, getWidth, heightLimitsChanged, invalidateComponent, keyPressed, keyReleased, keyTyped, locationChanged, menuHandlerChanged, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, mouseWheel, nameChanged, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, repaintComponent, repaintComponent, sizeChanged, tooltipDelayChanged, tooltipTextChanged, tooltipTriggered, visibleChanged, widthLimitsChanged |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final int BUTTON_IMAGE_SIZE
| Constructor Detail |
|---|
public TerraSpinnerSkin()
| Method Detail |
|---|
public void setSize(int width,
int height)
ConstrainedVisual
setSize in interface ConstrainedVisualsetSize in class ComponentSkinpublic void install(Component component)
Skin
install in interface Skininstall in class ContainerSkincomponent - The component to which the skin is being attached.public int getPreferredWidth(int height)
ConstrainedVisual
getPreferredWidth in interface ConstrainedVisualgetPreferredWidth in class ContainerSkinheight - The height by which to constrain the preferred width, or -1
for no constraint.public int getPreferredHeight(int width)
ConstrainedVisual
getPreferredHeight in interface ConstrainedVisualgetPreferredHeight in class ContainerSkinwidth - The width by which to constrain the preferred height, or -1
for no constraint.
public int getBaseline(int width,
int height)
ConstrainedVisual
getBaseline in interface ConstrainedVisualgetBaseline in class ComponentSkinpublic void layout()
Skin
layout in interface Skinpublic void paint(Graphics2D graphics)
Visual
paint in interface Visualpaint in class ContainerSkingraphics - The graphics context in which to paint the visual.public void enabledChanged(Component component)
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 ComponentStateListenerenabledChanged in class ComponentSkincomponent - The component whose enabled state is changing.
public boolean mouseClick(Component component,
Mouse.Button button,
int x,
int y,
int count)
ComponentMouseButtonListener
mouseClick in interface ComponentMouseButtonListenermouseClick in class ComponentSkinprotected void invalidateContent()
public Color getColor()
public void setColor(Color color)
public final void setColor(String color)
public Color getDisabledColor()
public void setDisabledColor(Color disabledColor)
public final void setDisabledColor(String disabledColor)
public Color getBorderColor()
public void setBorderColor(Color borderColor)
public final void setBorderColor(String borderColor)
public Color getButtonColor()
public void setButtonImageColor(Color buttonColor)
public final void setButtonColor(String buttonColor)
public Color getButtonBackgroundColor()
public void setButtonBackgroundColor(Color buttonBackgroundColor)
public final void setButtonBackgroundColor(String buttonBackgroundColor)
public Font getFont()
public void setFont(Font font)
public final void setFont(String font)
public final void setFont(Dictionary<String,?> font)
public boolean isSizeToContent()
public void setSizeToContent(boolean sizeToContent)
public Bounds getContentBounds()
getContentBounds in interface Spinner.Skin
public void spinnerDataChanged(Spinner spinner,
List<?> previousSpinnerData)
SpinnerListener
spinnerDataChanged in interface SpinnerListener
public void itemRendererChanged(Spinner spinner,
Spinner.ItemRenderer previousItemRenderer)
SpinnerListener
itemRendererChanged in interface SpinnerListenerpublic void circularChanged(Spinner spinner)
SpinnerListener
circularChanged in interface SpinnerListener
public void selectedIndexChanged(Spinner spinner,
int previousSelectedIndex)
SpinnerSelectionListener
selectedIndexChanged in interface SpinnerSelectionListenerspinner - The source of the event.previousSelectedIndex - If the selection changed directly, contains the index that was previously
selected. Otherwise, contains the current selection.
public void selectedItemChanged(Spinner spinner,
Object previousSelectedItem)
SpinnerSelectionListener
selectedItemChanged in interface SpinnerSelectionListenerspinner - The source of the event.previousSelectedItem - The item that was previously selected, or null if the previous selection
cannot be determined.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||