|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.efaps.ui.wicket.models.AbstractInstanceObject
org.efaps.ui.wicket.models.objects.AbstractUIObject
org.efaps.ui.wicket.models.objects.UIAbstractPageObject
org.efaps.ui.wicket.models.objects.UIStructurBrowser
public class UIStructurBrowser
This class is used to provide the Model for the StructurBrowser for eFpas.
It is used in tow different cases. In one case it is a TreeTable, where the
Table will be provided with additional information in columns. In the other
case a Tree only.
The concept of this class is to provide a Model which connects through the
eFaps-kernel to the eFaps-DataBase and turn it to a Standard TreeModel from
javax.swing.tree. which will be used from the Component to
render the Tree and the Table. This leads to a very similar behavior of the
WebApp GUI to a swing GUI.
This model works asyncron. That means only the actually in the GUI rendered
Nodes (and Columns) will be retrieved from the eFaps-DataBase. The next level
in a tree will be retrieved on the expand of a TreeNode. To achieve this and
to be able to render expand-links for every node it will only be checked if
it is a potential parent (if it has children). In the case of expanding this
Node the children will be retrieved and rendered.
To access the eFaps-Database a esjp is used, which will be used in three
different cases. To distinguish the use of the esjp some extra Parameters
will be passed to the esjp when calling it.
| Nested Class Summary | |
|---|---|
class |
UIStructurBrowser.BogusNode
This class is used to add a ChildNode under a ParentNode, if the ParentNode actually has some children. |
static class |
UIStructurBrowser.ExecutionStatus
Enum is used to set for this UIStructurBrowser which status of execution it is in. |
| Constructor Summary | |
|---|---|
UIStructurBrowser(org.apache.wicket.PageParameters _parameters)
Constructor. |
|
UIStructurBrowser(java.util.UUID _commandUUID,
java.lang.String _instanceKey)
Standard constructor, if called this StructurBrowserModel will be defined as root. |
|
| Method Summary | |
|---|---|
void |
addBogusNode(javax.swing.tree.DefaultMutableTreeNode _parent)
Method to add a new BogusNode to the given Node. |
void |
addChildren(javax.swing.tree.DefaultMutableTreeNode _parent)
This method should be called to add children to a Node in the Tree. e.g. |
void |
execute()
This method should be called to actually execute this StructurBrowserModel, that means to retrieve the values from the eFaps-DataBase, create the TreeModel etc. |
java.lang.String |
getBrowserFieldName()
This is the getter method for the instance variable browserFieldName. |
java.util.List<UIStructurBrowser> |
getChilds()
Getter method for instance variable childs. |
java.lang.String |
getColumnValue(int _index)
Get the Value of a Column identified by the index of the Column. |
java.lang.Boolean |
getDirection()
This is the getter method for the instance variable direction. |
UIStructurBrowser.ExecutionStatus |
getExecutionStatus()
Getter method for instance variable executionStatus. |
java.util.List<UITableHeader> |
getHeaders()
This is the getter method for the instance variable headers. |
java.lang.String |
getImage()
This is the getter method for the instance variable image. |
java.lang.String |
getLabel()
Getter method for instance variable label. |
org.efaps.admin.ui.AbstractCommand.SortDirection |
getSortDirection()
Getter method for instance variable sortDirection. |
org.efaps.admin.ui.Table |
getTable()
This is the getter method for the instance variable #table. |
javax.swing.tree.TreeModel |
getTreeModel()
Get the TreeModel used in the Component to construct the actual tree. |
boolean |
hasChilds()
Has this StructurBrowserModel childs. |
boolean |
isExpanded()
Getter method for instance variable expanded. |
void |
requeryLabel()
This method is updating the Label, by querying the eFaps-DataBase. |
void |
resetModel()
Method to reset the Model. |
void |
setDirection(java.lang.Boolean _direction)
This is the setter method for the instance variable direction. |
void |
setExpanded(boolean _expanded)
Setter method for instance variable expanded. |
void |
setParent(boolean _parent)
This is the setter method for the instance variable parent. |
void |
setSortDirection(org.efaps.admin.ui.AbstractCommand.SortDirection _sortDirection)
Setter method for instance variable sortDirection and for all
children also. |
void |
sort()
Method to sort this model and all child models. |
java.lang.String |
toString()
(non-Javadoc). |
| Methods inherited from class org.efaps.ui.wicket.models.objects.UIAbstractPageObject |
|---|
addHidden, getHelpTarget, getHiddenCells, getNewRandom, getTargetCmd, getTargetCmdUUID, getUiID2Oid, getValue4Wizard, getWizard, hasTargetCmd, isPartOfWizardCall, isRenderRevise, isTargetCmdRevise, isTargetShowFile, setPartOfWizardCall, setRenderRevise, setTargetCmdRevise, setTargetCmdUUID, setWizard |
| Methods inherited from class org.efaps.ui.wicket.models.objects.AbstractUIObject |
|---|
executeEvents, getCallingCommand, getCallingCommandUUID, getCommand, getCommand, getCommandUUID, getInstanceFromManager, getMenuTreeKey, getMode, getOpenerId, getTarget, getTitle, hasInstanceManager, isCreateMode, isEditMode, isInitialized, isPrintMode, isSearchMode, isSubmit, isViewMode, setCallingCommandUUID, setCommandUUID, setInitialized, setMode, setOpenerId, setSubmit, validate |
| Methods inherited from class org.efaps.ui.wicket.models.AbstractInstanceObject |
|---|
getInstance, getInstanceKey, setInstanceKey |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Constructor Detail |
|---|
public UIStructurBrowser(org.apache.wicket.PageParameters _parameters)
throws org.efaps.util.EFapsException
_parameters - Page parameters
org.efaps.util.EFapsException - on error
public UIStructurBrowser(java.util.UUID _commandUUID,
java.lang.String _instanceKey)
throws org.efaps.util.EFapsException
_commandUUID - UUID of the calling command_instanceKey - oid
org.efaps.util.EFapsException - on error| Method Detail |
|---|
public void execute()
#executeTree(List) or #executeTreeTable(List)
execute in class AbstractUIObject#executeTree(List),
#executeTreeTable(List)public void sort()
public void setParent(boolean _parent)
parent.
_parent - the parent to setpublic void resetModel()
resetModel in class AbstractUIObjectorg.efaps.ui.wicket.models.AbstractModel#resetModel()public org.efaps.admin.ui.Table getTable()
#table.
#table#tablepublic boolean hasChilds()
public javax.swing.tree.TreeModel getTreeModel()
addNode(DefaultMutableTreeNode, List)public void addChildren(javax.swing.tree.DefaultMutableTreeNode _parent)
_parent - the DefaultMutableTreeNode the new children should be
addedpublic java.lang.String getColumnValue(int _index)
_index - index of the Column
public java.lang.String getBrowserFieldName()
browserFieldName.
browserFieldNamepublic java.util.List<UITableHeader> getHeaders()
headers.
headerspublic java.lang.String getImage()
image.
imagepublic java.lang.Boolean getDirection()
direction.
directionpublic void setDirection(java.lang.Boolean _direction)
direction.
_direction - the direction to setpublic UIStructurBrowser.ExecutionStatus getExecutionStatus()
executionStatus.
executionStatuspublic void requeryLabel()
public void addBogusNode(javax.swing.tree.DefaultMutableTreeNode _parent)
_parent - Parent a BogusNode should be addedpublic java.util.List<UIStructurBrowser> getChilds()
childs.
childspublic java.lang.String getLabel()
label.
labelpublic org.efaps.admin.ui.AbstractCommand.SortDirection getSortDirection()
sortDirection.
sortDirectionpublic void setSortDirection(org.efaps.admin.ui.AbstractCommand.SortDirection _sortDirection)
sortDirection and for all
children also.
_sortDirection - value for instance variable sortDirectionpublic boolean isExpanded()
expanded.
expandedpublic void setExpanded(boolean _expanded)
expanded.
_expanded - value for instance variable expandedpublic java.lang.String toString()
toString in class java.lang.ObjectModel.toString()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||