| java.lang.Object net.xoetrope.xui.XComponentFactory net.xoetrope.xui.style.XStyleFactory
All known Subclasses: net.xoetrope.builder.editor.XEditorStyleFactory, net.xoetrope.builder.editor.XEditorComponentFactory,
XStyleFactory | public class XStyleFactory extends XComponentFactory (Code) | | Extends the basic component factory by adding style information.
As the component are added the styles are applied.
Copyright: Copyright (c) Xoetrope Ltd., 1998-2003
License: see license.txt
$Revision: 1.13 $
|
Constructor Summary | |
public | XStyleFactory(String packageName) Create the StyleFactory and initialise with an XStyleManager. |
Method Summary | |
public Component | addClass(String className, int x, int y, int w, int h, String style) | public Component | addClass(String className, int x, int y, int w, int h) Overloading the method with the same signature in XComponentFactory. | public Component | addComponent(String type, Object constraint, String txt, String style) | public Component | addComponent(String type, int x, int y, int w, int h, String txt, String style) | public Component | addComponent(String type, int x, int y, int w, int h, String txt) Overloading method with the same signature in XComponentFactory. | public Component | addComponent(String type, int x, int y, int w, int h) | public LayoutManager | addLayout(Container cont, int type, Hashtable attribs) | public void | applyStyle(Component c, String style, boolean lookupComp) | public void | applyStyle(Component c, XStyle xstyle) Apply a style to a component. | public void | applyStyle(Component c, String style) Called after a new component is created. | protected void | setup() moved from the ctor so as to allow subclassed XStyleFactories to do the
initialisation in the getInstance(). |
XStyleFactory | public XStyleFactory(String packageName)(Code) | | Create the StyleFactory and initialise with an XStyleManager.
Parameters: manager - the XStyleManager to initialise with |
addClass | public Component addClass(String className, int x, int y, int w, int h, String style)(Code) | | Pass the addComponent call to the XStyleFactory base Class
Parameters: className - The name of the class to be constructed Parameters: x - The x coordinate of the new component Parameters: y - The y coordinate of the new component Parameters: w - The width of the new component Parameters: h - The height of the new component Parameters: style - The name of the style to apply |
addClass | public Component addClass(String className, int x, int y, int w, int h)(Code) | | Overloading the method with the same signature in XComponentFactory.
Applies a default style for the component.
Parameters: className - The name of the class to be constructed Parameters: x - The x coordinate of the new component Parameters: y - The y coordinate of the new component Parameters: w - The width of the new component Parameters: h - The height of the new component |
addComponent | public Component addComponent(String type, Object constraint, String txt, String style)(Code) | | Pass the addNamedComponent call to the XStyleFactory base Class
Parameters: type - The type of object being constructed Parameters: constraint - the layout constraint Parameters: txt - The content to display Parameters: style - The name of the style to apply |
addComponent | public Component addComponent(String type, int x, int y, int w, int h, String txt, String style)(Code) | | Pass the addNamedComponent call to the XStyleFactory base Class
Parameters: type - The type of object being constructed Parameters: x - The x coordinate of the new component Parameters: y - The y coordinate of the new component Parameters: w - The width of the new component Parameters: h - The height of the new component Parameters: style - The name of the style to apply |
addComponent | public Component addComponent(String type, int x, int y, int w, int h, String txt)(Code) | | Overloading method with the same signature in XComponentFactory.
Parameters: type - The type of object being constructed Parameters: x - The x coordinate of the new component Parameters: y - The y coordinate of the new component Parameters: w - The width of the new component Parameters: h - The height of the new component Parameters: txt - The text/caption of the component |
addComponent | public Component addComponent(String type, int x, int y, int w, int h)(Code) | | Pass the addNamedComponent call to the XStyleFactory base Class
Parameters: type - The type of object being constructed Parameters: x - The x coordinate of the new component Parameters: y - The y coordinate of the new component Parameters: w - The width of the new component Parameters: h - The height of the new component Parameters: style - The name of the style to apply |
addLayout | public LayoutManager addLayout(Container cont, int type, Hashtable attribs)(Code) | | Sets a LayoutManager for the panel
Parameters: cont - the container whose layout manager is being set or null to set the parent panel's layout manager Parameters: type - the layout manager as defined in the XLayoutHelper class Parameters: style - the style containing the layout manager attributes |
applyStyle | public void applyStyle(Component c, String style, boolean lookupComp)(Code) | | Apply a style to a component, looking up the style name if necessary
Parameters: c - the component to style Parameters: style - the style name Parameters: lookupComp - true to lookup the style based on the component class |
applyStyle | public void applyStyle(Component c, XStyle xstyle)(Code) | | Apply a style to a component. Set the font and foreground/background color.
Parameters: c - the component to style Parameters: style - the style name |
applyStyle | public void applyStyle(Component c, String style)(Code) | | Called after a new component is created. Append the style to the base and
then append the component classname with '/' delimiters.
Parameters: c - Component to apply the style to. Parameters: style - the name of the style to apply. |
setup | protected void setup()(Code) | | moved from the ctor so as to allow subclassed XStyleFactories to do the
initialisation in the getInstance().
|
Methods inherited from net.xoetrope.xui.XComponentFactory | public Component addClass(String className, int x, int y, int w, int h)(Code)(Java Doc) public Component addComponent(String type, int x, int y, int w, int h, String content)(Code)(Java Doc) public Component addComponent(String type, Object pos, String content)(Code)(Java Doc) public void addComponent(Component c)(Code)(Java Doc) public void addComponent(Component c, Object constraint)(Code)(Java Doc) public Object addElement(String type, String name, String content, Hashtable attribs)(Code)(Java Doc) public LayoutManager addLayout(Container cont, int type)(Code)(Java Doc) protected Component buildRegisteredComponent(int type, String content)(Code)(Java Doc) protected Component buildRegisteredComponent(String type, String content)(Code)(Java Doc) public Component constructComponent(int type, String content)(Code)(Java Doc) public static Vector getFactories()(Code)(Java Doc) public static XLayoutHelper getLayoutHelper()(Code)(Java Doc) public Component getParentComponent()(Code)(Java Doc) public static int getTypeCode(String typeName)(Code)(Java Doc) public static void registerComponentFactory(XComponentConstructor factory)(Code)(Java Doc) public static void setLayoutHelper(XLayoutHelper newHelper)(Code)(Java Doc) public void setParentComponent(Component c)(Code)(Java Doc) public void setResourceBundle(String resourceBundleName)(Code)(Java Doc) protected static void setupTypeNames()(Code)(Java Doc) public String translate(String key)(Code)(Java Doc) public static void updateComponentFactories()(Code)(Java Doc)
|
|
|