| java.lang.Object net.xoetrope.xui.style.XStyle
XStyle | public class XStyle implements Cloneable(Code) | | A style for storing information about the look of a component.
Information such as font (face, size, bold, italic), color (fore, back).
Copyright (c) Xoetrope Ltd., 1998-2003
License: see license.txt
$Revision: 1.4 $
|
Constructor Summary | |
public | XStyle() |
COLOR_BACK | final public static int COLOR_BACK(Code) | | |
COLOR_FORE | final public static int COLOR_FORE(Code) | | |
FONT_FACE | final public static int FONT_FACE(Code) | | |
FONT_ITALIC | final public static int FONT_ITALIC(Code) | | |
FONT_SIZE | final public static int FONT_SIZE(Code) | | |
FONT_WEIGHT | final public static int FONT_WEIGHT(Code) | | |
XStyle | public XStyle()(Code) | | Create a new style object
|
clone | public Object clone()(Code) | | Create a copy of this component
the copy |
getFontHashcode | Integer getFontHashcode()(Code) | | Gets the font hashcode
the hashcode |
getNumStyles | public int getNumStyles()(Code) | | Get the number of styles managed by this style object
|
getStyleAsColor | public Color getStyleAsColor(int key)(Code) | | Retrieve a style element as a Color.
Parameters: key - The index of the element |
getStyleAsInt | public int getStyleAsInt(int key)(Code) | | Retrieve a style element as an int.
Parameters: key - The index of the element |
getStyleAsString | public String getStyleAsString(int key)(Code) | | Retrieve a style element as a String.
Parameters: key - The index of the element |
mergeStyle | public void mergeStyle(XStyle newStyle)(Code) | | For applying a hierarchy of styles to a new XStyle.
Only apply the style if it's found.
Parameters: newStyle - the style to merge with the current object. |
setFontHashcode | void setFontHashcode(int h)(Code) | | Sets the hashcode for the font
Parameters: h - the new hashcode for the font |
setNumStyles | public void setNumStyles(int num)(Code) | | Set the number of styles. The current data is copied to the new style array.
The number of styles can only be increased with this method so as to
prevent any loss of data.
Parameters: num - the number of new parameters |
setStyle | public void setStyle(int key, Object value)(Code) | | Set a style element.
Parameters: key - The index of the element Parameters: value - The Object value of the element |
setStyle | public void setStyle(int key, int value)(Code) | | Set a style element.
Parameters: key - The index of the element Parameters: value - The int value of the element |
|
|