public class Utilities extends Object
Copyright 2006 Sans Pareil Technologies, Inc.
| Modifier | Constructor and Description |
|---|---|
protected |
Utilities()
Default constructor.
|
| Modifier and Type | Method and Description |
|---|---|
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,
Object viewObject)
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.
|
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 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.
|
protected static String |
processStyleName(String view,
String styleName,
String identifier)
Apply some logical rules to the
styleName parameter
specified. |
protected 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.
|
public static Button createButton(String view, String name)
Default.Button.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.createButton( String, String, String )public static 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. If this is null then
no listener is associated.createButton( String, String )public static Button createButton(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 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.viewObject - The object whose identically named field is to
be set with the newly created component.createButton( String, String ),
setField(java.lang.String, java.lang.Object, nextapp.echo2.app.Component)public static 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 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 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. Specify null to avoid setting a style
name altogether.public static 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. Specify null to avoid setting style.actionListener - The ActionListener to register
for the newly created button.createButton( String, String, String )public static 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. Specify null to avoid setting style.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 Label createLabel(String view, String name)
Default.Labelview - 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.createLabel( String, String, String )public static 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 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. Specify null to avoid setting style.public static 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. Specify null to avoid setting style.viewObject - The object in which a Label field is
defined with name.createLabel( String, String, String )public static TextArea createTextArea(String view, String name)
Default.TextComponent.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.createTextArea( String, String, String )public static 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 componentcreateTextArea( String, String ),
setField(java.lang.String, java.lang.Object, nextapp.echo2.app.Component)public static 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.
Specify null to avoid setting style.public static 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.
Specify null to avoid setting style.viewObject - The object whose field is to be updated with the
newly created componentcreateTextArea( String, String )public static TextField createTextField(String view, String name)
name is password, then a
PasswordField is returned instead of a regular
TextField. Returns a component with the style name set
to Default.TextComponent.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.createTextField( String, String, String )public static 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. If
this is null no listener is added.createTextField( String, String )public static 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 componentcreateTextField( String, String ),
setField(java.lang.String, java.lang.Object, nextapp.echo2.app.Component)public static 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. This
may be null.viewObject - The object whose field is to be updated with the
newly created componentcreateTextField( String, String, Object )public static 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 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 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 componentcreateTextField( String, String, String ),
setField(java.lang.String, java.lang.Object, nextapp.echo2.app.Component)public static 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 componentcreateTextField( String, String, String, ActionListener ),
setField(java.lang.String, java.lang.Object, nextapp.echo2.app.Component)protected static 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.protected 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.