Package org.apache.pivot.wtk.skin.terra
Class TerraListButtonSkin
- java.lang.Object
-
- org.apache.pivot.wtk.skin.ComponentSkin
-
- org.apache.pivot.wtk.skin.ButtonSkin
-
- org.apache.pivot.wtk.skin.ListButtonSkin
-
- org.apache.pivot.wtk.skin.terra.TerraListButtonSkin
-
- All Implemented Interfaces:
ButtonListener
,ButtonPressListener
,ButtonStateListener
,ComponentKeyListener
,ComponentListener
,ComponentMouseButtonListener
,ComponentMouseListener
,ComponentMouseWheelListener
,ComponentStateListener
,ComponentTooltipListener
,ConstrainedVisual
,ListButton.Skin
,ListButtonListener
,ListButtonSelectionListener
,Skin
,Visual
public class TerraListButtonSkin extends ListButtonSkin
Terra list button skin.
-
-
Nested Class Summary
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ButtonListener
ButtonListener.Adapter, ButtonListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ButtonPressListener
ButtonPressListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ButtonStateListener
ButtonStateListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentKeyListener
ComponentKeyListener.Adapter, ComponentKeyListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentListener
ComponentListener.Adapter, ComponentListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseButtonListener
ComponentMouseButtonListener.Adapter, ComponentMouseButtonListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseListener
ComponentMouseListener.Adapter, ComponentMouseListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentMouseWheelListener
ComponentMouseWheelListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentStateListener
ComponentStateListener.Adapter, ComponentStateListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ComponentTooltipListener
ComponentTooltipListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ListButtonListener
ListButtonListener.Adapter, ListButtonListener.Listeners
-
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ListButtonSelectionListener
ListButtonSelectionListener.Adapter, ListButtonSelectionListener.Listeners
-
-
Field Summary
-
Fields inherited from class org.apache.pivot.wtk.skin.ListButtonSkin
listView, listViewPopup, pressed
-
Fields inherited from class org.apache.pivot.wtk.skin.ButtonSkin
highlighted
-
-
Constructor Summary
Constructors Constructor Description TerraListButtonSkin()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description java.awt.Color
getBackgroundColor()
int
getBaseline(int width, int height)
Should be implemented in every subclass.java.awt.Color
getBorderColor()
int
getCloseTransitionDuration()
int
getCloseTransitionRate()
java.awt.Color
getColor()
java.awt.Color
getDisabledBackgroundColor()
java.awt.Color
getDisabledBorderColor()
java.awt.Color
getDisabledColor()
java.awt.Font
getFont()
java.lang.Object
getListBackgroundColor()
java.lang.Object
getListColor()
java.lang.Object
getListDisabledColor()
java.lang.Object
getListFont()
java.lang.Object
getListHighlightBackgroundColor()
java.lang.Object
getListHighlightColor()
java.lang.Object
getListInactiveSelectionBackgroundColor()
java.lang.Object
getListInactiveSelectionColor()
java.lang.Object
getListSelectionBackgroundColor()
java.lang.Object
getListSelectionColor()
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.Bounds
getTriggerBounds()
void
layout()
If the component on which the skin is installed is a container, lays out the container's children.boolean
mouseMove(Component component, int x, int y)
Called when the mouse is moved over a component.void
paint(java.awt.Graphics2D graphics)
Paints the visual.void
setBackgroundColor(int backgroundColor)
void
setBackgroundColor(java.awt.Color backgroundColor)
void
setBackgroundColor(java.lang.String backgroundColor)
void
setBorderColor(int borderColor)
void
setBorderColor(java.awt.Color borderColor)
void
setBorderColor(java.lang.String borderColor)
void
setCloseTransitionDuration(int closeTransitionDuration)
void
setCloseTransitionRate(int closeTransitionRate)
void
setColor(int color)
void
setColor(java.awt.Color color)
void
setColor(java.lang.String color)
void
setDisabledBackgroundColor(int disabledBackgroundColor)
void
setDisabledBackgroundColor(java.awt.Color disabledBackgroundColor)
void
setDisabledBackgroundColor(java.lang.String disabledBackgroundColor)
void
setDisabledBorderColor(int disabledBorderColor)
void
setDisabledBorderColor(java.awt.Color disabledBorderColor)
void
setDisabledBorderColor(java.lang.String disabledBorderColor)
void
setDisabledColor(int disabledColor)
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
setFont(Dictionary<java.lang.String,?> font)
void
setListBackgroundColor(java.lang.Object listBackgroundColor)
void
setListColor(java.lang.Object listColor)
void
setListDisabledColor(java.lang.Object listDisabledColor)
void
setListFont(java.lang.Object listFont)
void
setListHighlightBackgroundColor(java.lang.Object listHighlightBackgroundColor)
void
setListHighlightColor(java.lang.Object listHighlightColor)
void
setListInactiveSelectionBackgroundColor(java.lang.Object listInactiveSelectionBackgroundColor)
void
setListInactiveSelectionColor(java.lang.Object listInactiveSelectionColor)
void
setListSelectionBackgroundColor(java.lang.Object listSelectionBackgroundColor)
void
setListSelectionColor(java.lang.Object listSelectionColor)
void
setPadding(int padding)
void
setPadding(java.lang.Number padding)
void
setPadding(java.lang.String padding)
void
setPadding(Dictionary<java.lang.String,?> padding)
void
setPadding(Sequence<?> padding)
void
setPadding(Insets padding)
-
Methods inherited from class org.apache.pivot.wtk.skin.ListButtonSkin
disabledItemFilterChanged, enabledChanged, focusedChanged, getListViewPopup, install, itemRendererChanged, keyPressed, keyReleased, keyTyped, listDataChanged, listSizeChanged, mouseClick, mouseDown, mouseOut, mouseUp, repeatableChanged, selectedIndexChanged, selectedItemChanged
-
Methods inherited from class org.apache.pivot.wtk.skin.ButtonSkin
actionChanged, buttonDataChanged, buttonGroupChanged, buttonPressed, dataRendererChanged, mouseOver, stateChanged, toggleButtonChanged, triStateChanged
-
Methods inherited from class org.apache.pivot.wtk.skin.ComponentSkin
colorFromObject, colorFromObject, colorFromObject, colorFromObject, currentTheme, cursorChanged, decodeFont, defaultBackgroundColor, defaultForegroundColor, dragSourceChanged, dropTargetChanged, fontFromObject, getBaseline, getColor, getComponent, getFocusRectangleStroke, getHeight, getSize, getTextInputMethodListener, getThemeFont, getWidth, heightLimitsChanged, invalidateComponent, isFocusable, isOpaque, locationChanged, menuHandlerChanged, 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.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.apache.pivot.wtk.ConstrainedVisual
setSize
-
-
-
-
Method Detail
-
getPreferredWidth
public int getPreferredWidth(int height)
Description copied from interface:ConstrainedVisual
Returns the visual's preferred width given the provided height constraint.- Parameters:
height
- The height by which to constrain the preferred width, or-1
for no constraint.- Returns:
- The preferred width given the height constraint.
-
getPreferredHeight
public int getPreferredHeight(int width)
Description copied from interface:ConstrainedVisual
Returns the visual's preferred height given the provided width constraint.- Parameters:
width
- The width by which to constrain the preferred height, or-1
for no constraint.- Returns:
- The preferred height given the width constraint.
-
getPreferredSize
public Dimensions getPreferredSize()
Description copied from interface:ConstrainedVisual
Returns the visual's unconstrained preferred size.- Specified by:
getPreferredSize
in interfaceConstrainedVisual
- Overrides:
getPreferredSize
in classComponentSkin
- 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)
.
-
getBaseline
public int getBaseline(int width, int height)
Description copied from class:ComponentSkin
Should be implemented in every subclass.The default implementation here simply returns -1 (no baseline).
- Specified by:
getBaseline
in interfaceConstrainedVisual
- Overrides:
getBaseline
in classComponentSkin
- Parameters:
width
- Constrained width to compute the baseline for.height
- Constrained height to compute the baseline for.- Returns:
- The baseline relative to the origin of this visual, or
-1
if this visual does not have a baseline.
-
layout
public void layout()
Description copied from interface:Skin
If the component on which the skin is installed is a container, lays out the container's children.- Specified by:
layout
in interfaceSkin
- Overrides:
layout
in classButtonSkin
-
paint
public void paint(java.awt.Graphics2D graphics)
Description copied from interface:Visual
Paints the visual.- Parameters:
graphics
- The graphics context in which to paint the visual.
-
getTriggerBounds
public Bounds getTriggerBounds()
- Specified by:
getTriggerBounds
in classListButtonSkin
-
getFont
public java.awt.Font getFont()
-
setFont
public void setFont(java.awt.Font font)
-
setFont
public final void setFont(java.lang.String font)
-
setFont
public final void setFont(Dictionary<java.lang.String,?> font)
-
getColor
public java.awt.Color getColor()
-
setColor
public void setColor(java.awt.Color color)
-
setColor
public final void setColor(java.lang.String color)
-
setColor
public final void setColor(int color)
-
getDisabledColor
public java.awt.Color getDisabledColor()
-
setDisabledColor
public void setDisabledColor(java.awt.Color disabledColor)
-
setDisabledColor
public final void setDisabledColor(java.lang.String disabledColor)
-
setDisabledColor
public final void setDisabledColor(int disabledColor)
-
getBackgroundColor
public java.awt.Color getBackgroundColor()
-
setBackgroundColor
public void setBackgroundColor(java.awt.Color backgroundColor)
-
setBackgroundColor
public final void setBackgroundColor(java.lang.String backgroundColor)
-
setBackgroundColor
public final void setBackgroundColor(int backgroundColor)
-
getDisabledBackgroundColor
public java.awt.Color getDisabledBackgroundColor()
-
setDisabledBackgroundColor
public void setDisabledBackgroundColor(java.awt.Color disabledBackgroundColor)
-
setDisabledBackgroundColor
public final void setDisabledBackgroundColor(java.lang.String disabledBackgroundColor)
-
setDisabledBackgroundColor
public final void setDisabledBackgroundColor(int disabledBackgroundColor)
-
getBorderColor
public java.awt.Color getBorderColor()
-
setBorderColor
public void setBorderColor(java.awt.Color borderColor)
-
setBorderColor
public final void setBorderColor(java.lang.String borderColor)
-
setBorderColor
public final void setBorderColor(int borderColor)
-
getDisabledBorderColor
public java.awt.Color getDisabledBorderColor()
-
setDisabledBorderColor
public void setDisabledBorderColor(java.awt.Color disabledBorderColor)
-
setDisabledBorderColor
public final void setDisabledBorderColor(java.lang.String disabledBorderColor)
-
setDisabledBorderColor
public final void setDisabledBorderColor(int disabledBorderColor)
-
getPadding
public Insets getPadding()
-
setPadding
public void setPadding(Insets padding)
-
setPadding
public final void setPadding(Dictionary<java.lang.String,?> padding)
-
setPadding
public final void setPadding(Sequence<?> padding)
-
setPadding
public final void setPadding(int padding)
-
setPadding
public final void setPadding(java.lang.Number padding)
-
setPadding
public final void setPadding(java.lang.String padding)
-
getCloseTransitionDuration
public int getCloseTransitionDuration()
-
setCloseTransitionDuration
public void setCloseTransitionDuration(int closeTransitionDuration)
-
getCloseTransitionRate
public int getCloseTransitionRate()
-
setCloseTransitionRate
public void setCloseTransitionRate(int closeTransitionRate)
-
getListFont
public java.lang.Object getListFont()
-
setListFont
public void setListFont(java.lang.Object listFont)
-
getListColor
public java.lang.Object getListColor()
-
setListColor
public void setListColor(java.lang.Object listColor)
-
getListDisabledColor
public java.lang.Object getListDisabledColor()
-
setListDisabledColor
public void setListDisabledColor(java.lang.Object listDisabledColor)
-
getListBackgroundColor
public java.lang.Object getListBackgroundColor()
-
setListBackgroundColor
public void setListBackgroundColor(java.lang.Object listBackgroundColor)
-
getListSelectionColor
public java.lang.Object getListSelectionColor()
-
setListSelectionColor
public void setListSelectionColor(java.lang.Object listSelectionColor)
-
getListSelectionBackgroundColor
public java.lang.Object getListSelectionBackgroundColor()
-
setListSelectionBackgroundColor
public void setListSelectionBackgroundColor(java.lang.Object listSelectionBackgroundColor)
-
getListInactiveSelectionColor
public java.lang.Object getListInactiveSelectionColor()
-
setListInactiveSelectionColor
public void setListInactiveSelectionColor(java.lang.Object listInactiveSelectionColor)
-
getListInactiveSelectionBackgroundColor
public java.lang.Object getListInactiveSelectionBackgroundColor()
-
setListInactiveSelectionBackgroundColor
public void setListInactiveSelectionBackgroundColor(java.lang.Object listInactiveSelectionBackgroundColor)
-
getListHighlightColor
public java.lang.Object getListHighlightColor()
-
setListHighlightColor
public void setListHighlightColor(java.lang.Object listHighlightColor)
-
getListHighlightBackgroundColor
public java.lang.Object getListHighlightBackgroundColor()
-
setListHighlightBackgroundColor
public void setListHighlightBackgroundColor(java.lang.Object listHighlightBackgroundColor)
-
mouseMove
public boolean mouseMove(Component component, int x, int y)
Description copied from interface:ComponentMouseListener
Called when the mouse is moved over a component.- Specified by:
mouseMove
in interfaceComponentMouseListener
- Overrides:
mouseMove
in classComponentSkin
- Parameters:
component
- Component that is under the mouse.x
- X position of the mouse.y
- Y position of the mouse.- Returns:
true
to consume the event;false
to allow it to propagate (default return).
-
-