|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sptci.echo2.Utilities
public final class Utilities
A utility class that provides methods to create and initialise standard UI components.
Copyright 2006 Sans Pareil Technologies, Inc.
| Constructor Summary | |
|---|---|
private |
Utilities()
Default constructor. |
| Method Summary | |
|---|---|
static Button |
createButton(String view,
String name)
Create the button identified by the specified name. |
static Button |
createButton(String view,
String name,
ActionListener actionListener)
Create the button identified by the specified name. |
static Button |
createButton(String view,
String name,
ActionListener actionListener,
Object viewObject)
Create the button identified by the specified name. |
static Button |
createButton(String view,
String name,
ImageReference image,
ActionListener actionListener)
Create the button identified by the specified name. |
static Button |
createButton(String view,
String name,
String styleName)
Create the button identified by the specified name. |
static Button |
createButton(String view,
String name,
String styleName,
ActionListener actionListener)
Create the button identified by the specified name. |
static Button |
createButton(String view,
String name,
String styleName,
ActionListener actionListener,
Object viewObject)
Create the button identified by the specified name. |
private static Column |
createColumn()
Create a column and set its style name to Default.Column. |
private static Column |
createColumn(String style)
Create a column and set its style name to the specified value. |
static Label |
createLabel(String view,
String name)
Create a label using the specified name property. |
static Label |
createLabel(String view,
String name,
Object viewObject)
Create a label using the specified name property and add it to the specified component. |
static Label |
createLabel(String view,
String name,
String styleName)
Create a label using the specified name property and style name. |
static Label |
createLabel(String view,
String name,
String styleName,
Object viewObject)
Create a label using the specified name property and style name and add to the specified viewObject. |
static Menu |
createMenu(String view,
String name)
Create the Menu identified by the specified name. |
static MenuItem |
createMenuItem(String view,
String name)
Create the MenuItem identified by the specified name. |
static MenuItem |
createMenuItem(String view,
String name,
ActionListener actionListener)
Create the menuItem identified by the specified name. |
static MenuItem |
createMenuItem(String view,
String name,
ActionListener actionListener,
Object viewObject)
Create the menuItem identified by the specified name. |
static PushButton |
createPushButton(String view,
String name)
Create the button identified by the specified name. |
static PushButton |
createPushButton(String view,
String name,
ActionListener actionListener)
Create the button identified by the specified name. |
static PushButton |
createPushButton(String view,
String name,
ActionListener actionListener,
Object viewObject)
Create the button identified by the specified name. |
static RichTextArea |
createRichTextArea(String view,
String name)
Create the rich text area identified by the name specified. |
static RichTextArea |
createRichTextArea(String view,
String name,
Object viewObject)
Create the text field identified by the name specified. |
private static Row |
createRow()
Create a row and set its style name to Default.Row. |
private static Row |
createRow(String style)
Create a row and set its style name to the specified value. |
static TextArea |
createTextArea(String view,
String name)
Create the text area identified by the name specified. |
static TextArea |
createTextArea(String view,
String name,
Object viewObject)
Create the text area identified by the name specified. |
static TextArea |
createTextArea(String view,
String name,
String style)
Create the text area identified by the name specified. |
static TextArea |
createTextArea(String view,
String name,
String style,
Object viewObject)
Create the text area identified by the name specified. |
static TextField |
createTextField(String view,
String name)
Create the text field identified by the name specified. |
static TextField |
createTextField(String view,
String name,
ActionListener actionListener)
Create the text field identified by the name specified. |
static TextField |
createTextField(String view,
String name,
ActionListener actionListener,
Object viewObject)
Create the text field identified by the name specified. |
static TextField |
createTextField(String view,
String name,
Object viewObject)
Create the text field identified by the name specified. |
static TextField |
createTextField(String view,
String name,
String styleName)
Create the text field identified by the name specified. |
static TextField |
createTextField(String view,
String name,
String styleName,
ActionListener listener)
Create the text field identified by the name specified. |
static TextField |
createTextField(String view,
String name,
String styleName,
ActionListener listener,
Object viewObject)
Create the text field identified by the name specified. |
static TextField |
createTextField(String view,
String name,
String styleName,
Object viewObject)
Create the text field identified by the name specified. |
private static String |
processStyleName(String view,
String styleName,
String identifier)
Apply some logical rules to the styleName parameter
specified. |
private static void |
setField(String name,
Object viewObject,
Component value)
Set the field identified by the name specified in the object specified with the value specified. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
private Utilities()
| Method Detail |
|---|
public static final Button createButton(String view,
String name)
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the button to create.
The name must match the name of the appropriate button. The
same name must be configured in the configuration file for
the properties and resources.
public static final Button createButton(String view,
String name,
ActionListener actionListener)
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the button to create.
The name must match the name of the appropriate button. The
same name must be configured in the configuration file for
the properties and resources.actionListener - The ActionListener to register
for the newly created button.
createButton( String, String )
public static final Button createButton(String view,
String name,
ActionListener actionListener,
Object viewObject)
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the button to create.
The name must match the name of the appropriate button. The
same name must be configured in the configuration file for
the properties and resources.actionListener - The ActionListener to register
for the newly created button.viewObject - The object whose identically named field is to
be set with the newly created component.
createButton( String, String, ActionListener ),
setField(java.lang.String, java.lang.Object, nextapp.echo2.app.Component)
public static final Button createButton(String view,
String name,
ImageReference image,
ActionListener actionListener)
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the button to create.
The name must match the name of the appropriate button. The
same name must be configured in the configuration file for
the properties and resources.image - The image that is to be displayed as the button.actionListener - The ActionListener to register
for the newly created button.
public static final Button createButton(String view,
String name,
String styleName)
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the button to create.
The name must match the name of the appropriate button. The
same name must be configured in the configuration file for
the properties and resources.styleName - The name of the style to apply to the button.
This need only be the sub-part of the fully qualified style
name. The name of the view and the default ".Button" will
be applied.
public static final Button createButton(String view,
String name,
String styleName,
ActionListener actionListener)
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the button to create.
The name must match the name of the appropriate button. The
same name must be configured in the configuration file for
the properties and resources.styleName - The name of the style to apply to the button.
This need only be the sub-part of the fully qualified style
name. The name of the view and the default ".Button" will
be applied.actionListener - The ActionListener to register
for the newly created button.
createButton( String, String, String )
public static final Button createButton(String view,
String name,
String styleName,
ActionListener actionListener,
Object viewObject)
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the button to create.
The name must match the name of the appropriate button. The
same name must be configured in the configuration file for
the properties and resources.styleName - The name of the style to apply to the button.
This need only be the sub-part of the fully qualified style
name. The name of the view and the default ".Button" will
be applied.actionListener - The ActionListener to register
for the newly created button.viewObject - The object whose identically named field is to
be set with the newly created component.
createButton( String, String, String, ActionListener ),
setField(java.lang.String, java.lang.Object, nextapp.echo2.app.Component)
public static final PushButton createPushButton(String view,
String name)
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the button to create.
The name must match the name of the appropriate button. The
same name must be configured in the configuration file for
the properties and resources.
public static final PushButton createPushButton(String view,
String name,
ActionListener actionListener)
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the button to create.
The name must match the name of the appropriate button. The
same name must be configured in the configuration file for
the properties and resources.actionListener - The ActionListener to register
for the newly created button.
createPushButton( String, String )
public static final PushButton createPushButton(String view,
String name,
ActionListener actionListener,
Object viewObject)
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the button to create.
The name must match the name of the appropriate button. The
same name must be configured in the configuration file for
the properties and resources.actionListener - The ActionListener to register
for the newly created button.viewObject - The object whose identically named field is to
be set with the newly created component.
createPushButton( String, String, ActionListener ),
setField(java.lang.String, java.lang.Object, nextapp.echo2.app.Component)private static final Column createColumn()
Default.Column.
createColumn( String )private static final Column createColumn(String style)
style - The name of the style configuration to apply to the
component.
public static final Label createLabel(String view,
String name)
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the label to create. The
same name must be configured in the configuration file for
the properties and resources.
public static final Label createLabel(String view,
String name,
Object viewObject)
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the label to create. The
same name must be configured in the configuration file for
the properties and resources.viewObject - The object in which a Label field is defined with
name as the field name.
createLabel( String, String ),
setField(java.lang.String, java.lang.Object, nextapp.echo2.app.Component)
public static final Label createLabel(String view,
String name,
String styleName)
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the label to create. The
same name must be configured in the configuration file for
the properties and resources.styleName - The name of the style to apply to the button.
This need only be the sub-part of the fully qualified style
name. The name of the view and the default ".Label" will
be applied.
createLabel( String, String )
public static final Label createLabel(String view,
String name,
String styleName,
Object viewObject)
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the label to create. The
same name must be configured in the configuration file for
the properties and resources.styleName - The name of the style to apply to the button.
This need only be the sub-part of the fully qualified style
name. The name of the view and the default ".Label" will
be applied.viewObject - The object in which a Label field is
defined with name.
createLabel( String, String, String )
public static final Menu createMenu(String view,
String name)
Menu identified by the specified name.
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the menu to create.
The name must match the name of the appropriate menu. The
same name must be configured in the configuration file for
the properties and resources.
public static final MenuItem createMenuItem(String view,
String name)
MenuItem identified by the specified name.
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the menuItem to create.
The name must match the name of the appropriate menuItem. The
same name must be configured in the configuration file for
the properties and resources.
public static final MenuItem createMenuItem(String view,
String name,
ActionListener actionListener)
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the menuItem to create.
The name must match the name of the appropriate menuItem. The
same name must be configured in the configuration file for
the properties and resources.actionListener - The ActionListener to register
for the newly created menuItem.
createMenuItem( String, String )
public static final MenuItem createMenuItem(String view,
String name,
ActionListener actionListener,
Object viewObject)
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the menuItem to create.
The name must match the name of the appropriate menuItem. The
same name must be configured in the configuration file for
the properties and resources.actionListener - The ActionListener to register
for the newly created menuItem.viewObject - The object whose identically named field is to
be set with the newly created component.
createMenuItem( String, String, ActionListener ),
setField(java.lang.String, java.lang.Object, nextapp.echo2.app.Component)private static final Row createRow()
Default.Row.
createRow( String )private static final Row createRow(String style)
style - The name of the style configuration to apply to the
component.
public static final TextArea createTextArea(String view,
String name)
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the text area to create.
The name must match the name of the appropriate field
without the Area suffix (eg. userName, salary, ...). The
same name must be configured in the configuration file for
the properties and resources.
public static final TextArea createTextArea(String view,
String name,
Object viewObject)
Area in the viewClass
with the newly created component.
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the text field to create.
The name must match the name of the appropriate field
without the Area suffix (eg. userName, salary, ...). The
same name must be configured in the configuration file for
the properties and resources.viewObject - The object whose field is to be updated with the
newly created component
createTextArea( String, String ),
setField(java.lang.String, java.lang.Object, nextapp.echo2.app.Component)
public static final TextArea createTextArea(String view,
String name,
String style)
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the text field to create.
The name must match the name of the appropriate field
without the Area suffix (eg. userName, salary, ...). The
same name must be configured in the configuration file for
the properties and resources.style - The name of the style to apply to the component.
createTextArea( String, String )
public static final TextArea createTextArea(String view,
String name,
String style,
Object viewObject)
name in the
view with the newly created object.
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the text field to create.
The name must match the name of the appropriate field
without the Area suffix (eg. userName, salary, ...). The
same name must be configured in the configuration file for
the properties and resources.style - The name of the style to apply to the component.viewObject - The object whose field is to be updated with the
newly created component
createTextArea( String, String )
public static final TextField createTextField(String view,
String name)
name is password, then a
PasswordField is returned instead of a regular
TextField.
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the text field to create.
The name must match the name of the appropriate field
without the Field suffix (eg. userName, salary, ...). The
same name must be configured in the configuration file for
the properties and resources.
public static final TextField createTextField(String view,
String name,
ActionListener actionListener)
Field in the viewClass
with the newly created component.
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the text field to create.
The name must match the name of the appropriate field
without the Field suffix (eg. userName, salary, ...). The
same name must be configured in the configuration file for
the properties and resources.actionListener - The action listener to add to the component.
createTextField( String, String )
public static final TextField createTextField(String view,
String name,
Object viewObject)
Field in the viewClass
with the newly created component.
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the text field to create.
The name must match the name of the appropriate field
without the Field suffix (eg. userName, salary, ...). The
same name must be configured in the configuration file for
the properties and resources.viewObject - The object whose field is to be updated with the
newly created component
createTextField( String, String ),
setField(java.lang.String, java.lang.Object, nextapp.echo2.app.Component)
public static final TextField createTextField(String view,
String name,
ActionListener actionListener,
Object viewObject)
Field in the viewClass
with the newly created component.
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the text field to create.
The name must match the name of the appropriate field
without the Field suffix (eg. userName, salary, ...). The
same name must be configured in the configuration file for
the properties and resources.actionListener - The action listener to add to the component.viewObject - The object whose field is to be updated with the
newly created component
createTextField( String, String, Object )
public static final TextField createTextField(String view,
String name,
String styleName)
name is password, then a
PasswordField is returned instead of a regular
TextField.
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the text field to create.
The name must match the name of the appropriate field
without the Field suffix (eg. userName, salary, ...). The
same name must be configured in the configuration file for
the properties and resources.styleName - The name of the style to apply to the button.
This need only be the sub-part of the fully qualified style
name. The name of the view and the default ".TextComponent" will
be applied.
public static final TextField createTextField(String view,
String name,
String styleName,
ActionListener listener)
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the text field to create.
The name must match the name of the appropriate field
without the Field suffix (eg. userName, salary, ...). The
same name must be configured in the configuration file for
the properties and resources.styleName - The name of the style to apply to the button.
This need only be the sub-part of the fully qualified style
name. The name of the view and the default ".TextComponent" will
be applied.listener - The action listener to asscociated with the text field.
createTextField( String, String, String )
public static final TextField createTextField(String view,
String name,
String styleName,
Object viewObject)
Field in the viewClass
with the newly created component.
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the text field to create.
The name must match the name of the appropriate field
without the Field suffix (eg. userName, salary, ...). The
same name must be configured in the configuration file for
the properties and resources.styleName - The name of the style to apply to the button.
This need only be the sub-part of the fully qualified style
name. The name of the view and the default ".TextComponent" will
be applied.viewObject - The object whose field is to be updated with the
newly created component
createTextField( String, String, String ),
setField(java.lang.String, java.lang.Object, nextapp.echo2.app.Component)
public static final TextField createTextField(String view,
String name,
String styleName,
ActionListener listener,
Object viewObject)
Field in the viewClass
with the newly created component. Add the specified action listener
as a registered event handler for the text field.
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the text field to create.
The name must match the name of the appropriate field
without the Field suffix (eg. userName, salary, ...). The
same name must be configured in the configuration file for
the properties and resources.styleName - The name of the style to apply to the button.
This need only be the sub-part of the fully qualified style
name. The name of the view and the default ".TextComponent" will
be applied.listener - The action listener to asscociated with the text field.viewObject - The object whose field is to be updated with the
newly created component
createTextField( String, String, String, ActionListener ),
setField(java.lang.String, java.lang.Object, nextapp.echo2.app.Component)
public static final RichTextArea createRichTextArea(String view,
String name)
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the text area to create.
The name must match the name of the appropriate field
without the Area suffix (eg. userName, salary, ...). The
same name must be configured in the configuration file for
the properties and resources.
public static final RichTextArea createRichTextArea(String view,
String name,
Object viewObject)
Area in the viewClass
with the newly created component.
view - The name of the view to which the component
is to be added. This must match the name of the configuration
setting.name - The name used to identify the text field to create.
The name must match the name of the appropriate field
without the Area suffix (eg. userName, salary, ...). The
same name must be configured in the configuration file for
the properties and resources.viewObject - The object whose field is to be updated with the
newly created component
createRichTextArea( String, String ),
setField(java.lang.String, java.lang.Object, nextapp.echo2.app.Component)
private static final String processStyleName(String view,
String styleName,
String identifier)
styleName parameter
specified.
view - The view component to which the style name is being
applied. Usually the fully qualified class name.styleName - The name of the style to apply to the button.
This need only be the sub-part of the fully qualified style
name. The name of the view and the identifier will be applied.identifier - The identifier for the component. All style
names end with an identifier.
private static void setField(String name,
Object viewObject,
Component value)
name - The field name.viewObject - The object in which the field is defined.value - The value of the field to set.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||