Calendar Component v5.1
www.calendarcomponent.com

com.imagine.component.calendar.skins.styles
Class CalendarSkinStyle

java.lang.Object
  extended bycom.imagine.component.calendar.skins.styles.CalendarSkinStyle
Direct Known Subclasses:
CalendarSkinStyleAqua, CalendarSkinStyleDark, CalendarSkinStyleDefault, CalendarSkinStyleExternal, CalendarSkinStyleForest, CalendarSkinStyleGray, CalendarSkinStyleLight

public abstract class CalendarSkinStyle
extends java.lang.Object

Define the style of a skin. Applying a style on a skin will change some of the properties (colors, fonts, etc) of that skin. Also a style may obtain dynamic values for some of the calendar skin properties.
A dynamic value is obtained only in the case when a fixed value is not available. So the function getDynamicalCalendarSkinProperty(calendarSkin, calendarProperty) will be called only for the CalendarSkin properties which have null values.
By default the function getDynamicalCalendarSkinProperty(calendarSkin, calendarProperty) is calling calendarSkinStyleAdapter.getDynamicalCalendarSkinProperty(calendarSkin, calendarProperty). The CalendarSkinStyleAdapter class customizes only the font properties. If it is wanted to be obtained dynamic values for colors and images it must be created a class which extends CalendarSkinStyleAdapter and set this class to the CalendarSkinStyle using the setCalendarSkinStyleAdapter(calendarSkinStyleAdapter) function. Please also read the documentation of CalendarSkinStyleAdapter class for more information.


Constructor Summary
CalendarSkinStyle()
           
 
Method Summary
abstract  void applyStyle(CalendarSkin calendarSkin)
          Applies this style on the specified skin.
 CalendarSkinStyleAdapter getCalendarSkinStyleAdapter()
          Get the adapter object used for obtaining dynamical information based on the current component.
 java.lang.Object getDynamicalCalendarSkinProperty(CalendarSkin calendarSkin, CalendarProperty calendarProperty)
          This function will be called from CalendarSkin class every time when a value for a CalendarSkin property is not found in the CalendarSkin.
abstract  java.lang.String getName()
          Get the name of the style.
 void setCalendarSkinStyleAdapter(CalendarSkinStyleAdapter calendarSkinStyleAdapter)
          Set the adapter object used for obtaining dynamical information based on the current component.
 java.lang.String toString()
          A string representation of this style.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CalendarSkinStyle

public CalendarSkinStyle()
Method Detail

applyStyle

public abstract void applyStyle(CalendarSkin calendarSkin)
                         throws CalendarPropertyException
Applies this style on the specified skin.

Parameters:
calendarSkin - The calendarSkin on which the style is applied.
Throws:
CalendarPropertyException

getDynamicalCalendarSkinProperty

public java.lang.Object getDynamicalCalendarSkinProperty(CalendarSkin calendarSkin,
                                                         CalendarProperty calendarProperty)
This function will be called from CalendarSkin class every time when a value for a CalendarSkin property is not found in the CalendarSkin. The CalendarSkinStyle may return through this function dynamic values for some skin properties. For example if it is wanted for the cell font to always be synchronized with the font of the application then the cell font may be obtained dynamically through this function and the value ca be based on the CalendarComponent font.
Also using this function the colors of the skin may be based on the color of the component or on the colors of the current Look and Feel.

Parameters:
calendarSkin - The calendarSkin object associated
calendarProperty - The CalendarProperty for which it is wanted to be obtained the value.
Returns:
The value for the specified calendarProperty.

getName

public abstract java.lang.String getName()
Get the name of the style.

Returns:
The name of the style.

toString

public java.lang.String toString()
A string representation of this style.


getCalendarSkinStyleAdapter

public CalendarSkinStyleAdapter getCalendarSkinStyleAdapter()
Get the adapter object used for obtaining dynamical information based on the current component.

Returns:
the adapter object used for obtaining dynamical information based on the current component.

setCalendarSkinStyleAdapter

public void setCalendarSkinStyleAdapter(CalendarSkinStyleAdapter calendarSkinStyleAdapter)
Set the adapter object used for obtaining dynamical information based on the current component.

Parameters:
calendarSkinStyleAdapter - the adapter object used for obtaining dynamical information based on the current component.

Calendar Component v5.1
www.calendarcomponent.com