public interface ObjectSelectionNode extends Visitable<ObjectSelectionNode>
| Modifier and Type | Field and Description |
|---|---|
static int |
CLEAN
The state that occurs when an object has been displayed, but not altered
by the user.
|
static int |
CLEARED
The initial state of the node.
|
static int |
DIRTY
The state that occurs when an CLEAN node was altered by the user.
|
static int |
EDITED
The state that occures when an initially CLEAR node has been altered by
the user.
|
| Modifier and Type | Method and Description |
|---|---|
void |
addChild(ObjectSelectionNode child)
Adds a child to the set of children
|
boolean |
callCheckChangeHook()
Forwards a call to the appropriate check change hook.
|
boolean |
callCheckClearHook()
Forwards a call to the appropriate check clear hook.
|
boolean |
callCheckCloseHook()
Forwards a call to the appropriate check close hook.
|
boolean |
callCheckDeleteHook()
Forwards a call to the appropriate check delete hook.
|
boolean |
callCheckFindHook()
Forwards a call to the appropriate check find hook.
|
boolean |
callCheckRowSelectHook(int currentSel,
int newSel)
Forwards a call to the appropriate check row select hook.
|
boolean |
callCheckSaveHook()
Forwards a call to the appropriate check save hook.
|
boolean |
callHookBeforeDisplay(Object anObjectToDisplay,
String roleName)
Forwards calls to the specific hook method.
|
boolean |
checkChanged()
If the dialog controllers ignoreCheckChange is
false this
method checks if the node (with children) is unchanged. |
boolean |
checkClear()
If the controller's ignoreCheckChange property is
false,
determin if it is ok to proceed with action clear. |
boolean |
checkClose()
If the dialog controllers Determin if it is ok to proceed with action
close window.
|
boolean |
checkDelete()
If the controller's ignoreCheckChange property is
false,
determin if it is ok to proceed with action delete. |
boolean |
checkFind()
If the controller's ignoreCheckChange property is
false,
determin if it is ok to proceed with find action. |
boolean |
checkRowSelection(int oldSelection,
int newSelection)
If the controller's ignoreCheckChange property is
false,
determine if it is ok to proceed to change the selected row in a
listblock. |
boolean |
checkSave()
If the controller's ignoreCheckChange property is
false,
determin if it is ok to proceed with action save. |
void |
clear()
Clears fields from the relation from the dialog structure.
|
void |
clear(String s)
Clears a given field from the relation from the dialog structure.
|
void |
clearKeepKeys()
Clears all fields exept the fields that are part of the main key.
|
void |
display(Object domainObject)
Displays a domain object by casting it to the appropriate type and
forward the call to the special display method.
|
void |
displayAboveTarget(Collection domainObjects,
List pathToTarget,
boolean findAll)
Displays the collection of domain objects.
|
void |
displayOnEDT(Collection resultObject,
List pathToTarget,
boolean findAll)
Performs a recursive display.
|
Set |
getChangedFields()
Returns a set containing the names of the attributes/fields that are
changed since the initial display.
|
Set |
getChangedKeyFields()
Returns a set containg the names of the attributes/fields that are a part
of the key and are changed since the initial display.
|
Set |
getChangedNoKeyFields()
Returns a set containing all fields that have changed since the initial
display and wich are not part of the key, in other words the complement
of the set derived by getChangedKeyFields
|
List |
getChildren()
Returns a set containing the accessor objects for the children
|
G9DialogController |
getController()
Returns the dialog controller.
|
ObjectSelectionNode |
getParentNode()
Returns the parent node object.
|
List |
getPathToNode()
Returns the path from the root node to this node.
|
Class |
getRepresentingClass()
Returns the Class object of the class this object selection displays.
|
String |
getRoleName()
Get the role name represented by this node.
|
ObjectSelectionNode |
getRootNode()
Returns the root node of this object selection node.
|
int |
getState()
Returns the current state of this node.
|
Object |
greedyObtain()
(missing javadoc)
|
boolean |
hasFocus(String s)
Checks if a given attribute in the object selection has focus.
|
boolean |
hasOneValue()
Checks if at least one attribute in the object selection contains a none
empty value.
|
boolean |
hasValue()
Returns true if all fields in objct have a value, that is not null or "".
|
boolean |
hasValue(String field)
Returns true if the given field has any value, that is not null,0 or "".
|
boolean |
inListblock() |
boolean |
isChanged(String attributeName)
Check if the specified attribute is changed.
|
boolean |
isConsistant()
Checks whether the current value in the display is valid with respect of
the data types in the object of the data selector.
|
boolean |
isEnabled()
Returns if the object is editable.
|
boolean |
isEnabled(String s)
Checks if a given field is possible to edit.
|
boolean |
isShown()
Checks if node is visible.
|
boolean |
isShown(String s)
Checks if a given node is visible.
|
String |
obtain(String attr)
Returns the representing the relatiion .attr from the dialog.
|
Object |
obtainAsObject()
Returns an object representing the from the dialog.
|
Set |
obtainSet(boolean createIfNull)
(missing javadoc)
|
void |
osDisplay(Object domainObject,
String attribute,
boolean resetState)
Internal use.
|
Object |
peekAtObject()
Creates a new domain object and writes dialog data to the object.
|
Object |
recursiveObtainObject(List pathToTarget)
Recursivly obtains the the object from the dialog.
|
Object |
recursiveObtainObject(List pathToTarget,
boolean singleObtain)
(missing javadoc)
|
void |
resetFields()
Sets all displayed var-fields in the object selection as not changed.
|
void |
setChanged(boolean b)
Deprecated.
use
setState(int) |
void |
setChanged(boolean b,
String s)
Deprecated.
(missing javadoc)
|
void |
setEnabled(boolean b)
Makes this object selection enabled or disabled.
|
void |
setEnabled(boolean b,
String s)
Makes a given attribute in the object selection enabled or disabled.
|
void |
setFocus(String s)
Requests focus on the given field of this object selection node.
|
void |
setParentNode(ObjectSelectionNode parentNode)
Sets the parent node object.
|
void |
setShown(boolean b)
Makes object selection visible/invisible.
|
void |
setShown(boolean b,
String s)
Makes a given field in this object selection node visible or invisible.
|
void |
setShowZero(String s,
boolean val)
Deprecated.
Display rules and blank when zero should be set in the model!
|
int |
setState(int state)
Sets the current state of this node.
|
void |
setStyle(Color foreground,
Color background)
Sets the foreground and background color of given node.
|
void |
visitBranch(Visitor<ObjectSelectionNode> visitor)
Visit all nodes in this branch
|
static final int CLEARED
static final int EDITED
static final int CLEAN
static final int DIRTY
int getState()
int setState(int state)
getState().state - the new state to set.void setStyle(Color foreground, Color background)
foreground - The foreground colorbackground - The background colorString obtain(String attr)
attr - The attribute to obtain.Object obtainAsObject()
Object peekAtObject()
Class getRepresentingClass()
boolean hasValue()
void clear()
void clear(String s)
s - The attribute to clear.void clearKeepKeys()
@Deprecated void setChanged(boolean b)
setState(int)b - The new changed value.void resetFields()
@Deprecated void setChanged(boolean b, String s)
b - The new changed value.s - The attribute to change.boolean isEnabled()
boolean isEnabled(String s)
s - The field to check.boolean isShown()
boolean isShown(String s)
s - The attribute to check visibility for.void setShown(boolean b)
b - True makes the object selection visibile, false it will
disappear.void setEnabled(boolean b)
b - True enables it, false disables it.void setEnabled(boolean b,
String s)
b - True enables it, false disables it.s - The attribute to alter.void setFocus(String s)
s - The field to request focus for.void setShown(boolean b,
String s)
b - True makes the attribute visibile, false it will disappear.s - The attribute to alter.boolean hasFocus(String s)
s - The attribute to check.boolean hasOneValue()
boolean isConsistant()
boolean hasValue(String field)
field - The field to check.@Deprecated void setShowZero(String s, boolean val)
s - The field to set.val - True to display 0, false to display blank.void setParentNode(ObjectSelectionNode parentNode)
parentNode - the parent node of this object selection.ObjectSelectionNode getParentNode()
List getPathToNode()
ObjectSelectionNode getRootNode()
List getChildren()
void addChild(ObjectSelectionNode child)
child - (missing javadoc)boolean callHookBeforeDisplay(Object anObjectToDisplay, String roleName)
anObjectToDisplay - the object to be displayedroleName - the role name of the object to displaytrue if the object should be displayedvoid display(Object domainObject)
domainObject - the domain object to display.void osDisplay(Object domainObject, String attribute, boolean resetState)
domainObject - the domain object holding the attribute to displayattribute - the name of the attributeresetState - flag indicating if field should be reset.void displayAboveTarget(Collection domainObjects, List pathToTarget, boolean findAll)
domainObjects - the domain objects to displaypathToTarget - the path to the target nodefindAll - if true the display is invoked as part of a
find all action.void displayOnEDT(Collection resultObject, List pathToTarget, boolean findAll)
resultObject - a collection of domain objectspathToTarget - the path to the target nodefindAll - true if the display is a result of a find all
action.Object recursiveObtainObject(List pathToTarget)
pathToTarget - a List representing the path to the targetObject recursiveObtainObject(List pathToTarget, boolean singleObtain)
pathToTarget - (missing javadoc)singleObtain - (missing javadoc)G9DialogController getController()
Set getChangedFields()
Set getChangedKeyFields()
Set getChangedNoKeyFields()
boolean isChanged(String attributeName) throws G9ClientException
attributeName - the name of the attributetrue if the field has changed, otherwise false
.G9ClientException - if the attribute is not part of this role.AbstractNode.getChangedNoKeyFields(),
getChangedKeyFields(),
getChangedFields()boolean checkFind()
false,
determin if it is ok to proceed with find action. The following
conditions are checked:
true.
Otherwise, a modal dialog is shown and the user (of the application) is
asked wether to proceed or not. If the user answers yes, the returned
value is true.true if it's ok to proceed with find.G9DialogController.setIgnoreCheckChanged(boolean)boolean checkChanged()
false this
method checks if the node (with children) is unchanged. To things are
considered:
This is done recursivly, thus the first node checked is a leaf-node.
false
true if no fields are changed and all up-related
relations are intact.G9DialogController.setIgnoreCheckChanged(boolean)boolean checkDelete()
false,
determin if it is ok to proceed with action delete. If he dialog does not
contain any changed data since it's last display, the return value is
true. Otherwise, a modal dialog is shown and the user (of
the application) is asked wether to proceed or not. If the user answers
"yes", the return value is true.true if it's ok to proceed with delte.G9DialogController.setIgnoreCheckChanged(boolean)boolean checkClear()
false,
determin if it is ok to proceed with action clear. If the dialog does not
contain any changed data since it's last display, the return value is
true. Otherwise, a model dialog is shown and the user (of
the application) is asked wether to proceed or not. If the user answers
"yes", the return value is true.true if it's ok to proceed with delete. *G9DialogController.setIgnoreCheckChanged(boolean)boolean checkSave()
false,
determin if it is ok to proceed with action save. No specific check is
perfomed, but a hook is called for each node involved in the save action
(the sequence is from the top of the object selection). The returned
value from this method is always true, and the return value
from the specific hook methods are used to determin wether to proceed
with the check save or not.true if it is ok to proceed with action save.G9DialogController.setIgnoreCheckChanged(boolean)boolean checkRowSelection(int oldSelection,
int newSelection)
false,
determine if it is ok to proceed to change the selected row in a
listblock.oldSelection - the index of the old selectionnewSelection - the index of the new selectionG9DialogController.setIgnoreCheckChanged(boolean)boolean checkClose()
true. Otherwise, a modal
dialog is shown and the user (of the application) is asked wether to
proceed or not. If the user answers "yes", the return value is true
.true if it's ok to proceed with close.G9DialogController.setIgnoreCheckChanged(boolean)String getRoleName()
boolean callCheckSaveHook()
hookCheckSave<RoleName> for
details).boolean callCheckFindHook()
hookCheckFind<RoleName> for
details).boolean callCheckClearHook()
hookCheckClear<RoleName> for
details).boolean callCheckDeleteHook()
hookCheckDelete<RoleName> for
details).boolean callCheckCloseHook()
hookCheckClose<RoleName> for
details).boolean callCheckChangeHook()
hookCheckChange<RoleName> for
details).boolean callCheckRowSelectHook(int currentSel,
int newSel)
currentSel - index of current selectionnewSel - index of new selectionhookCheckRowSelect<RoleName> for
details).boolean inListblock()
Set obtainSet(boolean createIfNull)
createIfNull - (missing javadoc)Object greedyObtain()
void visitBranch(Visitor<ObjectSelectionNode> visitor)
visitor - the visitor that gets the visit callback.Copyright © 2006–2017 Esito AS. All rights reserved.