public abstract class Variable extends java.lang.Object implements VariableIF
VariableIF.ACCESS_MODE, VariableIF.ACCESS_USER_TYPES
Modifier and Type | Field and Description |
---|---|
protected boolean |
changed |
Constructor and Description |
---|
Variable(org.w3c.dom.Element var)
This constructor receives the element described by this GUI component.
|
Modifier and Type | Method and Description |
---|---|
void |
addAdoptListener(AdoptListener listener)
add an adopt callback
|
java.lang.String |
getComment()
Get the comment belongs to varaibale.
|
java.lang.String |
getCurrentValue()
Get the current string value.
|
javax.swing.JComponent |
getDefaultComponent()
Get the component to let the user set the default.
|
protected java.lang.String |
getDefaultValue()
Get the default value.
|
java.lang.String |
getDescription()
Get the description of the variable.
|
java.lang.String |
getElementValue()
GetElement value.
|
abstract javax.swing.JComponent |
getInput()
Get the input component of the variable.
|
javax.swing.JComponent |
getLabel()
This method returns the label component of the variable.
|
javax.swing.JComponent |
getResetComponent()
Get the component to let the user reset the value.
|
org.w3c.dom.Element |
getVariable()
Get the variable describing this class.
|
boolean |
hasAccessRight(VariableIF.ACCESS_MODE accessMode,
VariableIF.ACCESS_USER_TYPES accessUserType)
Checks the access right for the given user_type and access mode
|
boolean |
isChanged()
Return a boolean whether the changed the variable value.
|
boolean |
isDefault()
Has this varibnale the default value.
|
boolean |
isEnvironment()
Return a boolean whether the variable must be defined in environment.
|
boolean |
isGlobal()
Return a boolean whether the variable is global in ini file.
|
boolean |
isIniFile()
Return a boolean whether the variable must be defined in INI file.
|
boolean |
isKernel()
Is this varibale defined in kernel section.
|
boolean |
isObligatory()
Is the variable obligatory.
|
protected boolean |
isThereADefault()
Get a boolean when a default is available.
|
static boolean |
isVarEnvironment(org.w3c.dom.Element variable)
Return a boolean whether the variable must be defined in environment.
|
static boolean |
isVarGlobal(org.w3c.dom.Element variable)
Return a boolean whether the variable is global in ini file.
|
boolean |
isVarIniFile(org.w3c.dom.Element variable)
Return a boolean whether the variable must be defined in INI file.
|
void |
removeAdoptListener(AdoptListener listener)
Remove an adopt callback
|
void |
removeComment()
Remove the comment belongs to variable.
|
void |
reset()
Reset all settings to the attribute value string.
|
void |
setChanged(boolean flag)
Set the boolean whether the changed the variable value.
|
void |
setComment(java.lang.String sval)
Set the comment belongs to variable.
|
void |
setElementAccessRights(VariableIF.ACCESS_MODE mode,
VariableIF.ACCESS_USER_TYPES userType,
boolean isChecked)
Sets the new access right for given mode and user type.
|
void |
setElementToDefault()
Configure the element according to the current gui settings.
|
void |
setElementValue()
Configure the element according to the current gui settings.
|
void |
setToDefault()
Set all settings of this variable to the default.
|
abstract void |
setValue(java.lang.String def)
Set the GUI to a state that is represented by the given string.
|
java.lang.String |
toString() |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getValue
public Variable(org.w3c.dom.Element var)
var
- The element describes the variable.public boolean isChanged()
isChanged
in interface VariableIF
public void setChanged(boolean flag)
setChanged
in interface VariableIF
public org.w3c.dom.Element getVariable()
getVariable
in interface VariableIF
public javax.swing.JComponent getLabel()
getLabel
in interface VariableIF
public abstract javax.swing.JComponent getInput()
getInput
in interface VariableIF
public javax.swing.JComponent getDefaultComponent()
getDefaultComponent
in interface VariableIF
public javax.swing.JComponent getResetComponent()
getResetComponent
in interface VariableIF
protected boolean isThereADefault()
public boolean isDefault()
isDefault
in interface VariableIF
public boolean isObligatory()
isObligatory
in interface VariableIF
public boolean isKernel()
isKernel
in interface VariableIF
protected java.lang.String getDefaultValue()
public void setElementValue() throws java.lang.Exception
setElementValue
in interface VariableIF
java.lang.Exception
public void setElementToDefault()
setElementToDefault
in interface VariableIF
public java.lang.String getElementValue()
public boolean isGlobal()
isGlobal
in interface VariableIF
public boolean isEnvironment()
isEnvironment
in interface VariableIF
public boolean isIniFile()
isIniFile
in interface VariableIF
public static boolean isVarGlobal(org.w3c.dom.Element variable)
public static boolean isVarEnvironment(org.w3c.dom.Element variable)
public boolean isVarIniFile(org.w3c.dom.Element variable)
public void setToDefault()
setToDefault
in interface VariableIF
public void reset()
public java.lang.String getCurrentValue()
getCurrentValue
in interface VariableIF
public java.lang.String toString()
toString
in class java.lang.Object
public java.lang.String getDescription()
getDescription
in interface VariableIF
public java.lang.String getComment()
getComment
in interface VariableIF
public void setComment(java.lang.String sval)
setComment
in interface VariableIF
public void removeComment()
removeComment
in interface VariableIF
public abstract void setValue(java.lang.String def)
public void addAdoptListener(AdoptListener listener)
addAdoptListener
in interface VariableIF
public void removeAdoptListener(AdoptListener listener)
removeAdoptListener
in interface VariableIF
public boolean hasAccessRight(VariableIF.ACCESS_MODE accessMode, VariableIF.ACCESS_USER_TYPES accessUserType)
hasAccessRight
in interface VariableIF
public void setElementAccessRights(VariableIF.ACCESS_MODE mode, VariableIF.ACCESS_USER_TYPES userType, boolean isChecked)
setElementAccessRights
in interface VariableIF