|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectlt.monarch.chart.style.Stylesheet
lt.monarch.chart.style.Style
public class Style extends Stylesheet
Style is a view of the entire stylesheet and filters out unnecessary entityStyle. It has an associated tag, which defines what entityStyle are needed. All matching entityStyle are normalized to a "." tag, so that they can be selected as default values for the style.
| Modifier and Type | Field and Description |
|---|
| Fields inherited from class lt.monarch.chart.style.Stylesheet |
|---|
defaultStylesheet, inheritedValue, nullValue, stylesheetListeners, weakStylesheetListeners |
| Constructor and Description |
|---|
Style()
Constructs a new Style with defaultStylesheet as parent. |
Style(java.lang.String foo)
|
Style(Stylesheet parentStylesheet,
java.lang.String tag)
Constructs a new Style with the parent Stylesheet and default tag. |
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(Style style)
|
void |
copyStyle(Style style)
|
void |
dispose()
Cleans this style object. |
protected void |
finalize()
Called by the garbage collector on an object when garbage collection determines that there are no more references to the object. |
protected void |
generateStylesheetCache()
Loads all necessary entityStyle from parent Stylesheet. |
java.awt.Color |
getBackground()
Returns the background property with tag "." |
java.awt.Color |
getColor(java.lang.String attribute)
Returns the color property with tag "." |
java.lang.Object |
getComposite()
Returns the composite property with tag "." |
java.lang.String |
getContext()
Returns a textual stylesheet context. |
java.lang.StringBuilder |
getContext(java.lang.StringBuilder stringBuilder)
Returns a textual stylesheet context appended to a StringBuilder. |
java.lang.String |
getDefaultTag()
Gets the defaultTag value |
int |
getFlag(java.lang.String attribute)
Returns the flag property with tag "." |
java.awt.Font |
getFont()
Returns the font property with tag "." |
java.awt.Color |
getForeground()
Returns the foreground property with tag "." |
java.util.Hashtable<Key,java.lang.Object> |
getLocalStyle()
|
java.lang.Object |
getObject(java.lang.String attribute)
Returns the property with tag "." |
PaintStyle |
getPaintStyle()
|
Stylesheet |
getParentStylesheet()
Returns the parent Stylesheet. |
StyleObject |
getProperty(java.lang.String attribute)
Gets enumeration property |
java.lang.Object |
getRenderingHints()
Returns the rendering hints property with tag "." |
java.lang.Object |
getStroke()
Returns the stroke property with tag "." |
Style |
getSubStyle(java.lang.String tag)
Creates and returns a child stylesheet with the specified view tag. |
TextStyle |
getTextStyle()
|
java.lang.Object |
getValueFromLocalStyle(java.lang.String tag,
java.lang.String attribute)
|
boolean |
isDefault(Key key)
|
protected void |
refreshStylesheetCache()
Refreshes stylesheet cache - clears and regenerates. |
protected boolean |
refreshStylesheetCacheKey(Key key)
Refreshes the value correspondent to the specified key in the stylesheet. |
void |
removeChild(Style style)
|
void |
setBackground(java.awt.Color color)
Sets the background property with tag "." |
void |
setColor(java.lang.String attribute,
java.awt.Color color)
Sets the color property with tag "." |
void |
setComposite(java.awt.Composite c)
Sets the composite property with tag "." |
void |
setFlag(java.lang.String attribute,
int flag)
Sets the flag property with tag "." |
void |
setFont(java.awt.Font font)
Sets the font property with tag "." |
void |
setForeground(java.awt.Color color)
Sets the foreground property with tag "." |
void |
setObject(java.lang.String attribute,
java.lang.Object value)
Sets the property with tag "." |
void |
setParentStylesheet(Stylesheet parentStylesheet)
Sets a parent stylesheet. |
void |
setProperty(java.lang.String attribute,
StyleObject property)
Sets the enumeration property with tag "." |
void |
setRenderingHints(java.awt.RenderingHints c)
Sets the rendering hints property with tag "." |
void |
setStroke(java.awt.Stroke c)
Sets the stroke property with tag "." |
void |
setTag(java.lang.String tag)
Sets the stylesheet view tag, used for parent stylesheet lookup. |
protected void |
setValue(java.lang.String tag,
java.lang.String attribute,
java.lang.Object value)
Sets any property in the style. |
| Methods inherited from class lt.monarch.chart.style.Stylesheet |
|---|
addListener, addWeakListener, defaultRead, defaultWrite, findValue, fireStylesheetChanged, fireStylesheetKeyChanged, getBackground, getColor, getComposite, getFlag, getFont, getForeground, getObject, getPaint, getPaint, getProperty, getRenderingHints, getStroke, removeListener, removeWeakListener, resumeListeners, setBackground, setColor, setComposite, setFlag, setFont, setForeground, setObject, setPaint, setPaint, setProperty, setRenderingHints, setStroke, suspendListeners, toString |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public Style(Stylesheet parentStylesheet,
java.lang.String tag)
parentStylesheet - the parent Stylesheettag - the default tagpublic Style()
defaultStylesheet as parent.
public Style(java.lang.String foo)
| Method Detail |
|---|
public void setParentStylesheet(Stylesheet parentStylesheet)
parentStylesheet - parent stylesheetpublic Stylesheet getParentStylesheet()
getParentStylesheet in class Stylesheetpublic void setTag(java.lang.String tag)
tag - view tagpublic Style getSubStyle(java.lang.String tag)
tag - view tagpublic java.lang.Object getComposite()
public java.lang.Object getStroke()
public java.lang.Object getRenderingHints()
public int getFlag(java.lang.String attribute)
attribute - property attributepublic java.awt.Font getFont()
public java.awt.Color getForeground()
public java.awt.Color getBackground()
public java.awt.Color getColor(java.lang.String attribute)
attribute - property attributepublic java.lang.Object getObject(java.lang.String attribute)
attribute - property attributepublic void setComposite(java.awt.Composite c)
c - composite objectpublic void setStroke(java.awt.Stroke c)
c - stroke objectpublic void setRenderingHints(java.awt.RenderingHints c)
c - rendering hints object
public void setFlag(java.lang.String attribute,
int flag)
attribute - property attributeflag - flag
public void setProperty(java.lang.String attribute,
StyleObject property)
attribute - property attributeproperty - enumeration valuepublic StyleObject getProperty(java.lang.String attribute)
attribute - property attributepublic void setFont(java.awt.Font font)
font - font objectpublic void setForeground(java.awt.Color color)
color - foreground colorpublic void setBackground(java.awt.Color color)
color - background color
public void setColor(java.lang.String attribute,
java.awt.Color color)
attribute - property attributecolor - color
public void setObject(java.lang.String attribute,
java.lang.Object value)
attribute - property attributevalue - property valueprotected void generateStylesheetCache()
protected void refreshStylesheetCache()
protected boolean refreshStylesheetCacheKey(Key key)
key - the keytrue if a value correspondent to the specified during this operation
key changed, false otherwise
protected void setValue(java.lang.String tag,
java.lang.String attribute,
java.lang.Object value)
setValue in class Stylesheettag - the tagattribute - the attributevalue - the property value
public java.lang.Object getValueFromLocalStyle(java.lang.String tag,
java.lang.String attribute)
public java.lang.String getContext()
getParentStylesheet().getContext() +"."+ tag, there tag is the String set by
method setTag
getContext in class Stylesheetpublic java.lang.StringBuilder getContext(java.lang.StringBuilder stringBuilder)
StringBuilder.
It specifies how deeply is this stylesheet nested in
the stylesheet hierarchy. The context for this style object is created as:
getParentStylesheet().getContext() +"."+ tag, there tag is the String set by
method setTag
getContext in class StylesheetstringBuilder - StringBuilder to use for context assembly.StringBuilderpublic void dispose()
dispose in class Stylesheet
protected void finalize()
throws java.lang.Throwable
cleanup method if it isn't called
yet.
finalize in class Stylesheetjava.lang.Throwable - the Exception raised by this methodpublic java.lang.String getDefaultTag()
public void copyStyle(Style style)
public void addChild(Style style)
public void removeChild(Style style)
public java.util.Hashtable<Key,java.lang.Object> getLocalStyle()
public boolean isDefault(Key key)
public PaintStyle getPaintStyle()
public TextStyle getTextStyle()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||