public class PackageView extends Object
LogicalViewProvider
Modifier and Type | Method and Description |
---|---|
static ComboBoxModel |
createListView(SourceGroup group)
Create a list or combo box model suitable for
JList from a source group
showing all Java packages in the source group. |
static Node |
createPackageView(SourceGroup group)
Create a node which will contain package-oriented view of a source group.
|
static Node |
findPath(Node rootNode,
Object object)
Finds the node representing given object, if any.
|
static ListCellRenderer |
listRenderer()
Create a renderer suited to rendering models created using
PackageView.createListView(org.netbeans.api.project.SourceGroup) . |
public static Node createPackageView(SourceGroup group)
The precise structure of this node is not specified by the API and is subject to arbitrary change (perhaps at user option). Callers should not make assumptions about the nature of subnodes, the code or display names of certain nodes, and so on. You may use cookies/lookup to find if particular subnodes correspond to folders or files.
group
- a source group which should be representedpublic static Node findPath(Node rootNode, Object object)
FileObject
s
and DataObject
s.rootNode
- a node some descendant of which should contain the objectobject
- object to findpublic static ComboBoxModel createListView(SourceGroup group)
JList
from a source group
showing all Java packages in the source group.
To display it you will also need PackageView.listRenderer()
.
No particular guarantees are made as to the nature of the model objects themselves,
except that Object.toString()
will give the fully-qualified package name
(or ""
for the default package), regardless of what the renderer
actually displays.
group
- a Java-like source grouppublic static ListCellRenderer listRenderer()
PackageView.createListView(org.netbeans.api.project.SourceGroup)
.
The exact nature of the display is not specified.
Instances of String can also be rendered.