|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.xui.XComponentFactory
net.xoetrope.xui.style.XStyleFactory
public class XStyleFactory
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: 2.5 $
| Field Summary | |
|---|---|
protected XStyleManager |
styleManagerThe project XStyleManager |
| Fields inherited from class net.xoetrope.xui.XComponentFactory |
|---|
adapter, basePackageName, componentFactories, currentMenu, currentMenuBar, currentProject, layoutHelper, parentH, parentPanel, parentW, requiresParent, translator, typeNames, XANNOTATEDIMAGE, XBUTTON, XCHECK, XCOMBO, XEDIT, XGROUP, XHOTSPOTIMAGE, XIMAGE, XIMAGEMAP, XLABEL, XLIST, XMENU, XMENUBAR, XMENUITEM, XMETACONTENT, XPANEL, XPASSWORD, XRADIO, XSCROLLABLEMETACONTENT, XSCROLLPANE, XSPLITPANE, XTABLE, XTABPANEL, XTEXTAREA, XUNKNOWN, XWMF |
| Constructor Summary | |
|---|---|
XStyleFactory(XProject project, java.lang.String packageName)Create the StyleFactory and initialise with an XStyleManager. |
|
| Method Summary | |
|---|---|
java.lang.Object |
addComponent(java.lang.String type, int x, int y, int w, int h)Pass the addNamedComponent call to the XStyleFactory base Class |
java.lang.Object |
addComponent(java.lang.String type, int x, int y, int w, int h, java.lang.String txt)Overloading method with the same signature in XComponentFactory. |
java.lang.Object |
addComponent(java.lang.String type, int x, int y, int w, int h, java.lang.String txt, java.lang.String style)Pass the addNamedComponent call to the XStyleFactory base Class |
java.lang.Object |
addComponent(java.lang.String type, java.lang.Object constraint, java.lang.String txt, java.lang.String style)Pass the addNamedComponent call to the XStyleFactory base Class |
java.awt.LayoutManager |
addLayout(java.lang.Object cont, int type, java.util.Hashtable attribs)Sets a LayoutManager for the panel |
void |
applyStyle(java.lang.Object c, java.lang.String style)Called after a new component is created. |
void |
applyStyle(java.lang.Object c, java.lang.String style, boolean lookupComp)Apply a style to a component, looking up the style name if necessary |
void |
applyStyle(java.lang.Object c, XStyle xstyle)Apply a style to a component. |
protected void |
setup()moved from the ctor so as to allow subclassed XStyleFactories to do the initialisation in the getInstance(). |
| Methods inherited from class net.xoetrope.xui.XComponentFactory |
|---|
addComponent, addComponent, addComponent, addElement, addLayout, buildRegisteredComponent, constructComponent, getComponentAdapter, getFactories, getLayoutHelper, getParentComponent, getTypeCode, instantiate, registerComponentFactory, setLayoutHelper, setParentComponent, setRequiresParent, setResourceBundle, setupTypeNames, translate, updateComponentFactories |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected XStyleManager styleManager
| Constructor Detail |
|---|
public XStyleFactory(XProject project,
java.lang.String packageName)
project - The current projectpackageName - The package being used in the project AWT/Swing| Method Detail |
|---|
protected void setup()
public java.lang.Object addComponent(java.lang.String type,
java.lang.Object constraint,
java.lang.String txt,
java.lang.String style)
type - The type of object being constructedconstraint - the layout constrainttxt - The content to displaystyle - The name of the style to apply
public java.lang.Object addComponent(java.lang.String type,
int x,
int y,
int w,
int h,
java.lang.String txt,
java.lang.String style)
txt - The content to be applied to the componenttype - The type of object being constructedx - The x coordinate of the new componenty - The y coordinate of the new componentw - The width of the new componenth - The height of the new componentstyle - The name of the style to apply
public java.lang.Object addComponent(java.lang.String type,
int x,
int y,
int w,
int h,
java.lang.String txt)
addComponent in class XComponentFactory
type - The type of object being constructedx - The x coordinate of the new componenty - The y coordinate of the new componentw - The width of the new componenth - The height of the new componenttxt - The text/caption of the component
public java.lang.Object addComponent(java.lang.String type,
int x,
int y,
int w,
int h)
type - The type of object being constructedx - The x coordinate of the new componenty - The y coordinate of the new componentw - The width of the new componenth - The height of the new component
public java.awt.LayoutManager addLayout(java.lang.Object cont,
int type,
java.util.Hashtable attribs)
attribs - Hashtable of layout attributescont - the container whose layout manager is being set or null to set the parent panel's layout managertype - the layout manager as defined in the XLayoutHelper class
public void applyStyle(java.lang.Object c,
java.lang.String style,
boolean lookupComp)
c - the component to stylestyle - the style namelookupComp - true to lookup the style based on the component class
public void applyStyle(java.lang.Object c,
XStyle xstyle)
c - The component to stylexstyle - The XStyle object whose style is to be applied to the component
public void applyStyle(java.lang.Object c,
java.lang.String style)
c - Component to apply the style to.style - the name of the style to apply.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||