|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectUI.GEVAControl
UI.GEVAPropertyControl
UI.GEVAStringProperty
public class GEVAStringProperty
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
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 |
---|
public static java.lang.String PT_READWRITE
public static java.lang.String PP_ACCEPT_ALL
Constructor Detail |
---|
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)
dirtyListener
- GUI that listens to dirty eventsparent
- Container for this controltype
- 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 controlname
- The name used when saving this to the properties filecomment
- A tooltipinitial
- The initial valueparams
- 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 doneMethod Detail |
---|
public java.lang.String getText()
getText
in class GEVAControl
public void setText(java.lang.String text)
setText
in class GEVAControl
text
- The value to setpublic void addText(java.lang.String text)
public void setEnabled(boolean enabled)
GEVAControl
setEnabled
in class GEVAControl
enabled
- true to enabled, false to disablepublic boolean load(java.util.Properties properties)
GEVAControl
load
in class GEVAControl
properties
- The properties of a loaded properties filepublic boolean save(java.util.Properties properties)
GEVAControl
save
in class GEVAControl
properties
- The properties of a loaded properties filepublic java.awt.Component getComponent(int index)
GEVAControl
getComponent
in class GEVAPropertyControl
index
- The index of the component to get
public void insertUpdate(javax.swing.event.DocumentEvent event)
insertUpdate
in interface javax.swing.event.DocumentListener
public void removeUpdate(javax.swing.event.DocumentEvent event)
removeUpdate
in interface javax.swing.event.DocumentListener
public void changedUpdate(javax.swing.event.DocumentEvent event)
changedUpdate
in interface javax.swing.event.DocumentListener
public void validate()
GEVAControl
validate
in class GEVAControl
public boolean valid()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |