org.apache.pivot.wtk.skin.terra
Class TerraCalendarSkin

java.lang.Object
  extended by org.apache.pivot.wtk.skin.ComponentSkin
      extended by org.apache.pivot.wtk.skin.ContainerSkin
          extended by org.apache.pivot.wtk.skin.CalendarSkin
              extended by org.apache.pivot.wtk.skin.terra.TerraCalendarSkin
All Implemented Interfaces:
CalendarListener, CalendarSelectionListener, ComponentKeyListener, ComponentListener, ComponentMouseButtonListener, ComponentMouseListener, ComponentMouseWheelListener, ComponentStateListener, ComponentTooltipListener, ConstrainedVisual, ContainerListener, ContainerMouseListener, Skin, Visual

public class TerraCalendarSkin
extends CalendarSkin

Terra calendar skin.


Nested Class Summary
 class TerraCalendarSkin.DateButton
           
 class TerraCalendarSkin.DateButtonSkin
           
 class TerraCalendarSkin.MonthSpinnerItemRenderer
           
 
Nested classes/interfaces inherited from class org.apache.pivot.wtk.skin.ContainerSkin
ContainerSkin.IndexFocusTraversalPolicy
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.CalendarListener
CalendarListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ContainerListener
ContainerListener.Adapter
 
Nested classes/interfaces inherited from interface org.apache.pivot.wtk.ContainerMouseListener
ContainerMouseListener.Adapter
 
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
 
Constructor Summary
TerraCalendarSkin()
           
 
Method Summary
 void disabledDateFilterChanged(Calendar calendar, Filter<CalendarDate> previousDisabledDateFilter)
          Called when a calendar's disabled date filter has changed.
 int getBaseline(int width, int height)
          Returns the baseline for a given width and height.
 Color getColor()
           
 Color getDisabledColor()
           
 Color getDividerColor()
           
 Font getFont()
           
 Color getHighlightBackgroundColor()
           
 Color getHighlightColor()
           
 int 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.
 Color getSelectionBackgroundColor()
           
 Color getSelectionColor()
           
 void install(Component component)
          Associates a skin with a component.
 void layout()
          If the component on which the skin is installed is a container, lays out the container's children.
 void localeChanged(Calendar calendar, Locale previousLocale)
          Called when a calendar's locale has changed.
 void monthChanged(Calendar calendar, int previousMonth)
          Called when a calendar's month value has changed.
 void paint(Graphics2D graphics)
          Paints the visual.
 void selectedDateChanged(Calendar calendar, CalendarDate previousSelectedDate)
          Called when a calendar's selected date has changed.
 void setColor(Color color)
           
 void setColor(String color)
           
 void setDisabledColor(Color disabledColor)
           
 void setDisabledColor(String disabledColor)
           
 void setDividerColor(Color dividerColor)
           
 void setDividerColor(String dividerColor)
           
 void setFont(Dictionary<String,?> font)
           
 void setFont(Font font)
           
 void setFont(String font)
           
 void setHighlightBackgroundColor(Color highlightBackgroundColor)
           
 void setHighlightBackgroundColor(String highlightBackgroundColor)
           
 void setHighlightColor(Color highlightColor)
           
 void setHighlightColor(String highlightColor)
           
 void setPadding(int padding)
           
 void setPadding(Number padding)
           
 void setSelectionBackgroundColor(Color selectionBackgroundColor)
           
 void setSelectionBackgroundColor(String selectionBackgroundColor)
           
 void setSelectionColor(Color selectionColor)
           
 void setSelectionColor(String selectionColor)
           
 void yearChanged(Calendar calendar, int previousYear)
          Called when a calendar's year value has changed.
 
Methods inherited from class org.apache.pivot.wtk.skin.ContainerSkin
componentInserted, componentMoved, componentsRemoved, focusTraversalPolicyChanged, getBackgroundColor, getBackgroundPaint, isFocusable, isOpaque, mouseDown, mouseMove, mouseUp, mouseWheel, setBackgroundColor, setBackgroundColor, setBackgroundPaint, setBackgroundPaint, setBackgroundPaint
 
Methods inherited from class org.apache.pivot.wtk.skin.ComponentSkin
cursorChanged, decodeFont, dragSourceChanged, dropTargetChanged, enabledChanged, focusedChanged, getBaseline, getComponent, getHeight, getWidth, heightLimitsChanged, invalidateComponent, keyPressed, keyReleased, keyTyped, locationChanged, menuHandlerChanged, mouseClick, mouseDown, mouseMove, mouseOut, mouseOver, mouseUp, mouseWheel, nameChanged, parentChanged, preferredSizeChanged, repaintComponent, repaintComponent, repaintComponent, repaintComponent, repaintComponent, setSize, sizeChanged, tooltipDelayChanged, tooltipTextChanged, tooltipTriggered, visibleChanged, widthLimitsChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TerraCalendarSkin

public TerraCalendarSkin()
Method Detail

install

public void install(Component component)
Description copied from interface: Skin
Associates a skin with a component.

Specified by:
install in interface Skin
Overrides:
install in class CalendarSkin
Parameters:
component - The component to which the skin is being attached.

getPreferredWidth

public int getPreferredWidth(int height)
Description copied from interface: ConstrainedVisual
Returns the visual's preferred width given the provided height constraint.

Specified by:
getPreferredWidth in interface ConstrainedVisual
Overrides:
getPreferredWidth in class ContainerSkin
Parameters:
height - The height by which to constrain the preferred width, or -1 for no constraint.

getPreferredHeight

public int getPreferredHeight(int width)
Description copied from interface: ConstrainedVisual
Returns the visual's preferred height given the provided width constraint.

Specified by:
getPreferredHeight in interface ConstrainedVisual
Overrides:
getPreferredHeight in class ContainerSkin
Parameters:
width - The width by which to constrain the preferred height, or -1 for no constraint.

getPreferredSize

public Dimensions getPreferredSize()
Description copied from interface: ConstrainedVisual
Returns the visual's unconstrained preferred size.

Specified by:
getPreferredSize in interface ConstrainedVisual
Overrides:
getPreferredSize in class ComponentSkin

getBaseline

public int getBaseline(int width,
                       int height)
Description copied from interface: ConstrainedVisual
Returns the baseline for a given width and height.

Specified by:
getBaseline in interface ConstrainedVisual
Overrides:
getBaseline in class ComponentSkin
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.


paint

public void paint(Graphics2D graphics)
Description copied from interface: Visual
Paints the visual.

Specified by:
paint in interface Visual
Overrides:
paint in class ContainerSkin
Parameters:
graphics - The graphics context in which to paint the visual.

getFont

public Font getFont()

setFont

public void setFont(Font font)

setFont

public final void setFont(String font)

setFont

public final void setFont(Dictionary<String,?> font)

getColor

public Color getColor()

setColor

public void setColor(Color color)

setColor

public final void setColor(String color)

getDisabledColor

public Color getDisabledColor()

setDisabledColor

public void setDisabledColor(Color disabledColor)

setDisabledColor

public final void setDisabledColor(String disabledColor)

getSelectionColor

public Color getSelectionColor()

setSelectionColor

public void setSelectionColor(Color selectionColor)

setSelectionColor

public final void setSelectionColor(String selectionColor)

getSelectionBackgroundColor

public Color getSelectionBackgroundColor()

setSelectionBackgroundColor

public void setSelectionBackgroundColor(Color selectionBackgroundColor)

setSelectionBackgroundColor

public final void setSelectionBackgroundColor(String selectionBackgroundColor)

getHighlightColor

public Color getHighlightColor()

setHighlightColor

public void setHighlightColor(Color highlightColor)

setHighlightColor

public final void setHighlightColor(String highlightColor)

getHighlightBackgroundColor

public Color getHighlightBackgroundColor()

setHighlightBackgroundColor

public void setHighlightBackgroundColor(Color highlightBackgroundColor)

setHighlightBackgroundColor

public final void setHighlightBackgroundColor(String highlightBackgroundColor)

getDividerColor

public Color getDividerColor()

setDividerColor

public void setDividerColor(Color dividerColor)

setDividerColor

public final void setDividerColor(String dividerColor)

getPadding

public int getPadding()

setPadding

public void setPadding(int padding)

setPadding

public final void setPadding(Number padding)

yearChanged

public void yearChanged(Calendar calendar,
                        int previousYear)
Description copied from interface: CalendarListener
Called when a calendar's year value has changed.


monthChanged

public void monthChanged(Calendar calendar,
                         int previousMonth)
Description copied from interface: CalendarListener
Called when a calendar's month value has changed.


localeChanged

public void localeChanged(Calendar calendar,
                          Locale previousLocale)
Description copied from interface: CalendarListener
Called when a calendar's locale has changed.


disabledDateFilterChanged

public void disabledDateFilterChanged(Calendar calendar,
                                      Filter<CalendarDate> previousDisabledDateFilter)
Description copied from interface: CalendarListener
Called when a calendar's disabled date filter has changed.


selectedDateChanged

public void selectedDateChanged(Calendar calendar,
                                CalendarDate previousSelectedDate)
Description copied from interface: CalendarSelectionListener
Called when a calendar's selected date has changed.