|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectUI.GEVAControl
UI.GEVAPropertyControl
UI.GEVAFileProperty
public class GEVAFileProperty
Input that allows files or directories to be chosen
Field Summary | |
---|---|
static java.lang.String |
PP_ABSOLUTE
Constructor params. |
static java.lang.String |
PP_IGNORE_EXIST
Constructor params. |
static java.lang.String |
PP_MUST_EXIST
Constructor params. |
static java.lang.String |
PP_RELATIVE
Constructor params. |
static java.lang.String |
PT_FILE
Constructor type. |
static java.lang.String |
PT_FILE_OR_FOLDER
Constructor type. |
static java.lang.String |
PT_FOLDER
Constructor type. |
Fields inherited from class UI.GEVAPropertyControl |
---|
initial, params |
Fields inherited from class UI.GEVAControl |
---|
comment, dirtyListener, name, parent, title, type |
Constructor Summary | |
---|---|
GEVAFileProperty(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 and file browser button with file exists validation |
Method Summary | |
---|---|
void |
changedUpdate(javax.swing.event.DocumentEvent e)
|
java.lang.String |
getAbsoluteText()
Get the absolute path value regardless to whether this control displays in absolute or relative mode (which getText() would be affected by) |
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 value of teh control, using a text string |
java.lang.String |
getWorkingPath()
|
void |
insertUpdate(javax.swing.event.DocumentEvent e)
|
boolean |
load(java.util.Properties properties)
A control should override this to get its properties. |
void |
removeUpdate(javax.swing.event.DocumentEvent e)
|
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 value of the control, using a text string |
void |
setWorkingPath(java.lang.String workingPath)
Make the path listed relative to a particular working path. |
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_FILE
public static java.lang.String PT_FOLDER
public static java.lang.String PT_FILE_OR_FOLDER
public static java.lang.String PP_RELATIVE
public static java.lang.String PP_ABSOLUTE
public static java.lang.String PP_MUST_EXIST
public static java.lang.String PP_IGNORE_EXIST
Constructor Detail |
---|
public GEVAFileProperty(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 PP_FILE, PP_FOLDER or PP_FILE_OR_FOLDER and states
what thetitle
- 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
- "working_folder, absolute, mustExist, filter" where
working_folder is a string of the root directory from which relative
paths are resolved and defaults to the current directory if not
speicified. absolute is a boolean which states whether the pathname will
be output as a relative or absolute path (false or true respectively)
(default false (relative)), mustExist is a boolean which states whether
the result must be to an existing file or directory (default true (must
exist)), and filter states the file types that are filtered, in the
format "desc|ex1[;ex2;...][|desc2|ex21[;ex22;...][|...|...]]",
e.g. "Pictures|jpeg;jpg;png;bmp|Videos|mpeg;mpg;avi". If no extension is
given, e.g. "All files|", then all files are output for that filterMethod Detail |
---|
public java.lang.String getText()
GEVAControl
getText
in class GEVAControl
public java.lang.String getAbsoluteText()
public void setText(java.lang.String text)
GEVAControl
setText
in class GEVAControl
text
- The value to setpublic 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 void setEnabled(boolean enabled)
GEVAControl
setEnabled
in class GEVAControl
enabled
- true to enabled, false to disablepublic java.awt.Component getComponent(int index)
GEVAControl
getComponent
in class GEVAPropertyControl
index
- The index of the component to get
public boolean valid()
public void validate()
GEVAControl
validate
in class GEVAControl
public void changedUpdate(javax.swing.event.DocumentEvent e)
changedUpdate
in interface javax.swing.event.DocumentListener
public void insertUpdate(javax.swing.event.DocumentEvent e)
insertUpdate
in interface javax.swing.event.DocumentListener
public void removeUpdate(javax.swing.event.DocumentEvent e)
removeUpdate
in interface javax.swing.event.DocumentListener
public void setWorkingPath(java.lang.String workingPath)
workingPath
- public java.lang.String getWorkingPath()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |