|
||||||||||
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
pivot.wtk.skin.terra.TerraMenuSkin
public class TerraMenuSkin
Menu skin.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class pivot.wtk.skin.ContainerSkin |
---|
ContainerSkin.IndexFocusTraversalPolicy |
Field Summary |
---|
Fields inherited from class pivot.wtk.skin.ComponentSkin |
---|
SHOW_TOOLTIP_TIMEOUT |
Constructor Summary | |
---|---|
TerraMenuSkin()
|
Method Summary | |
---|---|
java.awt.Color |
getColor()
|
java.awt.Color |
getDisabledColor()
|
java.awt.Font |
getFont()
|
java.awt.Color |
getHighlightBackgroundColor()
|
java.awt.Color |
getHighlightColor()
|
int |
getMargin()
|
java.awt.Color |
getMarginColor()
|
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 |
getSectionSpacing()
|
java.awt.Color |
getSeparatorColor()
|
boolean |
getShowKeyboardShortcuts()
|
void |
install(Component component)
Associates a skin with a component. |
void |
itemInserted(Menu.Section section,
int index)
Called when a menu item has been inserted. |
void |
itemsRemoved(Menu.Section section,
int index,
Sequence<Menu.Item> removed)
Called when menu items have been removed. |
void |
layout()
If the component on which the skin is installed is a container, lays out the container's children. |
void |
paint(java.awt.Graphics2D graphics)
Paints the visual. |
void |
sectionInserted(Menu menu,
int index)
Called when a menu section has been inserted. |
void |
sectionsRemoved(Menu menu,
int index,
Sequence<Menu.Section> removed)
Called when menu sections have been removed. |
void |
setColor(java.awt.Color color)
|
void |
setColor(java.lang.String color)
|
void |
setDisabledColor(java.awt.Color disabledColor)
|
void |
setDisabledColor(java.lang.String disabledColor)
|
void |
setFont(java.awt.Font font)
|
void |
setFont(java.lang.String font)
|
void |
setHighlightBackgroundColor(java.awt.Color highlightBackgroundColor)
|
void |
setHighlightBackgroundColor(java.lang.String highlightBackgroundColor)
|
void |
setHighlightColor(java.awt.Color highlightColor)
|
void |
setHighlightColor(java.lang.String highlightColor)
|
void |
setMargin(int margin)
|
void |
setMarginColor(java.awt.Color marginColor)
|
void |
setSectionSpacing(int sectionSpacing)
|
void |
setSeparatorColor(java.awt.Color separatorColor)
|
void |
setShowKeyboardShortcuts(boolean showKeyboardShortcuts)
|
void |
uninstall()
Dissociates a skin from a component. |
Methods inherited from class pivot.wtk.skin.ContainerSkin |
---|
componentInserted, componentsRemoved, contextKeyChanged, focusTraversalPolicyChanged, getBackgroundColor, getBackgroundPaint, isFocusable, setBackgroundColor, setBackgroundColor, setBackgroundPaint |
Methods inherited from class pivot.wtk.skin.ComponentSkin |
---|
cursorChanged, decodeColor, displayableChanged, enabledChanged, focusedChanged, getComponent, getHeight, 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 |
Constructor Detail |
---|
public TerraMenuSkin()
Method Detail |
---|
public void install(Component component)
Skin
install
in interface Skin
install
in class ContainerSkin
component
- The component to which the skin is being attached.public void uninstall()
Skin
uninstall
in interface Skin
uninstall
in class ContainerSkin
public int getPreferredWidth(int height)
ConstrainedVisual
getPreferredWidth
in interface ConstrainedVisual
getPreferredWidth
in class ContainerSkin
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
getPreferredHeight
in class ContainerSkin
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 void layout()
Skin
layout
in interface Skin
public void paint(java.awt.Graphics2D graphics)
Visual
paint
in interface Visual
paint
in class ContainerSkin
graphics
- The graphics context in which to paint the visual.public java.awt.Font getFont()
public void setFont(java.awt.Font font)
public final void setFont(java.lang.String font)
public java.awt.Color getColor()
public void setColor(java.awt.Color color)
public final void setColor(java.lang.String color)
public java.awt.Color getDisabledColor()
public void setDisabledColor(java.awt.Color disabledColor)
public final void setDisabledColor(java.lang.String disabledColor)
public java.awt.Color getHighlightColor()
public void setHighlightColor(java.awt.Color highlightColor)
public final void setHighlightColor(java.lang.String highlightColor)
public java.awt.Color getHighlightBackgroundColor()
public void setHighlightBackgroundColor(java.awt.Color highlightBackgroundColor)
public final void setHighlightBackgroundColor(java.lang.String highlightBackgroundColor)
public java.awt.Color getMarginColor()
public void setMarginColor(java.awt.Color marginColor)
public int getMargin()
public void setMargin(int margin)
public java.awt.Color getSeparatorColor()
public void setSeparatorColor(java.awt.Color separatorColor)
public int getSectionSpacing()
public void setSectionSpacing(int sectionSpacing)
public boolean getShowKeyboardShortcuts()
public void setShowKeyboardShortcuts(boolean showKeyboardShortcuts)
public void sectionInserted(Menu menu, int index)
MenuListener
sectionInserted
in interface MenuListener
public void sectionsRemoved(Menu menu, int index, Sequence<Menu.Section> removed)
MenuListener
sectionsRemoved
in interface MenuListener
public void itemInserted(Menu.Section section, int index)
MenuListener
itemInserted
in interface MenuListener
public void itemsRemoved(Menu.Section section, int index, Sequence<Menu.Item> removed)
MenuListener
itemsRemoved
in interface MenuListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |