|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.formaria.aria.ComponentFactory
org.formaria.aria.style.StyleFactory
public class StyleFactory
Extends the basic component factory by adding style information. As the component are added the styles are applied.
Copyright (c) Formaria Ltd., 2008
License: see license.txt
$Revision: 2.5 $
| Field Summary | |
|---|---|
protected StyleManager |
styleManager
The project StyleManager |
| Fields inherited from class org.formaria.aria.ComponentFactory |
|---|
adapter, ANNOTATEDIMAGE, basePackageName, BUTTON, CHECK, COMBO, componentFactories, currentMenu, currentMenuBar, currentProject, EDIT, GROUP, HOTSPOTIMAGE, IMAGE, IMAGEMAP, LABEL, layoutHelper, LIST, MENU, MENUBAR, MENUITEM, METACONTENT, PANEL, parentH, parentPanel, parentW, PASSWORD, RADIO, requiresParent, SCROLLABLEMETACONTENT, SCROLLPANE, SPLITPANE, TABLE, TABPANEL, TEXTAREA, translator, typeNames, UNKNOWN, WMF |
| Constructor Summary | |
|---|---|
StyleFactory(Project project,
java.lang.String packageName)
Create the StyleFactory and initialise with an StyleManager. |
|
| Method Summary | |
|---|---|
java.lang.Object |
addComponent(java.lang.String type,
java.lang.String nameStr,
int x,
int y,
int w,
int h)
Pass the addNamedComponent call to the StyleFactory base Class |
java.lang.Object |
addComponent(java.lang.String type,
java.lang.String nameStr,
int x,
int y,
int w,
int h,
java.lang.String txt)
Overloading method with the same signature in ComponentFactory. |
java.lang.Object |
addComponent(java.lang.String type,
java.lang.String nameStr,
int x,
int y,
int w,
int h,
java.lang.String txt,
java.lang.String style)
Pass the addNamedComponent call to the StyleFactory base Class |
java.lang.Object |
addComponent(java.lang.String type,
java.lang.String nameStr,
java.lang.Object constraint,
java.lang.String txt,
java.lang.String style)
Pass the addNamedComponent call to the StyleFactory base Class |
java.lang.Object |
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,
java.lang.String style,
boolean lookupComp,
boolean sizeAlreadySet)
Apply a style to a component, looking up the style name if necessary |
void |
applyStyle(java.lang.Object c,
Style xstyle)
Apply a style to a component. |
void |
applyStyle(java.lang.Object c,
Style xstyle,
boolean sizeAlreadySet)
Apply a style to a component. |
protected void |
setup()
moved from the ctor so as to allow subclassed StyleFactories to do the initialisation in the getInstance(). |
| Methods inherited from class org.formaria.aria.ComponentFactory |
|---|
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 StyleManager styleManager
| Constructor Detail |
|---|
public StyleFactory(Project 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.String nameStr,
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,
java.lang.String nameStr,
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,
java.lang.String nameStr,
int x,
int y,
int w,
int h,
java.lang.String txt)
addComponent in class ComponentFactorytype - 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,
java.lang.String nameStr,
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.lang.Object 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 LayoutHelper 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,
java.lang.String style,
boolean lookupComp,
boolean sizeAlreadySet)
c - the component to stylestyle - the style namelookupComp - true to lookup the style based on the component classsizeAlreadySet - specifies whether the preferred size can be set by the style
public void applyStyle(java.lang.Object c,
Style xstyle)
c - The component to stylexstyle - The Style object whose style is to be applied to the
component
public void applyStyle(java.lang.Object c,
Style xstyle,
boolean sizeAlreadySet)
c - The component to stylexstyle - The Style 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 | ||||||||