|
||||||||||
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.TerraMenuBarSkin
public class TerraMenuBarSkin
Menu bar skin.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class org.apache.pivot.wtk.skin.ContainerSkin |
---|
ContainerSkin.IndexFocusTraversalPolicy |
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.ComponentSkin |
---|
SHOW_TOOLTIP_TIMEOUT |
Constructor Summary | |
---|---|
TerraMenuBarSkin()
|
Method Summary | |
---|---|
void |
activeItemChanged(MenuBar menuBar,
MenuBar.Item previousActiveItem)
Called when a menu bar's active item has changed. |
Color |
getActiveBackgroundColor()
|
Color |
getActiveColor()
|
Color |
getColor()
|
Color |
getDisabledColor()
|
Font |
getFont()
|
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 |
setActiveBackgroundColor(Color activeBackgroundColor)
|
void |
setActiveBackgroundColor(int color)
|
void |
setActiveBackgroundColor(String activeBackgroundColor)
|
void |
setActiveColor(Color activeColor)
|
void |
setActiveColor(int color)
|
void |
setActiveColor(String activeColor)
|
void |
setBackgroundColor(int color)
|
void |
setColor(Color color)
|
void |
setColor(int color)
|
void |
setColor(String color)
|
void |
setDisabledColor(Color disabledColor)
|
void |
setDisabledColor(int color)
|
void |
setDisabledColor(String disabledColor)
|
void |
setFont(Font font)
|
void |
setFont(String font)
|
void |
setSpacing(int spacing)
|
void |
uninstall()
Dissociates a skin from a component. |
Methods inherited from class org.apache.pivot.wtk.skin.ContainerSkin |
---|
componentInserted, componentsRemoved, contextKeyChanged, focusTraversalPolicyChanged, getBackgroundColor, getBackgroundPaint, isFocusable, isOpaque, paint, setBackgroundColor, setBackgroundColor, setBackgroundPaint, setBackgroundPaint |
Methods inherited from class org.apache.pivot.wtk.skin.ComponentSkin |
---|
cursorChanged, dragSourceChanged, dropTargetChanged, enabledChanged, focusedChanged, getComponent, getHeight, getWidth, invalidateComponent, keyPressed, keyReleased, keyTyped, locationChanged, menuHandlerChanged, mouseClick, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, 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 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 Font getFont()
public void setFont(Font font)
public final void setFont(String font)
public Color getColor()
public void setColor(Color color)
public final void setColor(String color)
public final void setColor(int color)
public Color getDisabledColor()
public void setDisabledColor(Color disabledColor)
public final void setDisabledColor(String disabledColor)
public final void setDisabledColor(int color)
public Color getActiveColor()
public void setActiveColor(Color activeColor)
public final void setActiveColor(String activeColor)
public final void setActiveColor(int color)
public Color getActiveBackgroundColor()
public void setActiveBackgroundColor(Color activeBackgroundColor)
public final void setActiveBackgroundColor(String activeBackgroundColor)
public final void setActiveBackgroundColor(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 activeItemChanged(MenuBar menuBar, MenuBar.Item previousActiveItem)
MenuBarListener
activeItemChanged
in interface MenuBarListener
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |