|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.peace_tools.views.PropertiesTreeMaker
public class PropertiesTreeMaker
A helper (utility) class to assemble various properties about Jobs, MST file, and Cluster file in the form of a JTree.
This class is a helper class that is used by different views in this package to present the user with a consistent set of information about the file (may it be a MST file or Cluster file) being viewed.
Note: All the API methods exposed by this class are static methods and they can be directly invoked without instantiating an object.
Field Summary | |
---|---|
private static int |
CLUSTER_ICON
A static constant to refer to the Cluster icon position in the CustomIcons array. |
private static javax.swing.Icon[] |
CustomIcons
The static set of icons that are repeatedly used by this class as the user-defined data for selected nodes in the properties tree created by this class. |
private static int |
DATASET_ICON
A static constant to refer to the data set icon position in the CustomIcons array. |
private static int |
ERROR_ICON
A static constant to refer to the error icon position in the CustomIcons array. |
private static int |
FILE_ICON
A static constant to refer to the file icon position in the CustomIcons array. |
private static int |
FILTERS_ICON
A static constant to refer to the filters icon position in the CustomIcons array. |
private static int |
HEURISTICS_ICON
A static constant to refer to the heuristics icon position in the CustomIcons array. |
private static int |
JOB_ICON
A static constant to refer to the job icon position in the CustomIcons array. |
private static int |
MST_ICON
A static constant to refer to the MST icon position in the CustomIcons array. |
private static int |
SERVER_ICON
A static constant to refer to the server icon position in the CustomIcons array. |
private static int |
STATS_ICON
A static constant to refer to the statistics icon position in the CustomIcons array. |
Constructor Summary | |
---|---|
private |
PropertiesTreeMaker()
The default and only constructor. |
Method Summary | |
---|---|
private static void |
addPropertiesRenderer(javax.swing.JTree tree)
Method to set a custom cell renderer to handle icons better. |
static javax.swing.JSplitPane |
createPropertiesLayout(java.lang.String title,
javax.swing.JTree summaryInfo,
java.awt.Component mainView,
javax.swing.JToolBar toolbar,
int toolPosition)
Method to compute and setup summary information. |
private static javax.swing.tree.MutableTreeNode |
makeAnalyzerProperties(FWAnalyzer analyzer)
Helper method to create a properties node for a given analyzer entry. |
private static javax.swing.tree.MutableTreeNode |
makeDataSetProperties(DataSet dataSet,
java.awt.Component parent)
Helper method to create a properties node for a given data set entry. |
private static javax.swing.tree.MutableTreeNode |
makeFileProperties(java.lang.String fileName,
java.lang.String subTreeTitle)
Helper method to create a properties node for a given file. |
private static javax.swing.tree.MutableTreeNode |
makeFilterProperties(Filter filter)
Helper method to create a properties node for a given data set entry. |
private static javax.swing.tree.MutableTreeNode |
makeHeuristicProperties(Heuristic heuristic)
Helper method to create a properties node for a given data set entry. |
private static javax.swing.tree.DefaultMutableTreeNode |
makeJobProperties(Job job)
Helper method to create a properties node for a given MST entry. |
private static javax.swing.tree.DefaultMutableTreeNode |
makeJobProperties(JobSummary summary)
Helper method to create a properties node for a given job summary node. |
private static javax.swing.tree.DefaultMutableTreeNode |
makeMSTProperties(MSTData mst,
boolean needDataSetInfo,
boolean needFileInfo,
java.awt.Component parent)
Helper method to create a properties node for a given MST entry. |
static javax.swing.JTree |
makeProperties(MSTClusterData cluster,
java.awt.Component parent)
Build a property tree with cluster file as the main entry. |
static javax.swing.JTree |
makeProperties(MSTData mst,
java.awt.Component parent)
Build a property tree with MST file as the main entry. |
private static javax.swing.tree.MutableTreeNode |
makeServerProperties(java.lang.String serverID)
Helper method to create a properties node for a given server entry. |
private static javax.swing.tree.MutableTreeNode |
makeSummaryProperties(MSTClusterData cluster,
java.awt.Component parent)
Helper method to create a summary node for a given clustering. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
private static final javax.swing.Icon[] CustomIcons
private static final int MST_ICON
CustomIcons
array. The constant is used to make
the code more readable.
private static final int CLUSTER_ICON
CustomIcons
array. The constant is used to make
the code more readable.
private static final int DATASET_ICON
CustomIcons
array. The constant is used to make
the code more readable.
private static final int JOB_ICON
CustomIcons
array. The constant is used to make
the code more readable.
private static final int FILE_ICON
CustomIcons
array. The constant is used to make
the code more readable.
private static final int SERVER_ICON
CustomIcons
array. The constant is used to make
the code more readable.
private static final int HEURISTICS_ICON
CustomIcons
array. The constant is used to make
the code more readable.
private static final int FILTERS_ICON
CustomIcons
array. The constant is used to make
the code more readable.
private static final int ERROR_ICON
CustomIcons
array. The constant is used to make
the code more readable.
private static final int STATS_ICON
CustomIcons
array. The constant is used to make
the code more readable.
Constructor Detail |
---|
private PropertiesTreeMaker()
Method Detail |
---|
public static javax.swing.JTree makeProperties(MSTData mst, java.awt.Component parent)
mst
- The MST workspace entry for which a detailed properties tree
is to be built by this method.parent
- The parent component to be used to display dialog boxes
on errors.
public static javax.swing.JSplitPane createPropertiesLayout(java.lang.String title, javax.swing.JTree summaryInfo, java.awt.Component mainView, javax.swing.JToolBar toolbar, int toolPosition)
public static javax.swing.JTree makeProperties(MSTClusterData cluster, java.awt.Component parent)
cluster
- The cluster workspace entry for which a detailed properties tree
is to be built by this method.parent
- The final parent component that owns the JTree being created.
This parent is used to report error messages that may occur when building
properties.
private static javax.swing.tree.MutableTreeNode makeSummaryProperties(MSTClusterData cluster, java.awt.Component parent)
cluster
- The cluster workspace entry for which the properties sub-tree
is to be built
private static javax.swing.tree.DefaultMutableTreeNode makeJobProperties(JobSummary summary)
summary
- The Job summary entry for which the properties sub-tree
is to be built
private static javax.swing.tree.DefaultMutableTreeNode makeMSTProperties(MSTData mst, boolean needDataSetInfo, boolean needFileInfo, java.awt.Component parent)
mst
- The MST workspace entry for which the properties sub-tree
is to be builtneedFileInfo
- If this flag is true then this method adds a sub-tree
with properties about the physical MST file.parent
- The parent component to be used to display dialog boxes
on errors.
private static javax.swing.tree.DefaultMutableTreeNode makeJobProperties(Job job)
job
- The job object to be used to create a suitable property
sub-tree for display to the user.
private static javax.swing.tree.MutableTreeNode makeServerProperties(java.lang.String serverID)
serverID
- The internal string identifier that uniquely identifies a
server entry in the workspace.
private static javax.swing.tree.MutableTreeNode makeHeuristicProperties(Heuristic heuristic)
heuristic
- The heuristic workspace entry for which the properties sub-tree
is to be built
private static javax.swing.tree.MutableTreeNode makeFilterProperties(Filter filter)
filter
- The filter workspace entry for which the properties sub-tree
is to be built
private static javax.swing.tree.MutableTreeNode makeDataSetProperties(DataSet dataSet, java.awt.Component parent)
dataSet
- The data set workspace entry for which the properties sub-tree
is to be built
private static javax.swing.tree.MutableTreeNode makeAnalyzerProperties(FWAnalyzer analyzer)
analyzer
- The analyzer workspace entry for which the properties sub-tree
is to be built
private static javax.swing.tree.MutableTreeNode makeFileProperties(java.lang.String fileName, java.lang.String subTreeTitle)
fileName
- The file name for which the properties node is to be builtsubTreeTitle
- The title string to be set for the sub-tree being built
by this method. This string is usually in the form "MST File Properties"
.
private static void addPropertiesRenderer(javax.swing.JTree tree)
tree
- The tree to which a custom properties renderer is
to be added.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |