|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.aria.style.Style
org.formaria.aria.style.StyleEx
public class StyleEx
An extended style class that can handle more than just the basic set of style parameters
Copyright (c) Formaria Ltd., 2008. This class is covered by the
Formaria Public License see license.txt for details
$Revision: 2.5 $
| Field Summary |
|---|
| Fields inherited from class org.formaria.aria.style.Style |
|---|
COLOR_BACK, COLOR_FORE, FONT_FACE, FONT_ITALIC, FONT_SIZE, FONT_WEIGHT, NUM_DEFAULT_STYLES, values |
| Constructor Summary | |
|---|---|
StyleEx()
Creates a new instance of StyleEx |
|
StyleEx(Style clone)
|
|
| Method Summary | |
|---|---|
int |
addStyleName(java.lang.String name)
Add a new style name and the storgae for this new attribute. |
java.lang.Object |
clone()
Create a copy of this component |
java.lang.Object |
getStyleAsColor(java.lang.String key)
Retrieve a style element as a Color. |
int |
getStyleAsInt(java.lang.String key)
Retrieve a style element as an int. |
java.lang.String |
getStyleAsString(java.lang.String key)
Retrieve a style element as a String. |
int |
getStyleIndex(java.lang.String name)
Gets a integer constant corresponding to a style name |
java.lang.String |
getStyleName(int idx)
Get the name of a style |
void |
mergeStyle(Style newStyle)
For applying a hierarchy of styles to a new Style. |
void |
setClosed(boolean state)
Mark the style as closed. |
void |
setStyle(int key,
java.lang.Object value)
Set a style element. |
| Methods inherited from class org.formaria.aria.style.Style |
|---|
getFontHashcode, getNumStyles, getStyleAsColor, getStyleAsInt, getStyleAsString, getStyleValue, parseColor, setNumStyles, setStyle |
| Methods inherited from class java.lang.Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public StyleEx()
public StyleEx(Style clone)
| Method Detail |
|---|
public java.lang.Object clone()
clone in class Stylepublic void mergeStyle(Style newStyle)
mergeStyle in class StylenewStyle - the style to merge with the current object.public void setClosed(boolean state)
setClosed in class Style
public void setStyle(int key,
java.lang.Object value)
setStyle in class Stylekey - The index of the elementvalue - The Object value of the elementpublic int getStyleIndex(java.lang.String name)
getStyleIndex in class Stylename - the style name e.g. "font_face"
public java.lang.String getStyleName(int idx)
getStyleName in class Styleidx - the style index
public int addStyleName(java.lang.String name)
name - the new style name
public int getStyleAsInt(java.lang.String key)
key - The name of the style required
public java.lang.String getStyleAsString(java.lang.String key)
key - The index of the style required
public java.lang.Object getStyleAsColor(java.lang.String key)
key - The index of the style required
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||