|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
org.ceryle.graph.GraphLayoutPanel
org.ceryle.graph.tm.TMLayoutPanel
public class TMLayoutPanel
TMLayoutPanel extends GraphLayoutPanel in providing methods for visualizing
Topic Map-based graphs, as well as display of time lines, subgraphs, and other
visualization features. This class is focused on display, whereas a number of
associated classes take up other roles, such as TMPanelEditor
does most of the grunt work in handling editing actions, coordinating between the
underlying Topic Map(s) and the graph visualization.
As with its superclass, once constructed initialize(TMPanel) must be called to establish the graph engine and its GUI support. The IDs used by this panel's objects match the IDs used in the source TopicMap object, hence a query on ID will produce the object desired, e.g., findNode("id34") will return the TNode whose ID is "id34", which contains a Topic whose ID is "id34".
A TMLayoutPanel can display more than one TopicMap object. Because any TopicMap may cause others to be loaded automatically (via its own mergeMap directives), or due to pre-loading (caused by this application's settings), the number of TopicMaps "stored within" the TMLayoutPanel may not match the number of explicit requests.
getTopicMaps()
and getTopicMapBaseLocators(). getRequestedBaseLocators(). If the user has opened up
just one TopicMap in the GraphView, only the Locator of that
one TopicMap document will be returned by this method. (The
TopicMap object itself may be obtained from the TopicMapProcessor.)
GraphLayoutPanel,
Serialized Form| Nested Class Summary | |
|---|---|
protected class |
TMLayoutPanel.LocalityAdjustmentListener
A listener for changes to the locality scroll bar. |
protected class |
TMLayoutPanel.TopicViewer
Internal class extends Thread to display a dialog box containing information about the selected Topic. |
| Nested classes/interfaces inherited from class org.ceryle.graph.GraphLayoutPanel |
|---|
GraphLayoutPanel.ButtonListener |
| Nested classes/interfaces inherited from class javax.swing.JPanel |
|---|
JPanel.AccessibleJPanel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
int |
anodes
|
protected JButton |
btn_closeLeg
|
protected boolean |
colorizeByDistance
When true, sets a mode causing changes of locality to be color highlighted by a range of colors expressing distance from the selected node. |
static int |
defaultOntology
The default ontology for the open graph dialog. |
protected DirtyEvent |
dirtyEvent
Lazily-created dirty event. |
boolean |
enableMakeConsistent
Variable controlling if the Topic Map should be made consistent prior to visualizing. |
protected boolean |
favInTransition
A boolean indicating that the favorites list is in transition. |
protected FindTopicDialog |
findTopicDlog
The dialog box used for find and replace operations. |
protected EventListenerList |
listenerList
List of dirty event listeners. |
protected AssociationEditorDialog |
m_aedlog
The dialog box used for association editing operations. |
protected static boolean |
m_canEdit
A boolean indicating that the graph can be edited. |
protected ColorLookupTable |
m_clut
The current color lookup table (CLUT). |
protected boolean |
m_dirty
Indicates if the document text has been changed. |
protected FrequencyModel |
m_favorites
|
protected JComboBox |
m_favoritesBox
|
protected Vector |
m_legend
Container for legendary color squares. |
protected int |
m_maxListSize
|
protected HashSet |
m_tmSysIDs
The HashSet containing the explicitly-requested TopicMap system IDs within this TMLayoutPanel. |
protected HashSet |
m_topicmaps
The HashSet containing all TopicMap objects displayed in this TMLayoutPanel. |
protected XidTransferHandler |
m_xidTxferHandler
The TransferHandler supporting Drag and Drop operations. |
int |
maps
|
static int |
MIDDLE_ONTOLOGY
Static constant indicating a middle base ontology. |
static int |
MINIMAL_ONTOLOGY
Static constant indicating a minimal base ontology. |
static int |
NO_BASE_ONTOLOGY
Static constant indicating a (visually) empty base ontology. |
int |
onodes
|
protected int |
ovViewMode
|
int |
rnodes
|
boolean |
showAssociations
Variable controlling if associations should be displayed. |
boolean |
showEdges
Variable controlling if edges should be displayed. |
boolean |
showOccurrences
Variable controlling if topic occurrences should be displayed. |
int |
snodes
|
protected TopicEditorDialog |
tedlog
The dialog box used for topic editing operations. |
protected TMLayoutPanel |
tmlp
|
protected TMPanelEditor |
tmpedit
The editor used for topic editing operations. |
protected TopicMapProcessor |
tmproc
The TopicMapProcessor used by this TMLayoutPanel. |
protected TopicMapVisualizer |
tmviz
The TopicMapVisualizer used to display TopicMaps. |
int |
tnodes
|
static int |
UPPER_ONTOLOGY
Static constant indicating an upper base ontology. |
static boolean |
useDragAndDrop
Variable controlling whether drag and drop is supported. |
| Fields inherited from class org.ceryle.graph.GraphLayoutPanel |
|---|
btn_hyper, btn_infinity, btn_locality, btn_rotate, btn_sequence, btn_zoom, DEFAULT_HYPERBOLIC, DEFAULT_LOCALITY, DEFAULT_SEQUENCE, defaultColor, editUI, gp, gPopupMenu, hvScroll, HYPER_SCROLL, hyperSB, hyperScroll, includeEdit, INFINITE_LOCALITY, lastClick, LOCALITY_SCROLL, localitySB, localityScroll, m_desktop, m_graphContainer, m_legendPanel, m_localityEnabled, m_mouseWheelListener, m_selectedSB, m_verbose, m_view, MAXIMUM_LOCALITY, mh, modeSelect, navigateUI, pm, popPanel, ROTATE_SCROLL, rotateSB, rotateScroll, scrollPanel, SEQUENCE_SCROLL, sequenceSB, sequenceScroll, srvs, tgLensSet, tgUIManager, UI_EDIT, UI_NAVIGATE, UI_ROTATEDRAG, zero, ZOOM_SCROLL, zoomSB, zoomScroll |
| Fields inherited from class javax.swing.JComponent |
|---|
accessibleContext, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW |
| Fields inherited from class java.awt.Component |
|---|
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
| Fields inherited from interface java.awt.image.ImageObserver |
|---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
|---|---|
TMLayoutPanel(View view)
Constructor provided a reference to the parent View. |
|
TMLayoutPanel(View view,
TMPanel tmpanel)
Constructor provided a reference to the parent View. |
|
TMLayoutPanel(View view,
TMPanel tmpanel,
FrequencyModel favList)
Constructor provided a reference to the parent View. |
|
| Method Summary | |
|---|---|
ANode |
addANode(ANode anode,
Point2D.Double p)
Adds an Association Node (ANode) to the graph. |
ANode |
addANode(Association assoc,
String id,
String name)
Adds an Association Node (ANode) with the ID id and an optional Association assoc and String name. |
ANode |
addANode(Association assoc,
String id,
String name,
Point2D.Double p)
Adds an Association Node (ANode) with the ID id and an optional Association assoc and String name. |
void |
addDirtyListener(DirtyListener listener)
Add a listener for changes to the dirty state. |
GraphEdge |
addEdge(GraphNode node1,
GraphNode node2,
int length,
int directed)
Creates an edge between GraphNode node and node2 with a length of length, and edge direction of int directed (whose values may be GraphEdge.UNDIRECTED, GraphEdge.DIRECTED_TO, GraphEdge.DIRECTED_FROM, or GraphEdge.ARROW_FORWARD). |
void |
addFavoritesList(FrequencyModel list)
Called once, adds the favorites list to the left side of the graph radio button bar. |
void |
addOccurrence(TNode tnode,
ONode onode)
Links a base TNode base to an ONode onode using a directed Edge. |
ONode |
addONode(ONode onode)
Adds a Occurrence Node (ONode), provided its ID and (optional) name. |
ONode |
addONode(String id,
String name)
Adds a Occurrence Node (ONode), provided its ID and (optional) name. |
RNode |
addRNode(RNode rnode)
Adds a Role Node (RNode) to the graph. |
void |
addScope(ANode anode,
SNode snode,
Collection nodes)
Links an ANode anode through the SNode snode to a Collection of TNodes nodes using a directed Edge pointing into the association. |
SNode |
addSNode(SNode snode)
Adds a Scope Node (SNode), provided its ID and (optional) name. |
SNode |
addSNode(String id,
String name)
Adds a Scope Node (SNode), provided its ID and (optional) name. |
SubGraph |
addSubGraph(int style,
String id,
String label,
Set set)
Links the provided Node node to a new subgraph having an ID id, String label, and optionally containing the Set of GraphNodes set. |
TNode |
addTNode(TNode tnode,
Point2D.Double p)
Adds a Topic Node (TNode) to the graph. |
TNode |
addTNode(Topic topic,
String name)
Adds a Topic Node (TNode) with the ID id and an optional name. |
TNode |
addTNode(Topic topic,
String name,
Point2D.Double p,
boolean fixed)
Adds a Topic Node (TNode) with the ID id and an optional name. |
void |
addToFavorites(GraphNode node)
Adds TMNode node to the favorites list, if it has been initialized. |
boolean |
addTopicMap(TopicMap topicmap,
boolean merge)
Adds the TopicMap topicmap to this TMLayoutPanel, displaying it via its TopicMapVisualizer, and adding it to the registry of displayed TopicMaps. |
protected void |
addUIs()
Extends org.ceryle.graph.GraphNavigateUI to use a TMNavigateUI. |
boolean |
changeNodeID(String oldId,
String newId)
Changes the ID of a topic having ID oldId to newId, returning true if successful. |
void |
clear()
Clears the TMLayoutPanel of any content. |
protected void |
clearLegend()
Clears the color legend. |
boolean |
contains(TypedInputSource source)
A convenience method that returns true if the graph currently contains a graph whose system identifier (either the base or resource locator) matches the provided parameter. |
void |
defloat(boolean shifted)
This extends GraphLayoutPanel's method by first processing all Topics, then passing the method for anything remaining to the superclass. |
boolean |
deleteNode(GraphNode node,
boolean confirm)
Deletes the GraphNode node, what happens depends on its type. |
boolean |
deleteSelected(boolean confirm)
Deletes the selected nodes, depending on the number of type. |
protected void |
droppedOnBackground(Point p,
String uriref)
Called as a result of a drag 'n drop process, adds the URI reference as an Occurrence of a new Topic, whose display name will be taken from the Occurrence (if available). |
protected void |
droppedOnNode(TMNode node,
String uriref)
Called as a result of a drag 'n drop process, adds the URI reference as an Occurrence on the underlying Topic of TNode tnode. |
void |
editAssociation(ANode anode)
Displays information about the provided ANode (association node) anode. |
void |
editTopic(TNode tnode)
Displays information about the provided TNode (topic node) tnode. |
void |
editTopicMap()
Displays information about the selected TNode (topic node) or ANode (association node), by opening the respective editor. |
Set |
find(String s)
Searches the current graph's node labels for the String s, returning an Iterator over the matching nodes, or null if none are found. |
void |
findNext()
Repeats the previous Find operation. |
void |
findTNodeByLabel(String label)
Searches the current TMPanel for a TNode having label, selecting it if found. |
protected void |
fireDirtyStateChanged()
Notify all listeners that have registered interest for notification on this event type. |
ANode |
getANodeForAssociation(Association assoc)
Returns the ANode for the provided Association if it has been visualized, null if not. |
Set |
getANodes()
Return the Set of all ANodes in the graph, an empty Set if none are available. |
AssociationEditorDialog |
getAssociationEditor()
Returns the AssociationEditorDialog of this GraphView, or null if it has not been created. |
AssociationEditorDialog |
getAssociationEditor(ANode anode)
Returns the AssociationEditorDialog associated with this TopicMayLayoutPanel, provided with an optional ANode anode. |
ColorLookupTable |
getCLUT()
Returns the current ColorLookupTable (CLUT), null if unavailable. |
boolean |
getColorizeByDistance()
Returns the current setting for colorize-by-distance. |
TMPanelEditor |
getEditor()
Returns the TMPanelEditor associated with this TMLayoutPanel. |
FrequencyModel |
getFavoritesList()
Returns the FrequencyModel backing the 'favorites' list, null if it has not been created. |
FindTopicDialog |
getFindTopicDialog(boolean simple)
Returns a lazily-created FindTopicDialog. |
FindTopicPanel |
getFindTopicPanel()
Returns the internal FindTopicPanel of the FindTopicDialog, which provides search capability on the graph. |
GraphPanel |
getGraphPanel()
Overrides the superclass' method to return a lazily-created TMPanel, which extends GraphPanel. |
Set |
getRequestedBaseLocators()
Returns an unmodifiable Set of the base Locators of the explicitly-requested TopicMap objects currently available from this TMLayoutPanel. |
TMPanel |
getTMPanel()
Returns a lazily-created TMPanel (the GraphPanel extension) used by this TMLayoutPanel. |
TNode |
getTNodeByLabel(String label)
Searches the current TMPanel for a TNode having label, returning it if found. |
TNode |
getTNodeForTopic(Topic topic)
Returns the TNode for the provided Topic if it has been visualized, null if not. |
Set |
getTNodes()
Return the Set of all TNodes in the graph, an empty Set if none are available. |
TopicEditorDialog |
getTopicEditor(TNode tnode)
Returns the TopicEditorDialog associated with this TopicMayLayoutPanel, provided with an optional TMNode node. |
TopicMap |
getTopicMap()
Returns the TopicMap object of the first Topic node (TNode) within the current graph. |
Set |
getTopicMapBaseLocators()
Returns an unmodifiable Set of the base locators of all TopicMap objects currently available from this TMLayoutPanel. |
TopicMapProcessor |
getTopicMapProcessor()
Returns the TopicMapProcessor used by this TMLayoutPanel. |
Set |
getTopicMaps()
Returns an unmodifiable Set of the TopicMap objects currently available from this TMLayoutPanel. |
String |
getTopicReference(String title,
String message)
Display a dialog box provided with the dialog box title and message as Strings, requesting selection of a topic, returning a reference to it as a URI (generally, a relative reference). |
Set |
getTopics()
Return the Set of all Topics corresponding to visualized TNodes in the graph, an empty Set if none are available. |
TopicMapVisualizer |
getVisualizer()
Returns the TopicMapVisualizer associated with this TopicMayLayoutPanel. |
int[] |
graphStatus()
Returns status info as an int array. |
void |
gridNodes(Collection nodes,
boolean sort)
Grids the provided Collection of nodes over the available screen area, alphabetizing them if the boolean sort is true. |
void |
initiateDrag(MouseEvent e)
Returns true if a Drag and Drop is supported on this panel and was successfully initiated based on the provided MouseEvent. |
boolean |
isDirty()
Returns true if the current document has been edited. |
boolean |
isEditable()
Returns true if the TMLayoutPanel is editable. |
boolean |
isEmpty()
A convenience method that returns true if the graph is empty (i.e., it contains no TopicMaps). |
void |
keyPressed(KeyEvent ke)
Overrides GraphLayoutPanel's method, responding to KeyEvents sent to the GraphPanel's GraphKeyListener. |
void |
loadTopicMap(Locator loc,
boolean confirm)
Loads the topic map referenced by the provided link node, selecting the topic ID if its URI includes one. |
void |
makeAllConsistent()
Makes all TopicMaps consistent. |
protected void |
makeColorsPermanent()
Transfers the current hilight colors (as from by Colorize By Distance) to each node's flag color, which are stored permanently with the nodes as facets. |
TNode |
mergeTopics()
Merges the selected topic nodes, returning the merged TNode. |
void |
nodeDoubleClicked(Node node,
MouseEvent e)
An action method that indicates that the Node node has been double-clicked. |
void |
nodeFixAll()
A Thread that fixes the location of all TNodes in place. |
void |
nodeUnfixAll()
A Thread that unfixes the location of all Nodes, regardless of type. |
boolean |
openBase()
Queries the user to open a base TopicMap. |
boolean |
openBase(int option)
Opens a default TopicMap. |
void |
openOccurrence(TNode tnode)
Open the occurrence indicated by the Occurrence occur. |
void |
openOccurrence(TNode tnode,
boolean inBrowser)
Open the Occurrences of the TNode tnode. |
void |
openOccurrence(Topic topic,
Occurrence occur)
Open the occurrence indicated by the Occurrence occur. |
void |
openOccurrences()
Open the Occurrences of the selected TNode using an OccurrenceView. |
void |
randomTMGraph()
Generate a random TM-style graph. |
void |
removeDirtyListener(DirtyListener listener)
Remove a listener for changes to the dirty state. |
boolean |
replaceBaseLocator(Locator oldloc,
Locator newloc)
Removes the provided Locator from the set of TopicMap objects currently available from this TMLayoutPanel. |
void |
restoreFavorites(TopicMap topicmap)
Restores the favorites list from the metadata container Topic in the provided TopicMap topicmap. |
void |
saveProperties()
A call to save any user properties to the preferences file. |
Set |
searchTopics(String searchString,
boolean labelsOnly,
boolean partial,
boolean caseSensitive)
Searches the current graph's underlying TopicMap for the String s, returning the Set of matching TNodes, an empty Set if none are found. |
void |
selectAll(boolean unfiltered)
Selects all of the Topic nodes. |
void |
selectByLabel(String label)
Called from favorites list. |
void |
selectFavorite()
If the favorites list is populated, selects the favorite (first item) Topic in the graph. |
Topic |
selectFromTree(Object o,
String title,
String message,
String description)
Displays the TopicTreeDialog, allowing selection of a Topic from an expandable tree. |
void |
selectHierarchy(boolean up,
boolean unfiltered)
Selects TNodes up or down the superclass-subclass hierarchy. |
boolean |
selectNode(Node node)
Selects the Node node, and if the appropriate editor is visible and node is a TNode or ANode, sets it to display the new Node. |
void |
setAssociationVisibility(boolean visible)
Set the visibility of all ANodes to visible. |
void |
setCLUT(String name)
Loads the ColorLookupTable used by this panel to one with the provided name. |
void |
setColorFlags(Set tnodes,
Color color)
Sets the Color of each TNode in the set to Color color. |
void |
setColorizeByDistance(boolean colorize)
When set true, sets a mode causing changes of locality to be color highlighted by a range of colors expressing distance from the selected node, using the current CLUT. |
void |
setDefaultSelection(TopicMap topicmap)
This selects a Topic node in order to affect the locality. |
protected void |
setDefaultStylesheet()
Sets the default colors for this TMLayoutPanel. |
void |
setDirty(boolean dirty)
Sets the state indicating that the current document has been edited. |
void |
setEdgeVisibility(boolean visible)
Set the visibility of all Edges to visible. |
void |
setEditable(boolean editable)
Sets the availability of editing features to editable. |
void |
setFixed(GraphNode node,
boolean fixed)
Sets the fixed state of GraphNode node to the boolean fixed. |
void |
setLegend(ColorLookupTable clut,
boolean show)
Populates the legend panel with the provided CLUT's palette. |
void |
setSizeByDistance(boolean resize)
When set true, sets a mode causing changes of locality to be highlighted by a range of font sizes expressing distance from the selected node. |
void |
setStylesheet(String filename)
Overrides the method in GraphLayoutPanel, setting display properties based on those found in file filename, which is an XML properties file in the same notation as the Ceryle property file (".ceryle.prop"). |
void |
setTopicMapProcessor(TopicMapProcessor tmprocessor)
Sets the TopicMapProcessor of this TMLayoutPanel to the provided parameter. |
void |
showFindTopic(boolean simple)
Displays the FindTopic dialog box. |
void |
storeFavorites(TopicMap topicmap)
Stores the current favorites list to the metadata container Topic for the provided TopicMap topicmap. |
protected void |
tmEngineRecover(String uri)
Queries the user to reinitialize the Topic Map engine following an error. |
Set |
topicsToTNodes(Collection topics)
Provided with a Collection of Topics, returns a Set of corresponding TNodes. |
Set |
traverseGraph(TNode node,
int direction,
int depth,
boolean asTopics)
Traverses the graph to depth nodes in direction, returning a Set of connected TNodes or Topics, depending on the boolean asTopics. |
void |
updateOccurrenceCount(TNode tnode,
Topic topic)
Updates the occurrence count based on the Topic corresponding to the TNode tnode. |
| Methods inherited from class javax.swing.JPanel |
|---|
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public boolean enableMakeConsistent
public static final int NO_BASE_ONTOLOGY
public static final int MINIMAL_ONTOLOGY
public static final int UPPER_ONTOLOGY
public static final int MIDDLE_ONTOLOGY
public boolean showAssociations
public boolean showOccurrences
public boolean showEdges
protected boolean colorizeByDistance
public static int defaultOntology
public int maps
public int tnodes
public int anodes
public int snodes
public int onodes
public int rnodes
public static boolean useDragAndDrop
protected TopicMapVisualizer tmviz
protected FindTopicDialog findTopicDlog
protected TopicEditorDialog tedlog
protected AssociationEditorDialog m_aedlog
protected TMPanelEditor tmpedit
protected final HashSet m_topicmaps
protected ColorLookupTable m_clut
protected Vector m_legend
protected final HashSet m_tmSysIDs
protected XidTransferHandler m_xidTxferHandler
protected static boolean m_canEdit
protected boolean favInTransition
protected boolean m_dirty
protected EventListenerList listenerList
protected DirtyEvent dirtyEvent
protected int ovViewMode
protected JButton btn_closeLeg
protected FrequencyModel m_favorites
protected JComboBox m_favoritesBox
protected TMLayoutPanel tmlp
protected int m_maxListSize
protected TopicMapProcessor tmproc
| Constructor Detail |
|---|
public TMLayoutPanel(View view)
throws TopicMapException
TopicMapException
public TMLayoutPanel(View view,
TMPanel tmpanel)
throws TopicMapException
TopicMapException
public TMLayoutPanel(View view,
TMPanel tmpanel,
FrequencyModel favList)
throws TopicMapException
TopicMapException| Method Detail |
|---|
public void setTopicMapProcessor(TopicMapProcessor tmprocessor)
public TopicMapProcessor getTopicMapProcessor()
protected void setDefaultStylesheet()
setDefaultStylesheet in class GraphLayoutPanel
public void setLegend(ColorLookupTable clut,
boolean show)
protected void makeColorsPermanent()
protected void clearLegend()
public void clear()
protected void droppedOnNode(TMNode node,
String uriref)
In the special case where the URI corresponds to a database collection (with no document ID),
protected void droppedOnBackground(Point p,
String uriref)
In the special case where the URI corresponds to a database collection (with no document ID), the collection is visualized as a spoke of document-based TNodes surrounding a central (often throwaway) hub representing the collection itself.
public FrequencyModel getFavoritesList()
public void addFavoritesList(FrequencyModel list)
public void storeFavorites(TopicMap topicmap)
public void setDefaultSelection(TopicMap topicmap)
public void restoreFavorites(TopicMap topicmap)
public void selectFavorite()
public void addToFavorites(GraphNode node)
public void selectByLabel(String label)
findTNodeByLabel(String)
if the currently-selected node's label does not match label.
public void selectHierarchy(boolean up,
boolean unfiltered)
public void selectAll(boolean unfiltered)
selectAll in class GraphLayoutPanelpublic void defloat(boolean shifted)
defloat in class GraphLayoutPanel
public void gridNodes(Collection nodes,
boolean sort)
public void setCLUT(String name)
public ColorLookupTable getCLUT()
public void setColorFlags(Set tnodes,
Color color)
public void setColorizeByDistance(boolean colorize)
public boolean getColorizeByDistance()
public void setSizeByDistance(boolean resize)
public boolean isDirty()
public void setDirty(boolean dirty)
public void addDirtyListener(DirtyListener listener)
public void removeDirtyListener(DirtyListener listener)
protected void fireDirtyStateChanged()
public boolean changeNodeID(String oldId,
String newId)
protected void addUIs()
addUIs in class GraphLayoutPanelpublic void saveProperties()
public TopicEditorDialog getTopicEditor(TNode tnode)
public AssociationEditorDialog getAssociationEditor()
public AssociationEditorDialog getAssociationEditor(ANode anode)
public TMPanel getTMPanel()
public GraphPanel getGraphPanel()
getGraphPanel in class GraphLayoutPanelpublic TopicMap getTopicMap()
public TopicMapVisualizer getVisualizer()
public void initiateDrag(MouseEvent e)
public TMPanelEditor getEditor()
public Set getRequestedBaseLocators()
public boolean replaceBaseLocator(Locator oldloc,
Locator newloc)
public Set getTopicMaps()
public Set getTopicMapBaseLocators()
public boolean addTopicMap(TopicMap topicmap,
boolean merge)
protected void tmEngineRecover(String uri)
public void makeAllConsistent()
public TNode mergeTopics()
public void setStylesheet(String filename)
setStylesheet in class GraphLayoutPanelpublic boolean openBase()
public boolean openBase(int option)
NO_BASE_ONTOLOGY: No base ontology MINIMAL_ONTOLOGY: minimal ontology UPPER_ONTOLOGY: upper ontology MIDDLE_ONTOLOGY: middle ontology
public void loadTopicMap(Locator loc,
boolean confirm)
NOTE: This is not the same as merging two or more topic maps, this may result in the current graph containing two separate but potentially linked) maps.
public void editTopicMap()
public boolean selectNode(Node node)
selectNode in class GraphLayoutPanelpublic void setEditable(boolean editable)
public boolean isEditable()
public void keyPressed(KeyEvent ke)
keyPressed in interface TGScrollPanekeyPressed in class GraphLayoutPanel
public void nodeDoubleClicked(Node node,
MouseEvent e)
nodeDoubleClicked in interface TGScrollPanenodeDoubleClicked in class GraphLayoutPanelpublic boolean deleteSelected(boolean confirm)
deleteSelected in class GraphLayoutPanel
public boolean deleteNode(GraphNode node,
boolean confirm)
deleteNode in class GraphLayoutPanel
public void addScope(ANode anode,
SNode snode,
Collection nodes)
public void addOccurrence(TNode tnode,
ONode onode)
public SubGraph addSubGraph(int style,
String id,
String label,
Set set)
The value of style must be either SubGraph.STYLE_CURVE or SubGraph.STYLE_RECTANGLE. Returns the subgraph node (SubGraph) if successful, null if not.
public Set traverseGraph(TNode node,
int direction,
int depth,
boolean asTopics)
Traverser:
Traverser.TRAVERSE_ANY,
Traverser.TRAVERSE_TO, or
Traverser.TRAVERSE_FROM.
Note that a depth of 2 is required to traverse anywhere, since the graph is bipartite. Also, if the provided TNode doesn't contain a Topic, an empty Set is returned rather than throwing an exception.
public GraphEdge addEdge(GraphNode node1,
GraphNode node2,
int length,
int directed)
addEdge in class GraphLayoutPanelpublic void setEdgeVisibility(boolean visible)
public TNode addTNode(TNode tnode,
Point2D.Double p)
TNode,
Node
public TNode addTNode(Topic topic,
String name)
TNode,
Topic,
Node
public TNode addTNode(Topic topic,
String name,
Point2D.Double p,
boolean fixed)
topic - the bound Topicname - the label for the TNodep - the initial location of the TNodefixed - when true and a point is provided, also fixes the locationTNode,
Topic,
Nodepublic Set getTNodes()
public TNode getTNodeForTopic(Topic topic)
public ANode getANodeForAssociation(Association assoc)
public Set getTopics()
public Set searchTopics(String searchString,
boolean labelsOnly,
boolean partial,
boolean caseSensitive)
searchString - the string to matchlabelsOnly - search labels only, or all basenamespartial - allow partial name matchescaseSensitive - case senstive name matches when true
public void updateOccurrenceCount(TNode tnode,
Topic topic)
public Set getANodes()
public ANode addANode(ANode anode,
Point2D.Double p)
ANode,
Node
public ANode addANode(Association assoc,
String id,
String name)
assoc - the bound Associationid - the ID for the ANodename - the ANode labelANode,
Association,
Node
public ANode addANode(Association assoc,
String id,
String name,
Point2D.Double p)
assoc - the bound Associationid - the ID for the ANodename - the ANode labelp - the initial location for the ANodeANode,
Association,
Nodepublic void setAssociationVisibility(boolean visible)
public SNode addSNode(SNode snode)
Node
public SNode addSNode(String id,
String name)
Nodepublic ONode addONode(ONode onode)
Node
public ONode addONode(String id,
String name)
Nodepublic RNode addRNode(RNode rnode)
RNode,
Nodepublic void editTopic(TNode tnode)
public void openOccurrences()
public void editAssociation(ANode anode)
public void openOccurrence(TNode tnode)
public void openOccurrence(TNode tnode,
boolean inBrowser)
public void openOccurrence(Topic topic,
Occurrence occur)
public void showFindTopic(boolean simple)
public FindTopicDialog getFindTopicDialog(boolean simple)
public FindTopicPanel getFindTopicPanel()
public Set find(String s)
This may alter the current selection of nodes, and uses the settings from the FindTopicPanel. This is a simple search that only searches only within the TouchGraph nodes, and doesn't look within the underlying Topic objects, which may have more than one base name per Topic.
FindTopicPanel.find(String,boolean)public void findNext()
public TNode getTNodeByLabel(String label)
public void findTNodeByLabel(String label)
public Topic selectFromTree(Object o,
String title,
String message,
String description)
public String getTopicReference(String title,
String message)
public void setFixed(GraphNode node,
boolean fixed)
TNode.setFixed(boolean) because
if the GraphNode is a TNode, it also sets the backing Topic's
storage of the Point.
public Set topicsToTNodes(Collection topics)
public void nodeFixAll()
public void nodeUnfixAll()
public boolean isEmpty()
isEmpty in class GraphLayoutPanelpublic boolean contains(TypedInputSource source)
public int[] graphStatus()
Returns null on empty graphs.
graphStatus in class GraphLayoutPanelpublic void randomTMGraph()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||