|
||||||||||
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.ButtonSkin
org.apache.pivot.wtk.skin.MenuButtonSkin
org.apache.pivot.wtk.skin.terra.TerraMenuButtonSkin
public class TerraMenuButtonSkin
Terra menu button skin.
Nested Class Summary |
---|
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ButtonListener |
---|
ButtonListener.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 |
---|
Fields inherited from class org.apache.pivot.wtk.skin.MenuButtonSkin |
---|
menuPopup, pressed |
Fields inherited from class org.apache.pivot.wtk.skin.ButtonSkin |
---|
highlighted |
Fields inherited from class org.apache.pivot.wtk.skin.ComponentSkin |
---|
SHOW_TOOLTIP_TIMEOUT |
Constructor Summary | |
---|---|
TerraMenuButtonSkin()
|
Method Summary | |
---|---|
void |
buttonPressed(Button button)
Called when a button is pressed. |
Color |
getBackgroundColor()
|
int |
getBaseline(int width,
int height)
Returns the baseline for a given width and height. |
Color |
getBorderColor()
|
Color |
getColor()
|
Color |
getDisabledBackgroundColor()
|
Color |
getDisabledBorderColor()
|
Color |
getDisabledColor()
|
Font |
getFont()
|
Insets |
getPadding()
|
int |
getPreferredHeight(int width)
Returns the visual's preferred height given the provided width constraint. |
Dimensions |
getPreferredSize()
Returns the visual's unconstrained preferred size. |
int |
getPreferredWidth(int height)
Returns the visual's preferred width given the provided height constraint. |
int |
getSpacing()
|
boolean |
isFocusable()
By default, components are focusable. |
boolean |
isToolbar()
|
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 |
mouseOut(Component component)
Called when the mouse exits a component. |
void |
paint(Graphics2D graphics)
Paints the visual. |
void |
setBackgroundColor(Color backgroundColor)
|
void |
setBackgroundColor(String backgroundColor)
|
void |
setBorderColor(Color borderColor)
|
void |
setBorderColor(String borderColor)
|
void |
setColor(Color color)
|
void |
setColor(String color)
|
void |
setDisabledBackgroundColor(Color disabledBackgroundColor)
|
void |
setDisabledBackgroundColor(String disabledBackgroundColor)
|
void |
setDisabledBorderColor(Color disabledBorderColor)
|
void |
setDisabledBorderColor(String disabledBorderColor)
|
void |
setDisabledColor(Color disabledColor)
|
void |
setDisabledColor(String disabledColor)
|
void |
setFont(Dictionary<String,?> font)
|
void |
setFont(Font font)
|
void |
setFont(String font)
|
void |
setPadding(Dictionary<String,?> padding)
|
void |
setPadding(Insets padding)
|
void |
setPadding(int padding)
|
void |
setPadding(Number padding)
|
void |
setPadding(String padding)
|
void |
setSpacing(int spacing)
|
void |
setSpacing(Number spacing)
|
void |
setToolbar(boolean toolbar)
|
Methods inherited from class org.apache.pivot.wtk.skin.MenuButtonSkin |
---|
enabledChanged, focusedChanged, install, keyPressed, keyReleased, menuChanged, mouseDown, mouseUp, repeatableChanged |
Methods inherited from class org.apache.pivot.wtk.skin.ButtonSkin |
---|
actionChanged, buttonDataChanged, buttonGroupChanged, dataRendererChanged, mouseOver, selectedKeyChanged, stateChanged, stateKeyChanged, toggleButtonChanged, triStateChanged |
Methods inherited from class org.apache.pivot.wtk.skin.ComponentSkin |
---|
cursorChanged, decodeFont, dragSourceChanged, dropTargetChanged, getBaseline, getComponent, getHeight, getWidth, invalidateComponent, isOpaque, keyTyped, locationChanged, menuHandlerChanged, mouseMove, mouseWheel, parentChanged, preferredHeightLimitsChanged, preferredSizeChanged, preferredWidthLimitsChanged, repaintComponent, repaintComponent, 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 |
Constructor Detail |
---|
public TerraMenuButtonSkin()
Method Detail |
---|
public int getPreferredWidth(int height)
ConstrainedVisual
height
- The height by which to constrain the preferred width, or -1
for no constraint.public int getPreferredHeight(int width)
ConstrainedVisual
width
- The width by which to constrain the preferred height, or -1
for no constraint.public Dimensions getPreferredSize()
ConstrainedVisual
getPreferredSize
in interface ConstrainedVisual
getPreferredSize
in class ComponentSkin
public int getBaseline(int width, int height)
ConstrainedVisual
getBaseline
in interface ConstrainedVisual
getBaseline
in class ComponentSkin
public void layout()
Skin
layout
in interface Skin
layout
in class ButtonSkin
public void paint(Graphics2D graphics)
Visual
graphics
- The graphics context in which to paint the visual.public boolean isFocusable()
ComponentSkin
isFocusable
in interface Skin
isFocusable
in class ComponentSkin
public Font getFont()
public void setFont(Font font)
public final void setFont(String font)
public final void setFont(Dictionary<String,?> font)
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 getBackgroundColor()
public void setBackgroundColor(Color backgroundColor)
public final void setBackgroundColor(String backgroundColor)
public Color getDisabledBackgroundColor()
public void setDisabledBackgroundColor(Color disabledBackgroundColor)
public final void setDisabledBackgroundColor(String disabledBackgroundColor)
public Color getBorderColor()
public void setBorderColor(Color borderColor)
public final void setBorderColor(String borderColor)
public Color getDisabledBorderColor()
public void setDisabledBorderColor(Color disabledBorderColor)
public final void setDisabledBorderColor(String disabledBorderColor)
public Insets getPadding()
public void setPadding(Insets padding)
public final void setPadding(Dictionary<String,?> padding)
public final void setPadding(int padding)
public final void setPadding(Number padding)
public final void setPadding(String padding)
public int getSpacing()
public void setSpacing(int spacing)
public final void setSpacing(Number spacing)
public boolean isToolbar()
public void setToolbar(boolean toolbar)
public void mouseOut(Component component)
ComponentMouseListener
mouseOut
in interface ComponentMouseListener
mouseOut
in class MenuButtonSkin
public boolean mouseClick(Component component, Mouse.Button button, int x, int y, int count)
ComponentMouseButtonListener
mouseClick
in interface ComponentMouseButtonListener
mouseClick
in class MenuButtonSkin
public void buttonPressed(Button button)
ButtonPressListener
buttonPressed
in interface ButtonPressListener
buttonPressed
in class ButtonSkin
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |