Package org.apache.pivot.wtk.skin.terra
Class TerraMenuItemSkin
- java.lang.Object
- 
- org.apache.pivot.wtk.skin.ComponentSkin
- 
- org.apache.pivot.wtk.skin.ButtonSkin
- 
- org.apache.pivot.wtk.skin.MenuItemSkin
- 
- org.apache.pivot.wtk.skin.terra.TerraMenuItemSkin
 
 
 
 
- 
- All Implemented Interfaces:
- ButtonListener,- ButtonPressListener,- ButtonStateListener,- ComponentKeyListener,- ComponentListener,- ComponentMouseButtonListener,- ComponentMouseListener,- ComponentMouseWheelListener,- ComponentStateListener,- ComponentTooltipListener,- ConstrainedVisual,- Menu.ItemListener,- Skin,- Visual
 
 public class TerraMenuItemSkin extends MenuItemSkin Terra menu item skin.
- 
- 
Nested Class SummaryNested Classes Modifier and Type Class Description classTerraMenuItemSkin.CheckmarkImage- 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ButtonListenerButtonListener.Adapter, ButtonListener.Listeners
 - 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ButtonPressListenerButtonPressListener.Listeners
 - 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ButtonStateListenerButtonStateListener.Listeners
 - 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentKeyListenerComponentKeyListener.Adapter, ComponentKeyListener.Listeners
 - 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentListenerComponentListener.Adapter, ComponentListener.Listeners
 - 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseButtonListenerComponentMouseButtonListener.Adapter, ComponentMouseButtonListener.Listeners
 - 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseListenerComponentMouseListener.Adapter, ComponentMouseListener.Listeners
 - 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseWheelListenerComponentMouseWheelListener.Listeners
 - 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentStateListenerComponentStateListener.Adapter, ComponentStateListener.Listeners
 - 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentTooltipListenerComponentTooltipListener.Listeners
 - 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.Menu.ItemListenerMenu.ItemListener.Listeners
 
- 
 - 
Field SummaryFields Modifier and Type Field Description static intEXPANDER_ICON_SIZEstatic intEXPANDER_SIZE- 
Fields inherited from class org.apache.pivot.wtk.skin.MenuItemSkinbuttonPressCallback, buttonPressInterval, menuPopup
 - 
Fields inherited from class org.apache.pivot.wtk.skin.ButtonSkinhighlighted
 
- 
 - 
Constructor SummaryConstructors Constructor Description TerraMenuItemSkin()
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description ImagegetCheckmarkImage()java.awt.ColorgetPopupBorderColor()intgetPreferredHeight(int width)Returns the visual's preferred height given the provided width constraint.DimensionsgetPreferredSize()Returns the visual's unconstrained preferred size.intgetPreferredWidth(int height)Returns the visual's preferred width given the provided height constraint.voidinstall(Component component)Must be implemented in every subclass in order to do component-specific operations at instantiation time, but every subclass must call this superclass method to setup the necessary listeners, etc.booleanisOpaque()By default, skins are assumed to be opaque.voidlayout()If the component on which the skin is installed is a container, lays out the container's children.voidpaint(java.awt.Graphics2D graphics)Paints the visual.voidsetPopupBorderColor(java.awt.Color popupBorderColor)voidsetPopupBorderColor(java.lang.String popupBorderColor)- 
Methods inherited from class org.apache.pivot.wtk.skin.MenuItemSkinactiveChanged, buttonPressed, enabledChanged, isFocusable, menuChanged, mouseDown, mouseOut, mouseOver, mouseUp
 - 
Methods inherited from class org.apache.pivot.wtk.skin.ButtonSkinactionChanged, buttonDataChanged, buttonGroupChanged, dataRendererChanged, focusedChanged, stateChanged, toggleButtonChanged, triStateChanged
 - 
Methods inherited from class org.apache.pivot.wtk.skin.ComponentSkincolorFromObject, colorFromObject, colorFromObject, colorFromObject, currentTheme, cursorChanged, decodeFont, defaultBackgroundColor, defaultForegroundColor, dragSourceChanged, dropTargetChanged, fontFromObject, getBaseline, getBaseline, getColor, getComponent, getFocusRectangleStroke, getHeight, getSize, getTextInputMethodListener, getThemeFont, getWidth, heightLimitsChanged, invalidateComponent, keyPressed, keyReleased, keyTyped, locationChanged, menuHandlerChanged, mouseClick, mouseMove, mouseWheel, nameChanged, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, repaintComponent, repaintComponent, setDefaultStyles, setSize, sizeChanged, themeHasThickFocusRectangle, themeHasTransitionEnabled, themeIsDark, themeIsFlat, tooltipDelayChanged, tooltipTextChanged, tooltipTriggered, visibleChanged, widthLimitsChanged
 - 
Methods inherited from class java.lang.Objectclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.apache.pivot.wtk.ConstrainedVisualsetSize
 
- 
 
- 
- 
- 
Field Detail- 
EXPANDER_SIZEpublic static final int EXPANDER_SIZE - See Also:
- Constant Field Values
 
 - 
EXPANDER_ICON_SIZEpublic static final int EXPANDER_ICON_SIZE - See Also:
- Constant Field Values
 
 
- 
 - 
Method Detail- 
installpublic void install(Component component) Description copied from class:ComponentSkinMust be implemented in every subclass in order to do component-specific operations at instantiation time, but every subclass must call this superclass method to setup the necessary listeners, etc.- Specified by:
- installin interface- Skin
- Overrides:
- installin class- MenuItemSkin
- Parameters:
- component- The component to which the skin is being attached.
 
 - 
getPreferredWidthpublic int getPreferredWidth(int height) Description copied from interface:ConstrainedVisualReturns the visual's preferred width given the provided height constraint.- Parameters:
- height- The height by which to constrain the preferred width, or- -1for no constraint.
- Returns:
- The preferred width given the height constraint.
 
 - 
getPreferredHeightpublic int getPreferredHeight(int width) Description copied from interface:ConstrainedVisualReturns the visual's preferred height given the provided width constraint.- Parameters:
- width- The width by which to constrain the preferred height, or- -1for no constraint.
- Returns:
- The preferred height given the width constraint.
 
 - 
getPreferredSizepublic Dimensions getPreferredSize() Description copied from interface:ConstrainedVisualReturns the visual's unconstrained preferred size.- Specified by:
- getPreferredSizein interface- ConstrainedVisual
- Overrides:
- getPreferredSizein class- ComponentSkin
- Returns:
- The preferred size (width and height) of this component.
 Depending on the component this can be a static value or derived (as for a container) from its subcomponents, etc. The default implementation simply calls ConstrainedVisual.getPreferredWidth(int)andConstrainedVisual.getPreferredHeight(int).
 
 - 
layoutpublic void layout() Description copied from interface:SkinIf the component on which the skin is installed is a container, lays out the container's children.- Specified by:
- layoutin interface- Skin
- Overrides:
- layoutin class- ButtonSkin
 
 - 
paintpublic void paint(java.awt.Graphics2D graphics) Description copied from interface:VisualPaints the visual.- Parameters:
- graphics- The graphics context in which to paint the visual.
 
 - 
isOpaquepublic boolean isOpaque() Description copied from class:ComponentSkinBy default, skins are assumed to be opaque.- Specified by:
- isOpaquein interface- Skin
- Overrides:
- isOpaquein class- ComponentSkin
- Returns:
- trueif this skin is opaque;- falseif any part of it is transparent or translucent.
 
 - 
getCheckmarkImagepublic Image getCheckmarkImage() 
 - 
getPopupBorderColorpublic java.awt.Color getPopupBorderColor() 
 - 
setPopupBorderColorpublic void setPopupBorderColor(java.awt.Color popupBorderColor) 
 - 
setPopupBorderColorpublic void setPopupBorderColor(java.lang.String popupBorderColor) 
 
- 
 
-