Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## UI
Class GEVAStringProperty

    java.lang.Object
      UI.GEVAControl
          UI.GEVAPropertyControl
              UI.GEVAStringProperty

All Implemented Interfaces:
  java.util.EventListener, javax.swing.event.DocumentListener

    public class GEVAStringProperty

extends GEVAPropertyControl
implements javax.swing.event.DocumentListener

Input control that takes any value. Type can be "rout" which creates a read-only text area for piped output of external program - hacked in, should probably make a generic 'area' type with read-only flag or something. TODO - Currently (2008y08M23d) doesn't support events

Author:
  eliottbartley

Field Summary
`static java.lang.String` | `PP_ACCEPT_ALL` Constructor params.
`static java.lang.String` | `PT_READWRITE` Constructor type.

Fields inherited from class UI.GEVAPropertyControl
`initial, params`

Fields inherited from class UI.GEVAControl
`comment, dirtyListener, name, parent, title, type`

Constructor Summary
`GEVAStringProperty(GEVADirtyListener dirtyListener, GEVAPropertyContainer parent, java.lang.String type, java.lang.String title, java.lang.String name, java.lang.String comment, java.lang.String initial, java.lang.String params)` Create a text input with regular express validation

Method Summary
`void` | `addText(java.lang.String text)` Append to the text displayed in the text box
`void` | `changedUpdate(javax.swing.event.DocumentEvent event)`
`java.awt.Component` | `getComponent(int index)` Abstract way for a container to know about its child's awt components.
`java.lang.String` | `getText()` Get the text displayed in the text box
`void` | `insertUpdate(javax.swing.event.DocumentEvent event)`
`boolean` | `load(java.util.Properties properties)` A control should override this to get its properties.
`void` | `removeUpdate(javax.swing.event.DocumentEvent event)`
`boolean` | `save(java.util.Properties properties)` A control should override this to set its properties.
`void` | `setEnabled(boolean enabled)` Make this control enabled or disabled.
`void` | `setText(java.lang.String text)` Set the text displayed in the text box
`boolean` | `valid()`
`void` | `validate()` Get this control to validate itself

Methods inherited from class UI.GEVAPropertyControl
`addInvalidReason, countComponents, getParam, getParam, getParamBoolean, getParamBoolean, getParamDouble, getParamDouble, getParamEqual, getParamInt, getParamInt, resetInvalidReason, setVisible, setVisibleControlGroup`

Methods inherited from class UI.GEVAControl
`addActionListener, fireActionEvent, getComment, getComponent, getName, getParent, getTitle, getType, isType, removeActionListener`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### PT_READWRITE

    public static java.lang.String PT_READWRITE

  Constructor type. Read and write to control

### PP_ACCEPT_ALL

    public static java.lang.String PP_ACCEPT_ALL

  Constructor params. No validation

Constructor Detail

### GEVAStringProperty

    public GEVAStringProperty(GEVADirtyListener dirtyListener,
                              GEVAPropertyContainer parent,
                              java.lang.String type,
                              java.lang.String title,
                              java.lang.String name,
                              java.lang.String comment,
                              java.lang.String initial,
                              java.lang.String params)

  Create a text input with regular express validation

  Parameters:
    `dirtyListener` - GUI that listens to dirty events
    `parent` - Container for this control
    `type` - Can be "rout" or "". "rout" is a quick hack which was added to allow it to show read-only console output and has since been replaced by other means (so "rout" is currently unused (2008r07M11d))
    `title` - The title to show in the GUI of this control
    `name` - The name used when saving this to the properties file
    `comment` - A tooltip
    `initial` - The initial value
    `params` - Regular expression used to validate, and a mismatch error message in the format "regex,error". During validation, the input string is matched against the regular expression. If it mismatches, 'error' is output as the error reason. If 'error' is not specified, the message, "Value mismatched pattern 'regex'" is output (where 'regex' is the regex expression entered). If 'regex' is not specified, no regular expression validation is done

Method Detail

### getText

    public java.lang.String getText()

  Get the text displayed in the text box

  Specified by:
    `getText` in class `GEVAControl`
  Returns:
    The value of the control in string format

### setText

    public void setText(java.lang.String text)

  Set the text displayed in the text box

  Specified by:
    `setText` in class `GEVAControl`
  Parameters:
    `text` - The value to set

### addText

    public void addText(java.lang.String text)

  Append to the text displayed in the text box

### setEnabled

    public void setEnabled(boolean enabled)

  Description copied from class: `GEVAControl`
  Make this control enabled or disabled.

  Specified by:
    `setEnabled` in class `GEVAControl`
  Parameters:
    `enabled` - true to enabled, false to disable

### load

    public boolean load(java.util.Properties properties)

  Description copied from class: `GEVAControl`
  A control should override this to get its properties.

  Specified by:
    `load` in class `GEVAControl`
  Parameters:
    `properties` - The properties of a loaded properties file

### save

    public boolean save(java.util.Properties properties)

  Description copied from class: `GEVAControl`
  A control should override this to set its properties. After all controls have had a chance to set the properties, the properties file will be written to by the caller

  Specified by:
    `save` in class `GEVAControl`
  Parameters:
    `properties` - The properties of a loaded properties file

### getComponent

    public java.awt.Component getComponent(int index)

  Description copied from class: `GEVAControl`
  Abstract way for a container to know about its child's awt components.

  Overrides:
    `getComponent` in class `GEVAPropertyControl`
  Parameters:
    `index` - The index of the component to get
  Returns:
    The indexed awt component of the control

### insertUpdate

    public void insertUpdate(javax.swing.event.DocumentEvent event)

  Specified by:
    `insertUpdate` in interface `javax.swing.event.DocumentListener`

### removeUpdate

    public void removeUpdate(javax.swing.event.DocumentEvent event)

  Specified by:
    `removeUpdate` in interface `javax.swing.event.DocumentListener`

### changedUpdate

    public void changedUpdate(javax.swing.event.DocumentEvent event)

  Specified by:
    `changedUpdate` in interface `javax.swing.event.DocumentListener`

### validate

    public void validate()

  Description copied from class: `GEVAControl`
  Get this control to validate itself

  Specified by:
    `validate` in class `GEVAControl`

### valid

    public boolean valid()

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD