public class Style
extends java.lang.Object
Constructor and Description |
---|
Style()
Initializes a new empty instance of the
Style class. |
Style(Style next)
Initializes a new empty instance of the
Style class
with the specified style as a parent. |
Style(Style prototype,
Style next)
Creates a new style by reference copying the
fields of the first style and using the second
style as a hierarchy parent.
|
Modifier and Type | Method and Description |
---|---|
void |
addChangeListener(ChangeListener listener)
Adds a
ChangeListener to the style. |
Style |
cloneShallow()
Creates a shallow copy of this style.
|
java.awt.Color |
getBorderBottomColor()
Gets the color used to paint the bottom border of a calendar element.
|
java.lang.Integer |
getBorderBottomWidth()
Gets the width in pixels of the bottom border of an element.
|
java.awt.Color |
getBorderLeftColor()
Gets the color used to paint the left border of a calendar element.
|
java.lang.Integer |
getBorderLeftWidth()
Gets the width in pixels of the left border of an element.
|
java.awt.Color |
getBorderRightColor()
Gets the color used to paint the right border of a calendar element.
|
java.lang.Integer |
getBorderRightWidth()
Gets the width in pixels of the right border of an element.
|
java.awt.Color |
getBorderTopColor()
Gets the color used to paint the top border of a calendar element.
|
java.lang.Integer |
getBorderTopWidth()
Gets the width in pixels of the top border of an element.
|
Brush |
getBrush()
Gets the brush used to fill the interior of elements.
|
java.awt.Color |
getFillColor()
Gets the color used to fill calendar elements.
|
java.awt.Font |
getFont()
Gets the font used to display an element's text.
|
java.awt.Color |
getHeaderBorderBottomColor()
Gets the color used to paint the bottom border of an element's header.
|
java.lang.Integer |
getHeaderBorderBottomWidth()
Gets the width in pixels of the bottom border of an element's header.
|
java.awt.Color |
getHeaderBorderLeftColor()
Gets the color used to paint the left border of an element's header.
|
java.lang.Integer |
getHeaderBorderLeftWidth()
Gets the width in pixels of the left border of an element's header.
|
java.awt.Color |
getHeaderBorderRightColor()
Gets the color used to paint the right border of an element's header.
|
java.lang.Integer |
getHeaderBorderRightWidth()
Gets the width in pixels of the right border of an element's header.
|
java.awt.Color |
getHeaderBorderTopColor()
Gets the color used to paint the top border of an element's header.
|
java.lang.Integer |
getHeaderBorderTopWidth()
Gets the width in pixels of the top border of an element's header.
|
Brush |
getHeaderBrush()
Gets the brush used to fill the interior of an element's header.
|
java.awt.Font |
getHeaderFont()
Gets the font used to paint the text of an element's header.
|
java.util.EnumSet<TextAlignment> |
getHeaderTextAlignment()
Gets the alignment of the headers' text.
|
java.lang.Integer |
getHeaderTextBottomMargin()
Gets the bottom header text margin.
|
java.awt.Color |
getHeaderTextColor()
Gets the color used to paint the text of an element's header.
|
java.lang.Integer |
getHeaderTextLeftMargin()
Gets the left header text margin.
|
java.lang.Integer |
getHeaderTextRightMargin()
Gets the right header text margin.
|
java.awt.Color |
getHeaderTextShadowColor()
Gets the color of the shadow cast by the header text.
|
java.lang.Integer |
getHeaderTextShadowOffset()
Gets the distance of the shadow from the header texts.
|
ShadowStyle |
getHeaderTextShadowStyle()
Gets the type of the shadow cast by the header text.
|
java.lang.Integer |
getHeaderTextTopMargin()
Gets the top header text margin.
|
java.awt.Image |
getImage()
Gets an image associated with this style.
|
ImageAlignment |
getImageAlignment()
Gets the image alignment to be used when
rendering the image assigned to this style.
|
java.lang.Integer |
getImageIndex()
Gets the index of the image associated to this style.
|
java.lang.Integer |
getImageTransparency()
Gets the transparency of the image associated with this style.
|
java.awt.Color |
getLineColor()
Gets the color used to paint various
lines that are not part of element borders.
|
java.util.EnumSet<TextAlignment> |
getTextAlignment()
Gets the alignment of the text contents of a calendar element.
|
java.lang.Integer |
getTextBottomMargin()
Gets the bottom text margin.
|
java.awt.Color |
getTextColor()
Gets the color used to paint an element's text.
|
java.lang.Integer |
getTextLeftMargin()
Gets the left text margin.
|
java.lang.Integer |
getTextRightMargin()
Gets the right text margin.
|
java.awt.Color |
getTextShadowColor()
Gets the color of the shadow cast by the text.
|
java.lang.Integer |
getTextShadowOffset()
Gets the distance of the shadow from the texts.
|
ShadowStyle |
getTextShadowStyle()
Gets the type of the shadow cast by the text.
|
java.lang.Integer |
getTextTopMargin()
Gets the top text margin.
|
protected void |
onChanged(java.util.EventObject e)
Raises the
changed event. |
void |
removeChangeListener(ChangeListener listener)
Removes the specified
ChangeListener from the style. |
void |
reset()
Resets the style to the default state.
|
void |
setBorderBottomColor(java.awt.Color value)
Sets the color used to paint the bottom border of a calendar element.
|
void |
setBorderBottomWidth(java.lang.Integer value)
Sets the width in pixels of the bottom border of an element.
|
void |
setBorderLeftColor(java.awt.Color value)
Sets the color used to paint the left border of a calendar element.
|
void |
setBorderLeftWidth(java.lang.Integer value)
Sets the width in pixels of the left border of an element.
|
void |
setBorderRightColor(java.awt.Color value)
Sets the color used to paint the right border of a calendar element.
|
void |
setBorderRightWidth(java.lang.Integer value)
Sets the width in pixels of the right border of an element.
|
void |
setBorderTopColor(java.awt.Color value)
Sets the color used to paint the top border of a calendar element.
|
void |
setBorderTopWidth(java.lang.Integer value)
Sets the width in pixels of the top border of an element.
|
void |
setBrush(Brush value)
Sets the brush used to fill the interior of elements.
|
void |
setCascadeStyle(Style parent)
Sets the parent of this style in the cascade hierarchy.
|
void |
setFillColor(java.awt.Color value)
Sets the color used to fill calendar elements.
|
void |
setFont(java.awt.Font value)
Sets the font used to display an element's text.
|
void |
setHeaderBorderBottomColor(java.awt.Color value)
Sets the color used to paint the bottom border of an element's header.
|
void |
setHeaderBorderBottomWidth(java.lang.Integer value)
Sets the width in pixels of the bottom border of an element's header.
|
void |
setHeaderBorderLeftColor(java.awt.Color value)
Sets the color used to paint the left border of an element's header.
|
void |
setHeaderBorderLeftWidth(java.lang.Integer value)
Sets the width in pixels of the left border of an element's header.
|
void |
setHeaderBorderRightColor(java.awt.Color value)
Sets the color used to paint the right border of an element's header.
|
void |
setHeaderBorderRightWidth(java.lang.Integer value)
Sets the width in pixels of the right border of an element's header.
|
void |
setHeaderBorderTopColor(java.awt.Color value)
Sets the color used to paint the top border of an element's header.
|
void |
setHeaderBorderTopWidth(java.lang.Integer value)
Sets the width in pixels of the top border of an element's header.
|
void |
setHeaderBrush(Brush value)
Sets the brush used to fill the interior of an element's header.
|
void |
setHeaderFont(java.awt.Font value)
Sets the font used to paint the text of an element's header.
|
void |
setHeaderTextAlignment(java.util.EnumSet<TextAlignment> value)
Sets the alignment of the headers' text.
|
void |
setHeaderTextBottomMargin(java.lang.Integer value)
Sets the bottom header text margin.
|
void |
setHeaderTextColor(java.awt.Color value)
Sets the color used to paint the text of an element's header.
|
void |
setHeaderTextLeftMargin(java.lang.Integer value)
Sets the left header text margin.
|
void |
setHeaderTextRightMargin(java.lang.Integer value)
Sets the right header text margin.
|
void |
setHeaderTextShadowColor(java.awt.Color value)
Sets the color of the shadow cast by the header text.
|
void |
setHeaderTextShadowOffset(java.lang.Integer value)
Sets the distance of the shadow from the header texts.
|
void |
setHeaderTextShadowStyle(ShadowStyle value)
Sets the type of the shadow cast by the header text.
|
void |
setHeaderTextTopMargin(java.lang.Integer value)
Sets the top header text margin.
|
void |
setImage(java.awt.Image value)
Sets an image associated with this style.
|
void |
setImageAlignment(ImageAlignment value)
Sets the image alignment to be used when
rendering the image assigned to this style.
|
void |
setImageIndex(java.lang.Integer value)
Gets the index of the image associated to this style.
|
void |
setImageTransparency(java.lang.Integer value)
Sets the transparency of the image associated with this style.
|
void |
setLineColor(java.awt.Color value)
Sets the color used to paint various
lines that are not part of element borders.
|
void |
setTextAlignment(java.util.EnumSet<TextAlignment> value)
Sets the alignment of the text contents of a calendar element.
|
void |
setTextBottomMargin(java.lang.Integer value)
Sets the bottom text margin.
|
void |
setTextColor(java.awt.Color value)
Sets the color used to paint an element's text.
|
void |
setTextLeftMargin(java.lang.Integer value)
Sets the left text margin.
|
void |
setTextRightMargin(java.lang.Integer value)
Sets the right text margin.
|
void |
setTextShadowColor(java.awt.Color value)
Sets the color of the shadow cast by the text.
|
void |
setTextShadowOffset(java.lang.Integer value)
Sets the distance of the shadow from the texts.
|
void |
setTextShadowStyle(ShadowStyle value)
Sets the type of the shadow cast by the text.
|
void |
setTextTopMargin(java.lang.Integer value)
Sets the top text margin.
|
public Style(Style prototype, Style next)
This constructor roughly creates a wrapper of the first style that uses the second style as a parent, thus preserving the prototype unchanged.
This constructor is for internal use only.
public Style(Style next)
Style
class
with the specified style as a parent.
This constructor is for internal use only.public Style()
Style
class.public Style cloneShallow()
The members of the new style are initialized with the values of the current style without cloning them.
Style
instance.public void setCascadeStyle(Style parent)
This method is for internal use only.
protected void onChanged(java.util.EventObject e)
changed
event.e
- An object, containing the event data.public void reset()
public java.awt.Font getFont()
public void setFont(java.awt.Font value)
value
- A Font object specifying the font of calendar elements' text.
Set to null to use the corresponding value from the current theme.public java.awt.Color getTextColor()
public void setTextColor(java.awt.Color value)
value
- A Color object specifying the text color.
Set to null to use the corresponding value from the current theme.public ShadowStyle getTextShadowStyle()
ShadowStyle
constants.public void setTextShadowStyle(ShadowStyle value)
value
- One of the ShadowStyle
constants.
Set to null to use the corresponding value from the current theme.public java.awt.Color getTextShadowColor()
public void setTextShadowColor(java.awt.Color value)
value
- A Color object specifying the color of the text shadows drawn with
this style. Set to null to use the corresponding value from the current theme.public java.lang.Integer getTextShadowOffset()
public void setTextShadowOffset(java.lang.Integer value)
value
- An integer value specifying the distance between the shadow and the text,
expressed in pixels. Set to null to use the corresponding value from the current theme.public java.util.EnumSet<TextAlignment> getTextAlignment()
TextAlignment
constants.public void setTextAlignment(java.util.EnumSet<TextAlignment> value)
value
- One of the TextAlignment
constants.
Set to null to use the corresponding value from the current theme.public java.lang.Integer getTextLeftMargin()
public void setTextLeftMargin(java.lang.Integer value)
value
- A non-negative integer specifying the left margin of texts drawn with this style.
Set to null to use the corresponding value from the current theme.public java.lang.Integer getTextTopMargin()
public void setTextTopMargin(java.lang.Integer value)
value
- A non-negative integer specifying the top margin of texts drawn with this style.
Set to null to use the corresponding value from the current theme.public java.lang.Integer getTextRightMargin()
public void setTextRightMargin(java.lang.Integer value)
value
- A non-negative integer specifying the right margin of texts drawn with this style.
Set to null to use the corresponding value from the current theme.public java.lang.Integer getTextBottomMargin()
public void setTextBottomMargin(java.lang.Integer value)
value
- A non-negative integer specifying the bottom margin of texts drawn with this style.
Set to null to use the corresponding value from the current theme.public java.awt.Color getBorderTopColor()
To remove the top border, pass Colors.Transparent
or
set setBorderTopWidth(java.lang.Integer)
to 0.
public void setBorderTopColor(java.awt.Color value)
To remove the top border, pass Colors.Transparent
or
set setBorderTopWidth(java.lang.Integer)
to 0.
value
- A Color object specifying the color of the top border lines.
Set to null to use the corresponding value from the current theme.public java.lang.Integer getBorderTopWidth()
To remove the top border, set to 0.
public void setBorderTopWidth(java.lang.Integer value)
To remove the top border, set to 0.
value
- A non-negative integer specifying the border width in pixels.
Set to null to use the corresponding value from the current theme.public java.awt.Color getBorderLeftColor()
To remove the left border, pass Colors.Transparent
or
set setBorderLeftWidth(java.lang.Integer)
to 0.
public void setBorderLeftColor(java.awt.Color value)
To remove the left border, pass Colors.Transparent
or
set setBorderLeftWidth(java.lang.Integer)
to 0.
value
- A Color object specifying the color of the left border lines.
Set to null to use the corresponding value from the current theme.public java.lang.Integer getBorderLeftWidth()
To remove the left border, set to 0.
public void setBorderLeftWidth(java.lang.Integer value)
To remove the left border, set to 0.
value
- A non-negative integer specifying the border width in pixels.
Set to null to use the corresponding value from the current theme.public java.awt.Color getBorderBottomColor()
To remove the bottom border, pass Colors.Transparent
or
set setBorderBottomWidth(java.lang.Integer)
to 0.
public void setBorderBottomColor(java.awt.Color value)
To remove the bottom border, pass Colors.Transparent
or
set setBorderBottomWidth(java.lang.Integer)
to 0.
value
- A Color object specifying the color of the bottom border lines.
Set to null to use the corresponding value from the current theme.public java.lang.Integer getBorderBottomWidth()
To remove the bottom border, set to 0.
public void setBorderBottomWidth(java.lang.Integer value)
To remove the bottom border, set to 0.
value
- A non-negative integer specifying the border width in pixels.
Set to null to use the corresponding value from the current theme.public java.awt.Color getBorderRightColor()
To remove the right border, pass Colors.Transparent
or
set setBorderRightWidth(java.lang.Integer)
to 0.
public void setBorderRightColor(java.awt.Color value)
To remove the right border, pass Colors.Transparent
or
set setBorderRightWidth(java.lang.Integer)
to 0.
value
- A Color object specifying the color of the right border lines.
Set to null to use the corresponding value from the current theme.public java.lang.Integer getBorderRightWidth()
To remove the right border, set to 0.
public void setBorderRightWidth(java.lang.Integer value)
To remove the right border, set to 0.
value
- A non-negative integer specifying the border width in pixels.
Set to null to use the corresponding value from the current theme.public java.awt.Color getLineColor()
public void setLineColor(java.awt.Color value)
value
- A Color object specifying the color of lines.
Set to null to use the corresponding value from the current theme.public java.awt.Color getFillColor()
public void setFillColor(java.awt.Color value)
value
- A Color object used to fill calendar elements.
Set to null to use the corresponding value from the current theme.public Brush getBrush()
Brush
instance used to fill the interior of calendar UI elements.public void setBrush(Brush value)
value
- A Brush
instance used to fill the interior of calendar UI elements.
Set to null to use the corresponding value from the current theme.public java.awt.Font getHeaderFont()
public void setHeaderFont(java.awt.Font value)
value
- A Font object specifying the font of text displayed in headers.
Set to null to use the corresponding value from the current theme.public java.awt.Color getHeaderTextColor()
public void setHeaderTextColor(java.awt.Color value)
value
- A Color object specifying the color of text displayed in headers.
Set to null to use the corresponding value from the current theme.public ShadowStyle getHeaderTextShadowStyle()
ShadowStyle
constants.public void setHeaderTextShadowStyle(ShadowStyle value)
value
- One of the ShadowStyle
constants.
Set to null to use the corresponding value from the current theme.public java.awt.Color getHeaderTextShadowColor()
public void setHeaderTextShadowColor(java.awt.Color value)
value
- A Color object specifying the color of the header text shadows
drawn with this style. Set to null to use the corresponding value from the current theme.public java.lang.Integer getHeaderTextShadowOffset()
public void setHeaderTextShadowOffset(java.lang.Integer value)
value
- An integer value specifying the distance between the shadow and the header text,
expressed in pixels. Set to null to use the corresponding value from the current theme.public java.lang.Integer getHeaderTextLeftMargin()
public void setHeaderTextLeftMargin(java.lang.Integer value)
value
- A non-negative integer specifying the left margin of header texts drawn with this style.
Set to null to use the corresponding value from the current theme.public java.lang.Integer getHeaderTextTopMargin()
public void setHeaderTextTopMargin(java.lang.Integer value)
value
- A non-negative integer specifying the top margin of header texts drawn with this style.
Set to null to use the corresponding value from the current theme.public java.lang.Integer getHeaderTextRightMargin()
public void setHeaderTextRightMargin(java.lang.Integer value)
value
- A non-negative integer specifying the right margin of header texts drawn with this style.
Set to null to use the corresponding value from the current theme.public java.lang.Integer getHeaderTextBottomMargin()
public void setHeaderTextBottomMargin(java.lang.Integer value)
value
- A non-negative integer specifying the bottom margin of header texts drawn with this style.
Set to null to use the corresponding value from the current theme.public java.awt.Color getHeaderBorderTopColor()
To remove the top border, pass Colors.Transparent
or
set setHeaderBorderTopWidth(java.lang.Integer)
to 0.
public void setHeaderBorderTopColor(java.awt.Color value)
To remove the top border, pass Colors.Transparent
or
set setHeaderBorderTopWidth(java.lang.Integer)
to 0.
value
- A Color object specifying the color of the top border lines of headers.
Set to null to use the corresponding value from the current theme.public java.lang.Integer getHeaderBorderTopWidth()
To remove the top border, set to 0.
public void setHeaderBorderTopWidth(java.lang.Integer value)
To remove the top border, set to 0.
value
- A non-negative integer specifying the header border width in pixels.
Set to null to use the corresponding value from the current theme.public java.awt.Color getHeaderBorderLeftColor()
To remove the left border, pass Colors.Transparent
or
set setHeaderBorderLeftWidth(java.lang.Integer)
to 0.
public void setHeaderBorderLeftColor(java.awt.Color value)
To remove the left border, pass Colors.Transparent
or
set setHeaderBorderLeftWidth(java.lang.Integer)
to 0.
value
- A Color object specifying the color of the left border lines of headers.
Set to null to use the corresponding value from the current theme.public java.lang.Integer getHeaderBorderLeftWidth()
To remove the left border, set to 0.
public void setHeaderBorderLeftWidth(java.lang.Integer value)
To remove the left border, set to 0.
value
- A non-negative integer specifying the header border width in pixels.
Set to null to use the corresponding value from the current theme.public java.awt.Color getHeaderBorderBottomColor()
To remove the bottom border, pass Colors.Transparent
or
set setHeaderBorderBottomWidth(java.lang.Integer)
to 0.
public void setHeaderBorderBottomColor(java.awt.Color value)
To remove the bottom border, pass Colors.Transparent
or
set setHeaderBorderBottomWidth(java.lang.Integer)
to 0.
value
- A Color object specifying the color of the bottom border lines of headers.
Set to null to use the corresponding value from the current theme.public java.lang.Integer getHeaderBorderBottomWidth()
To remove the bottom border, set to 0.
public void setHeaderBorderBottomWidth(java.lang.Integer value)
To remove the bottom border, set to 0.
value
- A non-negative integer specifying the header border width in pixels.
Set to null to use the corresponding value from the current theme.public java.awt.Color getHeaderBorderRightColor()
To remove the right border, pass Colors.Transparent
or
set setHeaderBorderRightWidth(java.lang.Integer)
to 0.
public void setHeaderBorderRightColor(java.awt.Color value)
To remove the right border, pass Colors.Transparent
or
set setHeaderBorderRightWidth(java.lang.Integer)
to 0.
value
- A Color object specifying the color of the right border lines of headers.
Set to null to use the corresponding value from the current theme.public java.lang.Integer getHeaderBorderRightWidth()
To remove the right border, set to 0.
public void setHeaderBorderRightWidth(java.lang.Integer value)
To remove the right border, set to 0.
value
- A non-negative integer specifying the header border width in pixels.
Set to null to use the corresponding value from the current theme.public java.util.EnumSet<TextAlignment> getHeaderTextAlignment()
TextAlignment
constants.public void setHeaderTextAlignment(java.util.EnumSet<TextAlignment> value)
value
- One of the TextAlignment
constants.
Set to null to use the corresponding value from the current theme.public Brush getHeaderBrush()
Brush
object used to fill header interior.public void setHeaderBrush(Brush value)
value
- A Brush
object used to fill header interior.
Set to null to use the corresponding value from the current theme.public java.awt.Image getImage()
This image takes precedence over the image specified through setImageIndex(java.lang.Integer)
.
public void setImage(java.awt.Image value)
This image takes precedence over the image specified through setImageIndex(java.lang.Integer)
.
value
- An Image object.
Set to null to use the corresponding value from the current theme.public java.lang.Integer getImageIndex()
The image specified through setImage(java.awt.Image)
, if any, takes precedence
over the image identified by this index.
public void setImageIndex(java.lang.Integer value)
The image specified through setImage(java.awt.Image)
, if any, takes precedence
over the image identified by this index.
value
- An integer value specifying the image index.
Set to null to use the corresponding value from the current theme.public java.lang.Integer getImageTransparency()
The accepted values range from 0 (fully transparent) to 255 (opaque).
public void setImageTransparency(java.lang.Integer value)
The accepted values range from 0 (fully transparent) to 255 (opaque).
value
- An integer value specifying the image transparency.
Set to null to use the corresponding value from the current theme.public ImageAlignment getImageAlignment()
ImageAlignment
constants.public void setImageAlignment(ImageAlignment value)
value
- One of the ImageAlignment
constants.
Set to null to use the corresponding value from the current theme.public void addChangeListener(ChangeListener listener)
ChangeListener
to the style.listener
- The ChangeListener
to be added.public void removeChangeListener(ChangeListener listener)
ChangeListener
from the style.listener
- The listener to be removed.