Package org.apache.pivot.wtk.skin.terra
Class TerraCalendarSkin.DateButtonSkin
- java.lang.Object
 - 
- org.apache.pivot.wtk.skin.ComponentSkin
 - 
- org.apache.pivot.wtk.skin.ButtonSkin
 - 
- org.apache.pivot.wtk.skin.terra.TerraCalendarSkin.DateButtonSkin
 
 
 
 
- 
- All Implemented Interfaces:
 ButtonListener,ButtonPressListener,ButtonStateListener,ComponentKeyListener,ComponentListener,ComponentMouseButtonListener,ComponentMouseListener,ComponentMouseWheelListener,ComponentStateListener,ComponentTooltipListener,ConstrainedVisual,Skin,Visual
- Enclosing class:
 - TerraCalendarSkin
 
public class TerraCalendarSkin.DateButtonSkin extends ButtonSkin
 
- 
- 
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 
 - 
 
- 
Field Summary
- 
Fields inherited from class org.apache.pivot.wtk.skin.ButtonSkin
highlighted 
 - 
 
- 
Constructor Summary
Constructors Constructor Description DateButtonSkin() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidfocusedChanged(Component component, Component obverseComponent)Called when a component's focused state has changed.java.awt.ColorgetColor()java.awt.ColorgetDisabledColor()java.awt.FontgetFont()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.java.awt.ColorgetSelectionColor()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.booleankeyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation)booleankeyReleased(Component component, int keyCode, Keyboard.KeyLocation keyLocation)SPACE'presses' the button.booleanmouseClick(Component component, Mouse.Button button, int x, int y, int count)Called when a mouse button is clicked over a component.voidmouseOver(Component component)Called when the mouse enters a component.voidpaint(java.awt.Graphics2D graphics)Paints the visual.- 
Methods inherited from class org.apache.pivot.wtk.skin.ButtonSkin
actionChanged, buttonDataChanged, buttonGroupChanged, buttonPressed, dataRendererChanged, enabledChanged, layout, mouseOut, 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, getBaseline, getColor, getComponent, getFocusRectangleStroke, getHeight, getSize, getTextInputMethodListener, getThemeFont, getWidth, heightLimitsChanged, invalidateComponent, isFocusable, isOpaque, keyTyped, locationChanged, menuHandlerChanged, mouseDown, mouseMove, mouseUp, 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
- 
install
public 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 interfaceSkin- Overrides:
 installin classButtonSkin- Parameters:
 component- The component to which the skin is being attached.
 
- 
getPreferredWidth
public 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.
 
 
- 
getPreferredHeight
public 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.
 
 
- 
getPreferredSize
public Dimensions getPreferredSize()
Description copied from interface:ConstrainedVisualReturns the visual's unconstrained preferred size.- Specified by:
 getPreferredSizein interfaceConstrainedVisual- Overrides:
 getPreferredSizein 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). 
 
- 
paint
public void paint(java.awt.Graphics2D graphics)
Description copied from interface:VisualPaints the visual.- Parameters:
 graphics- The graphics context in which to paint the visual.
 
- 
getFont
public java.awt.Font getFont()
 
- 
getColor
public java.awt.Color getColor()
 
- 
getDisabledColor
public java.awt.Color getDisabledColor()
 
- 
getSelectionColor
public java.awt.Color getSelectionColor()
 
- 
focusedChanged
public void focusedChanged(Component component, Component obverseComponent)
Description copied from interface:ComponentStateListenerCalled when a component's focused state has changed.This will be called both when a component gains focus and when it loses focus. The currently focused component has already been set when this method is called, so that the new state of the component can be determined by calling the
Component.isFocused()method.- Specified by:
 focusedChangedin interfaceComponentStateListener- Overrides:
 focusedChangedin classButtonSkin- Parameters:
 component- The component that is either gaining focus or the one that previously had focus and is now losing it.obverseComponent- If the component is gaining focus, this is the component that is losing focus. If the component is losing focus this is the component that is gaining the focus instead.
 
- 
mouseOver
public void mouseOver(Component component)
Description copied from interface:ComponentMouseListenerCalled when the mouse enters a component.Default is to do nothing.
- Specified by:
 mouseOverin interfaceComponentMouseListener- Overrides:
 mouseOverin classButtonSkin- Parameters:
 component- Component that is now under the mouse pointer.
 
- 
mouseClick
public boolean mouseClick(Component component, Mouse.Button button, int x, int y, int count)
Description copied from interface:ComponentMouseButtonListenerCalled when a mouse button is clicked over a component.- Specified by:
 mouseClickin interfaceComponentMouseButtonListener- Overrides:
 mouseClickin classComponentSkin- Parameters:
 component- Component user the mouse pointer.button- Which mouse button was clicked.x- X position of the mouse.y- Y position of the mouse.count- Number of clicks (1 = single click, 2 = double click, etc.).- Returns:
 trueto consume the event;falseto allow it to propagate (default).
 
- 
keyPressed
public boolean keyPressed(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
- Specified by:
 keyPressedin interfaceComponentKeyListener- Overrides:
 keyPressedin classComponentSkin- Parameters:
 component- Component that has the focus.keyCode- The key code for the key that was pressed.keyLocation- Location value for the key (left or right for shift keys, etc.).- Returns:
 trueto consume the event;falseto allow it to propagate.
 
- 
keyReleased
public boolean keyReleased(Component component, int keyCode, Keyboard.KeyLocation keyLocation)
SPACE'presses' the button.- Specified by:
 keyReleasedin interfaceComponentKeyListener- Overrides:
 keyReleasedin classComponentSkin- Parameters:
 component- Component that has the focus, that is receiving this key event.keyCode- Code for the key that was released.keyLocation- Location of the key.- Returns:
 trueto consume the event;falseto allow it to propagate.
 
 - 
 
 -