|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectARoad0.Gui2.TreeManager
public class TreeManager
This class is responsible for managing viewable trees for an ACS or a view, and more precisely the TreeBaseListeners associated to these trees, and for managing the Explorer tree creation. It does not handle the creation of the global structure tree, but manages its tree listener. It is invoked by several Action classes. All methods are static, following the StaticClass pattern.
Field Summary | |
---|---|
static java.lang.String |
DENYING_RIGHTS
|
static javax.swing.tree.DefaultMutableTreeNode |
EMPTY_TREE_NODE
|
static java.lang.String |
FULL_VIEWS
|
static java.lang.String |
GRANTING_RIGHTS
|
private static int |
INITIAL_CAPACITY
|
private static java.util.List |
l_treeBaseListener__
|
static java.util.Map |
M_EXPLORER_UPPER_NODES
|
static java.lang.String |
META_RIGHTS
|
static java.lang.String |
NOTHAN_VIEWS
|
static java.lang.String |
OPEN_ACS
|
static java.lang.String |
OPEN_ENTITIES
|
static java.lang.String |
OPEN_VIEWS
|
static Name |
STRUCTURE_ROOT_NAME
|
Constructor Summary | |
---|---|
private |
TreeManager()
only one private constructor |
Method Summary | |
---|---|
static void |
addTreeBaseListener(TreeBaseListener _listener)
Adds a listener to the list of baseListeners associated to JTrees in the GUI. |
static java.lang.Object[] |
analyzeSelectedNodeInExplorer()
Analyzes the selected node in the explorer to get the main information. |
static javax.swing.tree.DefaultMutableTreeNode |
analyzeSelectedNodeInStructure()
Analyzes the selected node in the global structure, if any. |
static javax.swing.JTree |
createExplorer()
Creates a graphical tree of open objects for the explorer. |
static javax.swing.JTree |
createStructureTree()
Creates a new graphical tree for the IS structure of all the information systems, even the closed ones. |
static java.util.List |
getL_TreeBaseListener()
Gets the list of baseListeners associated to JTrees in the GUI. |
static javax.swing.tree.DefaultMutableTreeNode |
getTreeNodeInNamingTree(ImmutableName _ancestorName,
javax.swing.tree.DefaultMutableTreeNode _rootNode,
ImmutableName _name)
Gets the TreeNode for a Name through the tree path of Strings from a ancestor node which has to be an ancestor of the result. |
static java.lang.Object |
getTrueUserObjectInTreeExplorer(javax.swing.tree.DefaultMutableTreeNode _node)
Gets the true user object in the explorer, managing all the possible cases. |
static ImmutableName |
getTrueUserObjectNameInStructureTree(javax.swing.tree.DefaultMutableTreeNode _node)
Since the element in the IS structure is not the user object of the node, gets the element through the tree path of Strings from the IS node. |
static boolean |
haveAtLeastOneTreeBaseListener(ImmutableName _sourceName)
Detect an ACSRun or ViewInBase that has at least one tree base listener. |
static void |
removeACSMainTreeBaseListener(ImmutableName _name)
Removes the BaseListener associated to a main ACS JTree, defined as the JTree which displays all the ACS in a specific frame, to complete the Explorer displaying. |
static void |
removeAllTreeBaseListenerFor(ImmutableName _sourceName)
Removes in the list of baseListeners all those associated to a specified event source. |
static void |
removeTreeBaseListener(ImmutableName _sourceName,
javax.swing.tree.TreeModel _model)
Removes the baseListener associated to a JTree in the GUI. |
static int |
selectNodeInExplorer(BaseObject _selectedObject)
Selects the object node if it exists and return +1, or return -1 if it is not found. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final int INITIAL_CAPACITY
private static java.util.List l_treeBaseListener__
public static final java.lang.String OPEN_ENTITIES
public static final java.lang.String OPEN_ACS
public static final java.lang.String OPEN_VIEWS
public static final java.lang.String FULL_VIEWS
public static final java.lang.String NOTHAN_VIEWS
public static final java.lang.String META_RIGHTS
public static final java.lang.String GRANTING_RIGHTS
public static final java.lang.String DENYING_RIGHTS
public static final java.util.Map M_EXPLORER_UPPER_NODES
public static final Name STRUCTURE_ROOT_NAME
public static final javax.swing.tree.DefaultMutableTreeNode EMPTY_TREE_NODE
Constructor Detail |
---|
private TreeManager()
Method Detail |
---|
public static final javax.swing.JTree createExplorer() throws BaseError
BaseError
- if an ACS in the base is nullpublic static final javax.swing.JTree createStructureTree() throws ProcessError
ProcessError
public static final void addTreeBaseListener(TreeBaseListener _listener)
_listener
- TreeBaseListenerpublic static final java.util.List getL_TreeBaseListener()
public static final boolean haveAtLeastOneTreeBaseListener(ImmutableName _sourceName)
_sourceName
- of an ACSRun or ViewInBase
public static final void removeACSMainTreeBaseListener(ImmutableName _name) throws SmallError
_name
- the last components (last 4, generally) of the name for the ACSRun which is
associated to the baseListener as the main source event
SmallError
- if the baseListener is unknownActionClose
public static final void removeTreeBaseListener(ImmutableName _sourceName, javax.swing.tree.TreeModel _model) throws SmallError
_sourceName
- of the ACSRun or ViewInBase associated to the baseListener
as the main source event_model
- (usually DefaultTreeModel) associated to the JTree
displaying _source
SmallError
- if the baseListener is unknownpublic static final void removeAllTreeBaseListenerFor(ImmutableName _sourceName) throws SmallError
_sourceName
- of the BaseManager, ACSRun or ViewInBase associated to the baseListener
as the main event source
SmallError
- if the baseListener is unknownpublic static final java.lang.Object[] analyzeSelectedNodeInExplorer()
0- String type of the selected base object:
- possible values are "acs", "acsrun", "resource", "actor", "groupid", "userid",
"aclentry", "view", "metaright", "acsright", "virtualfolder", "privilege",
or "" if it is an another selected node
- is null if there is no selected object in the explorer
1- ImmutableName of the base object - may be null. If it is an AclEntry or a Privilege, the name is not the detailled name
2- JInternalFrame open main frame of the base object - may be null
Called by ActionUtilities, ActionOpenBeamer and ActionOpenSketcher.
Returns {null,null,null} if no frame is selected, or a no-workable frame,
or if the selected node in the explorer is a main or a second node
('OPEN_ACS' node, or '
public static final int selectNodeInExplorer(BaseObject _selectedObject)
_selectedObject
- displayed in the explorer and to select
public static final java.lang.Object getTrueUserObjectInTreeExplorer(javax.swing.tree.DefaultMutableTreeNode _node)
_node
- of the tree explorer or of an acs main frame.
public static final javax.swing.tree.DefaultMutableTreeNode analyzeSelectedNodeInStructure()
public static final ImmutableName getTrueUserObjectNameInStructureTree(javax.swing.tree.DefaultMutableTreeNode _node)
_node
- is in the IS structure tree
public static final javax.swing.tree.DefaultMutableTreeNode getTreeNodeInNamingTree(ImmutableName _ancestorName, javax.swing.tree.DefaultMutableTreeNode _rootNode, ImmutableName _name)
_ancestorName
- is the name of the ACS or the IS which owns _name_rootNode
- is the root of the naming tree. It is associated
to the resources node for an ACS in the explorer, or to the IS._name
- for which the TreeNode under _ancestorNode is returned
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |