com.borland.jbuilder.node
Class PackageNode
java.lang.Object
|
+--com.borland.primetime.node.Node
|
+--com.borland.primetime.node.LightweightNode
|
+--com.borland.jbuilder.node.PackageNode
- public class PackageNode
- extends LightweightNode
PackageNode instances represent Java packages as logical containers whose
display children are determined dynamically based on project paths. Note
that the process of determining a PackageNode's display children is quite
expensive. The results should be cached by the caller and refreshed on
demand.
Field Summary |
static java.lang.String |
TYPE
|
Constructor Summary |
PackageNode(Project project,
Node parent,
java.lang.String name)
All LightweightNode subtypes must expose this constructor signature. |
Method Summary |
Node[] |
getDisplayChildren()
Returns a collection of nodes that should be displayed beneath this node
in a project browser, sorted in an order suitable for display. |
javax.swing.Icon |
getDisplayIcon()
Provides an image to be used for graphical representation of the node. |
java.lang.String |
getDisplayName()
|
int |
getDisplaySequence()
Describes the logical group the node belongs to for ordering purposes. |
boolean |
hasDisplayChildren()
Describes whether or not this node has one or more display children. |
static void |
initOpenTool(byte majorVersion,
byte minorVersion)
OpenTool initialization |
Methods inherited from class com.borland.primetime.node.Node |
addNodeListener,
check,
compareTo,
dumpNodes,
dumpNodes,
dumpNodes,
equals,
fireNodeRenamed,
getChildren,
getLongDisplayName,
getNodeID,
getParent,
getProject,
getProperties,
getProperty,
getProperty,
getProperty,
hasChildren,
hashCode,
isModified,
isPersistant,
removeNodeListener,
setParent,
setProperty,
setProperty,
setProperty,
toString |
Methods inherited from class java.lang.Object |
clone,
finalize,
getClass,
notify,
notifyAll,
wait,
wait,
wait |
TYPE
public static final java.lang.String TYPE
PackageNode
public PackageNode(Project project,
Node parent,
java.lang.String name)
- All LightweightNode subtypes must expose this constructor signature.
initOpenTool
public static void initOpenTool(byte majorVersion,
byte minorVersion)
- OpenTool initialization
getDisplayName
public java.lang.String getDisplayName()
- Overrides:
- getDisplayName in class LightweightNode
getDisplaySequence
public int getDisplaySequence()
- Description copied from class: Node
- Describes the logical group the node belongs to for ordering purposes.
Nodes are divided into groups, then sorted by name within a group of nodes
sharing the same grouping value. The groups themselves are ordered by
grouping value, with lower numbers appearing earlier. Arbitrary numbers
have been chosen to sort nodes in JBuilder as follows: Projects = 100,
Folders = 200, Packages = 300, the default = 400, FileNodes = 500,
ClassFileNodes = 600.
- Overrides:
- getDisplaySequence in class Node
- Tags copied from class: Node
- Returns:
- An integer value specifying a grouping value.
getDisplayIcon
public javax.swing.Icon getDisplayIcon()
- Description copied from class: Node
- Provides an image to be used for graphical representation of the node.
- Overrides:
- getDisplayIcon in class Node
- Tags copied from class: Node
- Returns:
- An Icon instance.
getDisplayChildren
public Node[] getDisplayChildren()
- Description copied from class: Node
- Returns a collection of nodes that should be displayed beneath this node
in a project browser, sorted in an order suitable for display. The nodes
listed are not guaranteed to list this node as their parent, and as a
result a complete recursive traversal of display children may result in
endless loops.
By default, a nodes display children are the same as its actual
children. Subclasses may decide to augment this list or replace it
altogether.
- Overrides:
- getDisplayChildren in class Node
- Tags copied from class: Node
- Returns:
- An array of Node instances, or an empty array if no such nodes
exist.
hasDisplayChildren
public boolean hasDisplayChildren()
- Description copied from class: Node
- Describes whether or not this node has one or more display children.
- Overrides:
- hasDisplayChildren in class Node
- Tags copied from class: Node
- Returns:
- True if the node has one or more display children, false otherwise.