|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.xui.style.XStyle
net.xoetrope.xui.style.XStyleEx
public class XStyleEx
An extended style class that can handle more than just the basic set of style parameters
Copyright (c) Xoetrope Ltd., 2001-2006. This class is covered by the
Xoetrope Public License see license.txt for details
$Revision: 2.5 $
| Field Summary |
|---|
| Fields inherited from class net.xoetrope.xui.style.XStyle |
|---|
COLOR_BACK, COLOR_FORE, FONT_FACE, FONT_ITALIC, FONT_SIZE, FONT_WEIGHT, NUM_DEFAULT_STYLES, values |
| Constructor Summary | |
|---|---|
XStyleEx()
Creates a new instance of XStyleEx |
|
XStyleEx(XStyle clone)
|
|
| Method Summary | |
|---|---|
int |
addStyleName(java.lang.String name)
Add a new style name and the storgae for this new attribute |
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(XStyle newStyle)
For applying a hierarchy of styles to a new XStyle. |
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 net.xoetrope.xui.style.XStyle |
|---|
clone, 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 XStyleEx()
public XStyleEx(XStyle clone)
| Method Detail |
|---|
public void mergeStyle(XStyle newStyle)
mergeStyle in class XStylenewStyle - the style to merge with the current object.public void setClosed(boolean state)
setClosed in class XStyle
public void setStyle(int key,
java.lang.Object value)
setStyle in class XStylekey - The index of the elementvalue - The Object value of the elementpublic int getStyleIndex(java.lang.String name)
getStyleIndex in class XStylename - the style name e.g. "font_face"
public java.lang.String getStyleName(int idx)
getStyleName in class XStyleidx - 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 | |||||||||