public abstract class TreeNode
extends com.ibm.mq.explorer.ui.internal.navigator.TreeNodeBase
implements org.eclipse.ui.IActionFilter
Modifier and Type | Field and Description |
---|---|
static int |
ADVANCED_COMPLEXITY_THRESHOLD
Minimum complexity value for a TreeNode to be shown under an Advanced TreeNode
|
static int |
COMPLEX_COMPLEXITY
Complexity value for a complex TreeNodes (under Advanced)
|
static java.lang.String |
COPYRIGHT_NOTICE
Common copyright notice
|
static int |
QSG_COMPLEXITY
Complexity value for a QSG TreeNodes (not under Advanced)
|
static java.lang.String |
SCCSID
CMVC descriptors - expanded during extraction
|
static int |
SIMPLE_COMPLEXITY
Complexity value for a simple TreeNodes (not under Advanced)
|
Constructor and Description |
---|
TreeNode(TreeNode parent,
MQExtObject object,
java.lang.String plugin_id)
Constructor
|
Modifier and Type | Method and Description |
---|---|
void |
addChildToNode(TreeNode child,
int complex)
This method adds the given child to this TreeNode.
|
void |
appendToContextMenu(org.eclipse.swt.widgets.Shell shell,
org.eclipse.jface.action.IMenuManager manager)
appends to the context menu for this TreeNode
|
abstract int |
compare(TreeNode child1,
TreeNode child2)
compares two TreeNodes that are children to this one, and returns their sort order Typically
the comparison will based on either the "sequence" or the "title".
|
static int |
compareByName(TreeNode child1,
TreeNode child2)
Compares two child TreeNodes based on their Names
|
static int |
compareBySequence(TreeNode child1,
TreeNode child2)
Compares two child TreeNodes based on their Sequence values
|
java.io.File |
createDragDropFile()
Create a File representing this TreeNode, for use when the TreeNode is drag-dropped in
FileTransfer format.
|
TreeNode[] |
getChildren()
Returns an array containing the actual child TreeNodes of this TreeNode (visible and invisible)
|
int |
getComplexity()
Returns the complexity value of this TreeNode
|
abstract java.lang.String |
getContentPageId()
Return the id of the content page to be shown when this TreeNode is selected.
|
abstract java.lang.String |
getHelpId()
Return the id of the infopop to be shown when this TreeNode is selected.
|
abstract org.eclipse.swt.graphics.Image |
getIcon()
Return the icon to use for this TreeNode
|
abstract java.lang.String |
getId()
Return the id of this TreeNode This is called by a class implementing ITreeNodeFactory to
identify the a parent TreeNode, so the extension can decide whether to insert additional child
treeNodes under this parent.
|
java.lang.Object |
getObject()
Returns the object associated with this TreeNode.
|
TreeNode |
getParent()
Returns the parent of this TreeNode
|
java.lang.String |
getPlugin_id()
Get the id of the owning Plug-in for this TreeNode
|
TreeNode |
getRealParent()
Returns the real parent of this TreeNode, i.e.
|
abstract java.lang.String |
getSequence()
Return the sequence id of this TreeNode This is called by parent TreeNode which chooses to
order their child TreeNodes based on their sequence number.
|
java.lang.String |
getTreeNodeId()
Get the Id of this TreeNode
|
TreeNode[] |
getVisibleChildren()
Returns an array containing the visible child TreeNodes of this TreeNode
|
boolean |
hasChildren()
Returns whether this TreeNode has children
|
abstract boolean |
isAddChildrenWhenExpanded()
Gets whether children should only be added to this TreeNode when the TreeNode is expanded,
rather than when the Tree is first created
|
boolean |
isAdvancedTreeNode()
Gets whether this TreeNode is an Advanced TreeNode
|
boolean |
isChildExist(java.lang.String childId)
Check whether a child TreeNode with the specified id exists
|
abstract boolean |
isContextMenuFromUiObject()
Gets whether the context menu for this TreeNode should be created from the associated object
rather than from the TreeNode
|
boolean |
isExpanded()
Get whether this TreeNode is currently expanded
|
static boolean |
isPluginEnabled(java.lang.String plugin_id)
Returns whether the specified plug-in is currently enabled (on the Preferences dialog)
|
boolean |
isVisible()
Returns whether this TreeNode is currently visible
|
void |
removeChildFromNode(TreeNode child)
This method removes the given child to this TreeNode
|
void |
removeFromNavigatorView()
Removes this TreeNode from the MQ Navigator view
|
void |
setChildrenVisibility(boolean visible)
Set the visibility flag for all children of this TreeNode.
|
void |
setComplexity(int complex)
Sets the complexity value of this TreeNode
|
void |
setParent(TreeNode newParent)
Sets the parent of this TreeNode
|
void |
setPlugin_id(java.lang.String string)
Set the id of the owning Plug-in for this TreeNode
|
void |
setVisible(boolean isVis)
Sets whether this TreeNode is currently visible
|
boolean |
testAttribute(java.lang.Object target,
java.lang.String name,
java.lang.String value)
Returns whether the specific attribute matches the state of the target object.
|
abstract java.lang.String |
toString()
Return the name of this TreeNode
|
void |
update()
Update the icon and label of this TreeNode, and all its offspring
|
void |
updateItem()
Update the icon and label of this TreeNode only
|
addCommonChoicesToContextMenu, addStandardInfoForDragDropFile, createDragDropFile, createImportExportChild, createXMLMementoForDragDropFile, createXMLMementoForExportDragDropFile, getLoadingChildTreeNode, getMqNavigatorView, getNewObjectProvider, getNLSString, getRealChildren, getRealParent, getTreeNodeComparator, getUiStatusProvider, getUniqueIdentifier, hasChildren, isChildrenAdded, isLoadingAChildTreeNode, isLoadingTreeNode, isRealChildrenAdded, openChild, refresh, refreshVisibleChildren, resetTreeNodeId, setChildren, setChildrenAdded, setChildrenVisibility, setExpanded, setLoadingTreeNode, setMqNavigatorView, setNewObjectProvider, setObject, setOwningTreeNode, setRealChildrenAdded, setTreeNodeComparator, setUiStatusProvider, showStatus
public static final java.lang.String COPYRIGHT_NOTICE
public static final java.lang.String SCCSID
public static final int ADVANCED_COMPLEXITY_THRESHOLD
public static final int SIMPLE_COMPLEXITY
public static final int QSG_COMPLEXITY
public static final int COMPLEX_COMPLEXITY
public TreeNode(TreeNode parent, MQExtObject object, java.lang.String plugin_id)
parent
- parent TreeNodeobject
- object associated with this TreeNodeplugin_id
- the id of the owning plug-inpublic abstract java.lang.String toString()
toString
in class java.lang.Object
public abstract java.lang.String getId()
public abstract java.lang.String getSequence()
public abstract java.lang.String getContentPageId()
public abstract java.lang.String getHelpId()
public abstract org.eclipse.swt.graphics.Image getIcon()
public abstract int compare(TreeNode child1, TreeNode child2)
child1
- first child for comparisonchild2
- second child for comparisonpublic abstract boolean isContextMenuFromUiObject()
public void appendToContextMenu(org.eclipse.swt.widgets.Shell shell, org.eclipse.jface.action.IMenuManager manager)
shell
- the Shell to usemanager
- the Menu Managerpublic abstract boolean isAddChildrenWhenExpanded()
public void removeFromNavigatorView()
public boolean testAttribute(java.lang.Object target, java.lang.String name, java.lang.String value)
testAttribute
in interface org.eclipse.ui.IActionFilter
target
- the target objectname
- the attribute namevalue
- the attribute valuepublic static boolean isPluginEnabled(java.lang.String plugin_id)
plugin_id
- the id of the plug-in to testpublic void addChildToNode(TreeNode child, int complex)
"complexity" is a hint that the extension gives to explorer, ranging from 0 (easiest) to 10 (hardest). A value of 0 will interpreted by explorer as "easy" and 10 will be interpreted as "hard",
In the current implementation of explorer a "complexity" up and including 5 the TreeNode will be added immediately under the parent TreeNode. Otherwise an "Advanced" folder will be added under the parent and the child TreeNode added under the Advanced TreeNode.
addChildToNode
in class com.ibm.mq.explorer.ui.internal.navigator.TreeNodeBase
child
- the childTreeNode to addcomplex
- the complexity value for the child being addedpublic void removeChildFromNode(TreeNode child)
removeChildFromNode
in class com.ibm.mq.explorer.ui.internal.navigator.TreeNodeBase
child
- the child TreeNode to removepublic TreeNode getParent()
getParent
in class com.ibm.mq.explorer.ui.internal.navigator.TreeNodeBase
public TreeNode getRealParent()
public void setParent(TreeNode newParent)
setParent
in class com.ibm.mq.explorer.ui.internal.navigator.TreeNodeBase
newParent
- the new parent for this TreeNodepublic TreeNode[] getVisibleChildren()
public TreeNode[] getChildren()
getChildren
in class com.ibm.mq.explorer.ui.internal.navigator.TreeNodeBase
public boolean hasChildren()
hasChildren
in class com.ibm.mq.explorer.ui.internal.navigator.TreeNodeBase
public java.lang.Object getObject()
getObject
in class com.ibm.mq.explorer.ui.internal.navigator.TreeNodeBase
public void setComplexity(int complex)
setComplexity
in class com.ibm.mq.explorer.ui.internal.navigator.TreeNodeBase
complex
- the complexity value for this TreeNodepublic int getComplexity()
getComplexity
in class com.ibm.mq.explorer.ui.internal.navigator.TreeNodeBase
public static int compareBySequence(TreeNode child1, TreeNode child2)
child1
- the first child TreeNode for comparisonchild2
- the second child TreeNode for comparisonpublic static int compareByName(TreeNode child1, TreeNode child2)
child1
- the first child TreeNode for comparisonchild2
- the second child TreeNode for comparisonpublic void setVisible(boolean isVis)
setVisible
in class com.ibm.mq.explorer.ui.internal.navigator.TreeNodeBase
isVis
- true if the TreeNode is to be made visible, false otherwisepublic void setChildrenVisibility(boolean visible)
visible
- true if all children of the TreeNode are to be visible, false otherwisepublic boolean isVisible()
isVisible
in class com.ibm.mq.explorer.ui.internal.navigator.TreeNodeBase
public boolean isChildExist(java.lang.String childId)
isChildExist
in class com.ibm.mq.explorer.ui.internal.navigator.TreeNodeBase
childId
- child id to testpublic java.lang.String getTreeNodeId()
getTreeNodeId
in class com.ibm.mq.explorer.ui.internal.navigator.TreeNodeBase
public java.lang.String getPlugin_id()
getPlugin_id
in class com.ibm.mq.explorer.ui.internal.navigator.TreeNodeBase
public void setPlugin_id(java.lang.String string)
setPlugin_id
in class com.ibm.mq.explorer.ui.internal.navigator.TreeNodeBase
string
- the id of the owning Plug-in for this TreeNodepublic boolean isExpanded()
isExpanded
in class com.ibm.mq.explorer.ui.internal.navigator.TreeNodeBase
public boolean isAdvancedTreeNode()
isAdvancedTreeNode
in class com.ibm.mq.explorer.ui.internal.navigator.TreeNodeBase
public void update()
update
in class com.ibm.mq.explorer.ui.internal.navigator.TreeNodeBase
public void updateItem()
updateItem
in class com.ibm.mq.explorer.ui.internal.navigator.TreeNodeBase
public java.io.File createDragDropFile()
createDragDropFile
in class com.ibm.mq.explorer.ui.internal.navigator.TreeNodeBase