| |
|
| java.lang.Object net.xoetrope.xui.style.XStyleManager
All known Subclasses: net.xoetrope.builder.editor.XEditorStyleManager,
XStyleManager | public class XStyleManager (Code) | | Class for managing XStyles. XStyles are created
externally and added to the hashtable. Also handles the retrieval of styles.
Copyright (c) Xoetrope Ltd., 1998-2004
$Revision: 1.14 $
|
Constructor Summary | |
public | XStyleManager(int styleCount) Construct a new style manager with an initial size. |
XStyleManager | public XStyleManager(int styleCount)(Code) | | Construct a new style manager with an initial size.
|
addStyle | public void addStyle(String name, XStyle newStyle)(Code) | | Add a new XStyle to the hashtable with a unique name
|
getFont | public Font getFont(String style)(Code) | | Get the font for a given style. Use the bold and italic attributes and do a
bitwise or using the Font values to set the style.
Parameters: style - the nsame of the style |
getFont | public Font getFont(XStyle style)(Code) | | Get the font for a given style. Use the bold and italic attributes and do a
bitwise or using the Font values to set the style.
Parameters: style - the style |
getStyle | public XStyle getStyle(String name, boolean create)(Code) | | Retrieve a named XStyle from the hashtable. loop thru the "/" character
and merge each one found with a new XStyle.
Parameters: name - The name of the style. Parameters: create - booean to indicate whether the style should be created. |
getStyle | public XStyle getStyle(String name)(Code) | | Retrieve a named XStyle from the hashtable. loop thru the "/" character
and merge each one found with a new XStyle.
Parameters: name - The name of the style. |
getStyleIndex | protected int getStyleIndex(String name)(Code) | | Gets a integer constant corresponding to a style name
Parameters: name - the style name e.g. "font_face" the style constant e.g. XStyle.FONT_FACE |
getStyleParent | public XStyle getStyleParent(String name)(Code) | | Get the parent of the named style
Parameters: name - the style name the parent style |
getStyles | public Hashtable getStyles()(Code) | | Get the table of styles
the stytle table |
load | public void load(String file)(Code) | | Load the styles from the specified file
Parameters: file - the file name of the file to load |
loadXStyle | public void loadXStyle(XmlElement element, String path)(Code) | | Load a style from the XML element and save it to the specified path in the
style hierarchy
Parameters: element - the source element Parameters: path - the save path |
|
|
|