|
LEONARDI Application Composer - 8.9.0.40 by W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectleon.control.LyController
leon.control.LyAreaController
leon.control.LyPanelController
leon.control.LyTreeBaseController
leon.control.LyTreeController
public class LyTreeController
The LyTreeController implements the generic behavior for a tree. This controller is associated with a builder (LyTreeBuilder) and a behavior. The behavior must implements LyTreeBehaviorInterfave. Usually, this behavior is an instance of the LyTreeBehavior class
LyTreeBaseController
,
LyTreeBehaviorInterface
,
LyTreeBehavior
Field Summary | |
---|---|
static java.lang.String |
__VERSION
File Version |
static java.lang.String |
DISCOVER_ON_CLICK
Form field identifier: flag to indicate if the tree must be fully discovered or discovered on node open action. |
static java.lang.String |
SEP_ID
separator id for treeNode. |
static java.lang.Integer |
STATUS_NONE
Close state for a node. |
static java.lang.Integer |
STATUS_OPENED
Open state for a node. |
Fields inherited from class leon.control.LyAreaController |
---|
DEFAULT_MENU_ITEM_IMAGE_SIZE, DEMAND_APPLY, DEMAND_CANCEL, DEMAND_CLOSE, DEMAND_CREATE_CHART, DEMAND_DELETE_CHART, DEMAND_DELETE_OBJECTINFOS, DEMAND_DELETE_PREFERENCE, DEMAND_UPDATE_VIEW, DEMAND_VALIDATE |
Fields inherited from class leon.control.LyController |
---|
_nbControllers, _nextId, CONTROLLER_ID_SEP, DEFAULT_IMAGE_FORMAT, DEMAND_HELP, ID_SEP |
Constructor Summary | |
---|---|
LyTreeController(LySession session,
LyController parent,
LyAction action,
LyClassInfo classInfo,
LyObjectList context)
Constructor. |
Method Summary | |
---|---|
void |
actionDemand(LyActionDemand demand)
Invoked when an action occurs. |
LyTreeNode |
addTreeNode(LyTreeNode parentNode,
java.lang.Object appObject,
java.lang.String level)
Create a node subtree for the parent node. |
void |
addTreeNodeFromObjectId(LyObjectId objectId,
LyTreeNode treeNode)
Add a reference to a treeNode for the objectId. |
void |
clearTreeContent()
Empty the tree (remove all nodes). |
void |
clearViewCache()
Clears all cached data for this controller (especially the view and the component). |
void |
dragDropDemand(LyDragDropDemand demand)
Invoked when a Drag & Drop occurs. |
boolean |
enablesMultiSelection()
Method that indicates if controlled panel enables multi-selection or not. |
void |
expandNode(LyTreeNode treeNode,
boolean expand)
This method expand (or close) the given node. |
void |
free(LyController controller)
Free this controller. |
java.lang.Class<?> |
getBehaviorInterface()
Method that gives the interface that must be implemented by the behavior associated to this controller. |
java.util.Vector<java.lang.String> |
getBranchFromTreeNode(LyTreeNode treeNode)
This method returns a vector of Strings Each string represent an object The first element is the tree root. |
LyClassInfo |
getClassInfoFromLevel(java.lang.String level)
Get the classInfo associated with a given level. |
LyInfoList<LyClassInfo> |
getClassInfos()
Return a list of all classes in the tree. |
LyObjectList |
getContent()
Get content of the tree. |
java.lang.Integer |
getExpandedStatusFromNode(LyGetIdInterface getIdObject)
Gets current expand status of a node. |
LyFilter |
getFilterFromLevel(java.lang.String level)
Get the filter associated with a given level. |
java.lang.String |
getLevel(java.lang.String compId)
Retrieves a level from a component id. |
java.util.Vector<java.lang.String> |
getLevels(LyClassInfo classInfo)
Get all levels that have the given classinfo. |
LyObject |
getObjectFromTreeNodeId(java.lang.String treeNodeId)
Method used to get the object associated with a TreeNode, using the node Id. |
LyObjectId |
getObjectIdFromTreeNodeId(java.lang.String treeNodeId)
Method used to get the object associated with a TreeNode, using the node Id. |
LyInfoList<LyClassInfo> |
getParentClassInfos(LyClassInfo classInfo)
Search the list of possible parent classInfos in the tree. |
LyInfoList<LyClassInfo> |
getRootClassInfos()
Accessor to the list of root classInfos of the tree. |
java.util.Vector<LyComponent> |
getSelectedTreeNodes()
Get the selected treeNodes. |
LyInfoList<LyClassInfo> |
getSonsClassInfos(java.lang.String level)
Get a list of available classInfo for the sons at the given level. |
LySort |
getSortFromLevel(java.lang.String level)
Get the sort associated with a given level. |
java.util.Vector<LyComponent> |
getTreeNodesFromObjectId(LyObjectId objectId)
get all references associated to this objectId. |
boolean |
isDiscoverOnClick()
Check discovering mode of the tree (fully or on node click). |
boolean |
isHorizontal()
Method that indicates if controlled panel is horizontal. |
boolean |
isIgnoreIdle()
Check ignore idle status of the tree controller. |
boolean |
isTopLevelClassInfo(LyClassInfo classInfo)
Search if the object is suitable to be added witout a parent classInfo. |
void |
menuDemand(LyMenuDemand demand)
Invoked when an action occurs. |
boolean |
objectAdded(LyWorkSpaceEvent event)
Called when an object is added in the dynamic object list. |
boolean |
objectChanged(LyWorkSpaceEvent event)
Called when an object has changed in the dynamic object list. |
boolean |
objectRemoved(LyWorkSpaceEvent event)
Called when an object is removed from the dynamic object list. |
boolean |
objectStateChanged(LyAdvancedWorkSpaceEvent event)
Called when an object state is changed. |
void |
removeTreeNodeFromObjectId(LyObject object,
LyTreeNode treeNode)
Remove a reference. |
void |
selectAllObjects(boolean select)
Select/unselect all nodes. |
void |
selectionDemand(LySelectionDemand demand)
Invoked when an selection occurs. |
void |
selectObject(LyObject object,
boolean select)
Select an object in the table. |
void |
setIgnoreIdle(boolean mode)
Set the ignore idle status of tree controller. |
void |
updateContent()
Reset the content of the view (Nodes). |
Methods inherited from class leon.control.LyTreeBaseController |
---|
getPanelComponent, getTreeComponent, updateMessages, updateTools |
Methods inherited from class leon.control.LyPanelController |
---|
buildFilter, closeBorderPanel, endFilter, findObject, getFilter, getFilterController, getFilterEditorController, getPreference, getRefreshTime, getSelection, isFilterActive, objectUserEvent, questionAnswer, reset, setFilter, setIdle, setPreference, setRefreshTime, updatePreferencesMenu, workSpaceEventsGrouped |
Methods inherited from class leon.control.LyController |
---|
activateViewDemand, demandPerformed, getApplication, getClassInfo, getComponent, getId, getImage, getImage, getImage, getImage, getImageFromPrefix, getImageFromPrefix, getImageFromPrefix, getName, getObjectId, getSession, getUserData, getView, getViewManager, helpDemand, hideView, isFreed, isIdle, setBuilder, setBuilderClass, setLastModified, setName, setUserData, showError, showError, showWarning, updateViewFromValues |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface leon.data.LyAdvancedWorkSpaceListener |
---|
objectUserEvent, workSpaceEventsGrouped |
Field Detail |
---|
public static final java.lang.String __VERSION
public static final java.lang.String DISCOVER_ON_CLICK
public static final java.lang.String SEP_ID
public static final java.lang.Integer STATUS_NONE
public static final java.lang.Integer STATUS_OPENED
Constructor Detail |
---|
public LyTreeController(LySession session, LyController parent, LyAction action, LyClassInfo classInfo, LyObjectList context)
session
- current session associated to the controller. The controller automatically
registers on the specified session.parent
- parent controller (or null for 'root' controller). Controller hierarchy
indicates a child controller (for example a dialog created from a main view)action
- related action. If an action is specified, the controller uses action
parameters (action name, action specific XML view description ...)classInfo
- classInfo for this controller (unused)context
- current context (may be null if the view is not contextual to a list of
objects).Method Detail |
---|
public java.lang.Class<?> getBehaviorInterface()
getBehaviorInterface
in class LyAreaController
public java.util.Vector<java.lang.String> getLevels(LyClassInfo classInfo)
classInfo
- a classInfo
public LyInfoList<LyClassInfo> getSonsClassInfos(java.lang.String level)
level
- Tree level
public LyClassInfo getClassInfoFromLevel(java.lang.String level)
level
- the level
public LySort getSortFromLevel(java.lang.String level)
level
- the level
public LyFilter getFilterFromLevel(java.lang.String level)
level
- the level
public java.lang.String getLevel(java.lang.String compId)
compId
- the id of the component
public LyInfoList<LyClassInfo> getClassInfos()
public LyInfoList<LyClassInfo> getRootClassInfos()
public void clearTreeContent()
clearTreeContent
in class LyTreeBaseController
public void updateContent()
updateContent
in class LyTreeBaseController
public void free(LyController controller)
free
in class LyPanelController
controller
- parent controllerLyAreaController.free()
public LyTreeNode addTreeNode(LyTreeNode parentNode, java.lang.Object appObject, java.lang.String level)
parentNode
- of the subtree, or null if create subtree a root levelappObject
- the application object which is the node of the subtree, or null to fetch
root componentlevel
- deepth level
public void menuDemand(LyMenuDemand demand)
menuDemand
in class LyAreaController
demand
- menu demandLyController.demandPerformed(leon.view.event.LyDemand)
public void actionDemand(LyActionDemand demand)
actionDemand
in class LyPanelController
demand
- action demandLyController.demandPerformed(leon.view.event.LyDemand)
public void dragDropDemand(LyDragDropDemand demand)
dragDropDemand
in class LyController
demand
- drag-drop demandpublic void expandNode(LyTreeNode treeNode, boolean expand)
treeNode
- the tree node to expand or closeexpand
- boolean: true if node must be expanded, false if it must be closedpublic void addTreeNodeFromObjectId(LyObjectId objectId, LyTreeNode treeNode)
objectId
- LyObjectId of the object associated with this treeNodetreeNode
- LyTreeNode associated to the object Id,public void removeTreeNodeFromObjectId(LyObject object, LyTreeNode treeNode)
object
- object previously associated with this treeNodetreeNode
- LyTreeNode associated to the object Id, or null to remove all association for this
object Idpublic java.util.Vector<LyComponent> getTreeNodesFromObjectId(LyObjectId objectId)
objectId
- LyObjectId of the object
public LyObjectId getObjectIdFromTreeNodeId(java.lang.String treeNodeId)
treeNodeId
- the node id
public LyObject getObjectFromTreeNodeId(java.lang.String treeNodeId)
treeNodeId
- the node id
public java.util.Vector<java.lang.String> getBranchFromTreeNode(LyTreeNode treeNode)
treeNode
- the given treeNode
public void selectionDemand(LySelectionDemand demand)
selectionDemand
in class LyController
demand
- selection demandLyController.demandPerformed(leon.view.event.LyDemand)
public void selectObject(LyObject object, boolean select)
selectObject
in class LyPanelController
object
- selected or unselected objectselect
- new selection statuspublic void selectAllObjects(boolean select)
selectAllObjects
in class LyPanelController
select
- true to select all objects, false to unselectpublic java.util.Vector<LyComponent> getSelectedTreeNodes()
public java.lang.Integer getExpandedStatusFromNode(LyGetIdInterface getIdObject)
getIdObject
- view component
public LyObjectList getContent()
getContent
in class LyPanelController
public boolean objectAdded(LyWorkSpaceEvent event)
objectAdded
in interface LyWorkSpaceListener
objectAdded
in class LyPanelController
event
- event
LyWorkSpaceListener.objectAdded(leon.data.LyWorkSpaceEvent)
public boolean objectRemoved(LyWorkSpaceEvent event)
objectRemoved
in interface LyWorkSpaceListener
objectRemoved
in class LyPanelController
event
- event
LyWorkSpaceListener.objectRemoved(leon.data.LyWorkSpaceEvent)
public boolean objectChanged(LyWorkSpaceEvent event)
objectChanged
in interface LyWorkSpaceListener
objectChanged
in class LyPanelController
event
- event
LyWorkSpaceListener.objectChanged(leon.data.LyWorkSpaceEvent)
public boolean objectStateChanged(LyAdvancedWorkSpaceEvent event)
objectStateChanged
in interface LyAdvancedWorkSpaceListener
objectStateChanged
in class LyPanelController
event
- Event notifying object state change.
LyAdvancedWorkSpaceListener.objectStateChanged(leon.data.LyAdvancedWorkSpaceEvent)
public LyInfoList<LyClassInfo> getParentClassInfos(LyClassInfo classInfo)
classInfo
- current classInfo
isTopLevelClassInfo(LyClassInfo)
public boolean isTopLevelClassInfo(LyClassInfo classInfo)
classInfo
- current classInfo
getParentClassInfos(LyClassInfo)
public void clearViewCache()
This method may be invoked for memory optimization, but the controller is still valid and may be used. (Unlike free) Further usage, needs to rebuild internal component & view which may be time consuming.
clearViewCache
in class LyAreaController
public boolean enablesMultiSelection()
enablesMultiSelection
in class LyPanelController
public boolean isHorizontal()
isHorizontal
in class LyPanelController
public boolean isIgnoreIdle()
public void setIgnoreIdle(boolean mode)
mode
- true to ignore idle, false elsepublic boolean isDiscoverOnClick()
|
(c) January 2013 - W4 S.A. | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |