SPT Core API

com.sptci.epng
Class Utilities

java.lang.Object
  extended by com.sptci.echo2.Utilities
      extended by com.sptci.epng.Utilities

public final class Utilities
extends Utilities

A utility class that provides methods to create and initialise standard UI components.

Copyright 2006 Sans Pareil Technologies, Inc.

Version:
$Id: Utilities.java 4553 2008-12-24 10:34:16Z rakesh $
Author:
Rakesh Vidyadharan 2006-01-15

Constructor Summary
Utilities()
           
 
Method Summary
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.
 
Methods inherited from class com.sptci.echo2.Utilities
createButton, createButton, createButton, createButton, createButton, createButton, createButton, createButton, createLabel, createLabel, createLabel, createLabel, createTextArea, createTextArea, createTextArea, createTextArea, createTextField, createTextField, createTextField, createTextField, createTextField, createTextField, createTextField, createTextField, processStyleName, setField
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Utilities

public Utilities()
Method Detail

createMenu

public static Menu createMenu(String view,
                              String name)
Create the Menu identified by the specified name.

Parameters:
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.
Returns:
Menu The new menu that was created.

createMenuItem

public static MenuItem createMenuItem(String view,
                                      String name)
Create the MenuItem identified by the specified name.

Parameters:
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.
Returns:
MenuItem The new menuItem that was created.

createMenuItem

public static MenuItem createMenuItem(String view,
                                      String name,
                                      ActionListener actionListener)
Create the menuItem identified by the specified name.

Parameters:
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.
Returns:
MenuItem The new menuItem that was created.
See Also:
createMenuItem( String, String )

createMenuItem

public static MenuItem createMenuItem(String view,
                                      String name,
                                      ActionListener actionListener,
                                      Object viewObject)
Create the menuItem identified by the specified name.

Parameters:
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.
Returns:
MenuItem The new menuItem that was created.
See Also:
createMenuItem( String, String, ActionListener ), Utilities.setField(java.lang.String, java.lang.Object, nextapp.echo2.app.Component)

createPushButton

public static PushButton createPushButton(String view,
                                          String name)
Create the button identified by the specified name.

Parameters:
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.
Returns:
PushButton The new button that was created.

createPushButton

public static PushButton createPushButton(String view,
                                          String name,
                                          ActionListener actionListener)
Create the button identified by the specified name.

Parameters:
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.
Returns:
PushButton The new button that was created.
See Also:
createPushButton( String, String )

createPushButton

public static PushButton createPushButton(String view,
                                          String name,
                                          ActionListener actionListener,
                                          Object viewObject)
Create the button identified by the specified name.

Parameters:
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.
Returns:
PushButton The new button that was created.
See Also:
createPushButton( String, String, ActionListener ), Utilities.setField(java.lang.String, java.lang.Object, nextapp.echo2.app.Component)

createRichTextArea

public static RichTextArea createRichTextArea(String view,
                                              String name)
Create the rich text area identified by the name specified.

Parameters:
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.
Returns:
RichTextArea The new textArea component.

createRichTextArea

public static RichTextArea createRichTextArea(String view,
                                              String name,
                                              Object viewObject)
Create the text field identified by the name specified. Sets the identically named Area in the viewClass with the newly created component.

Parameters:
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
Returns:
RichTextArea The new textArea component.
See Also:
createRichTextArea( String, String ), Utilities.setField(java.lang.String, java.lang.Object, nextapp.echo2.app.Component)

SPT Core API