Calendar Component v5.1
www.calendarcomponent.com

com.imagine.component.calendar.skins.wrapper
Class FontWrapper

java.lang.Object
  extended bycom.imagine.component.calendar.skins.wrapper.FontWrapper

public class FontWrapper
extends java.lang.Object

Defines wrapper information regarding a font. It describes the style, the family, the size of a font and also describes whether the family and size should be considered or should be taken from the parent component.


Constructor Summary
FontWrapper(CalendarProperty calendarProperty)
          Constructor for the FontWrapper object.
 
Method Summary
 java.lang.String getFamily()
          Get the font family.
 java.awt.Font getFont(java.awt.Font defaultFont)
          Get the font wrapped by this object.
 int getSize()
          Returns the font size.
 int getStyle()
          Get the font style.
 CalendarProperty getWrappedCalendarProperty()
          Get the wrapped font calendar property.
 boolean isDefaultFamilyAndSize()
          Return true if the family and size should be taken from the parent component. false otherwise.
 void setDefaultFamilyAndSize(boolean defaultFamilyAndSize)
          Set to true if the family and size should be taken from the parent component.
 void setFamily(java.lang.String family)
          Set the font family.
 void setSize(int size)
          Set the font size.
 void setStyle(int style)
          Set the font style.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FontWrapper

public FontWrapper(CalendarProperty calendarProperty)
Constructor for the FontWrapper object.

Parameters:
calendarProperty - The wrapped font calendar property.
Method Detail

isDefaultFamilyAndSize

public boolean isDefaultFamilyAndSize()
Return true if the family and size should be taken from the parent component. false otherwise.

Returns:
true if the family and size should be taken from the parent component. false otherwise.

setDefaultFamilyAndSize

public void setDefaultFamilyAndSize(boolean defaultFamilyAndSize)
Set to true if the family and size should be taken from the parent component. Set to false otherwise.

Parameters:
defaultFamilyAndSize - true if the family and size should be taken from the parent component. false otherwise.

getFamily

public java.lang.String getFamily()
Get the font family.

Returns:
the font family.

setFamily

public void setFamily(java.lang.String family)
Set the font family.

Parameters:
family - The font family.

getSize

public int getSize()
Returns the font size.

Returns:
The font size.

setSize

public void setSize(int size)
Set the font size.

Parameters:
size - The font size.

getStyle

public int getStyle()
Get the font style.

Returns:
The font style.

setStyle

public void setStyle(int style)
Set the font style.

Parameters:
style - The font style.

getWrappedCalendarProperty

public CalendarProperty getWrappedCalendarProperty()
Get the wrapped font calendar property.

Returns:
the wrapped font calendar property.

getFont

public java.awt.Font getFont(java.awt.Font defaultFont)
Get the font wrapped by this object. If isDefaultFamilyAndSize() returns true the returned font will be derived from the defaultFont passed as parameter. If isDefaultFamilyAndSize() returns false the returned font will be the internal font.

Parameters:
defaultFont - The returned font may be based on this parameter if isDefaultFamilyAndSize() returns true.
Returns:
If isDefaultFamilyAndSize() returns true the returned font will be derived from the defaultFont passed as parameter. If isDefaultFamilyAndSize() returns false the returned font will be the internal font.

Calendar Component v5.1
www.calendarcomponent.com