|
||||||||||
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.TerraMenuBarSkin
public class TerraMenuBarSkin
Menu bar 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 | |
---|---|
TerraMenuBarSkin()
|
Method Summary | |
---|---|
void |
activeChanged(MenuBar menuBar)
Called when the menu bar's active state has changed. |
java.awt.Color |
getColor()
|
java.awt.Color |
getDisabledColor()
|
java.awt.Font |
getFont()
|
java.awt.Color |
getHighlightBackgroundColor()
|
java.awt.Color |
getHighlightColor()
|
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()
|
void |
install(Component component)
Associates a skin with a component. |
void |
itemInserted(MenuBar menuBar,
int index)
Called when a menu bar item has been inserted. |
void |
itemsRemoved(MenuBar menuBar,
int index,
Sequence<MenuBar.Item> removed)
Called when menu bar 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 |
setBackgroundColor(int color)
|
void |
setColor(java.awt.Color color)
|
void |
setColor(int color)
|
void |
setColor(java.lang.String color)
|
void |
setDisabledColor(java.awt.Color disabledColor)
|
void |
setDisabledColor(int color)
|
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(int color)
|
void |
setHighlightBackgroundColor(java.lang.String highlightBackgroundColor)
|
void |
setHighlightColor(java.awt.Color highlightColor)
|
void |
setHighlightColor(int color)
|
void |
setHighlightColor(java.lang.String highlightColor)
|
void |
setSpacing(int spacing)
|
void |
uninstall()
Dissociates a skin from a component. |
Methods inherited from class pivot.wtk.skin.ContainerSkin |
---|
componentInserted, componentsRemoved, contextKeyChanged, focusTraversalPolicyChanged, getBackgroundColor, getBackgroundPaint, isFocusable, paint, 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 TerraMenuBarSkin()
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 final void setBackgroundColor(int color)
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 final void setColor(int color)
public java.awt.Color getDisabledColor()
public void setDisabledColor(java.awt.Color disabledColor)
public final void setDisabledColor(java.lang.String disabledColor)
public final void setDisabledColor(int color)
public java.awt.Color getHighlightColor()
public void setHighlightColor(java.awt.Color highlightColor)
public final void setHighlightColor(java.lang.String highlightColor)
public final void setHighlightColor(int color)
public java.awt.Color getHighlightBackgroundColor()
public void setHighlightBackgroundColor(java.awt.Color highlightBackgroundColor)
public final void setHighlightBackgroundColor(java.lang.String highlightBackgroundColor)
public final void setHighlightBackgroundColor(int color)
public int getSpacing()
public void setSpacing(int spacing)
public void itemInserted(MenuBar menuBar, int index)
MenuBarListener
itemInserted
in interface MenuBarListener
public void itemsRemoved(MenuBar menuBar, int index, Sequence<MenuBar.Item> removed)
MenuBarListener
itemsRemoved
in interface MenuBarListener
public void activeChanged(MenuBar menuBar)
MenuBarListener
activeChanged
in interface MenuBarListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |