|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object net.ontopia.topicmaps.viz.TopicMapView
public class TopicMapView
INTERNAL: Maintains the TouchGraph view of the topic map.
Nested Class Summary | |
---|---|
protected class |
TopicMapView.Debug
INTERNAL: PRIVATE: Purpose: Output debug information |
Field Summary | |
---|---|
protected VizTopicMapConfigurationManager |
configman
|
protected VizController |
controller
|
protected TopicIF |
currentScopingTopic
|
protected TopicMapView.Debug |
debug
|
static int |
EDGE_LOCALITY
|
protected java.util.List |
foregroundQueue
|
protected java.util.ArrayList |
newNodes
|
static int |
NODE_LOCALITY
|
protected java.util.ArrayList |
objectsByType
|
protected java.util.ArrayList |
objectTypeIndex
|
PerformanceStat |
stat
|
PerformanceStat |
stat1
|
Constructor Summary | |
---|---|
TopicMapView(VizController controller,
TopicMapIF topicmap,
com.touchgraph.graphlayout.TGPanel tgPanel,
VizTopicMapConfigurationManager configman)
Creates the view and updates the TGPanel to show the new view. |
Method Summary | |
---|---|
protected void |
addAssociation(VizTMObjectIF object)
|
void |
addAssociationScopeFilterTopic(TopicIF scopingTopic)
|
protected TMTopicNode |
assertNode(TopicIF topic,
boolean create)
|
protected void |
build()
Clears the panel and builds a new view. |
protected void |
buildAll()
|
void |
buildAllSilent()
EXPERIMENTAL: method to redraw the map, without starting a new thread or displaying the progress bar |
protected TMTopicNode |
buildTopic(TopicIF topic)
|
void |
clearFocusNode()
|
void |
clearModel()
|
void |
createAssociations(TMAbstractNode abstractNode)
Creates all edges for this node, including type -> instance, instance -> type, and ordinary associations. |
void |
createAssociations(TMAbstractNode abstractNode,
boolean create)
|
void |
createAssociations(TMAbstractNode abstractNode,
boolean create,
boolean createEdgesToExistingNodes)
Creates all edges for this node, including type -> instance, instance -> type, and ordinary associations. |
void |
deleteEdge(VizTMObjectIF vizTMObject)
|
void |
deleteEdges(java.util.Collection edges)
|
void |
deleteEdgeUndoable(VizTMObjectIF edge)
|
void |
deleteNode(TMAssociationNode node)
|
void |
deleteNode(TMTopicNode node)
|
void |
deleteSingleEdge(VizTMObjectIF edge)
|
protected VizTMObjectIF |
findObject(java.lang.Object object,
TopicIF type)
|
protected void |
focusNode(TMAbstractNode node)
|
static java.lang.String |
fullName(com.touchgraph.graphlayout.Node node)
|
java.util.Collection |
getAllTopicTypes()
Returns a collection of all topic types in the topic map. |
java.util.Collection |
getAllTopicTypesWithNull()
Returns a collection of all topic types in the topic map including null (untyped). |
java.util.Collection |
getAssociationTypes()
Returns a collection of all association types in the topic map. |
protected TMAssociationEdge |
getEdge(AssociationIF association)
|
protected TMRoleEdge |
getEdge(AssociationRoleIF role)
|
protected TMClassInstanceAssociation |
getEdge(TopicIF type,
TopicIF instance)
|
TMAbstractNode |
getFocusNode()
|
protected VizController.VizHoverHelpManager |
getHoverHelpManager()
|
int |
getLocality()
|
int |
getLocalityAlgorithm()
|
int |
getMaxTopicNameLength()
|
protected TMAssociationNode |
getNode(AssociationIF association)
|
java.util.Collection |
getPagesFor(TopicIF topic)
|
TMTopicNode |
getStartNode()
|
com.touchgraph.graphlayout.TGPanel |
getTGPanel()
|
TopicMapIF |
getTopicMap()
|
protected java.util.List |
getTopicNodesFor(TopicIF type)
|
void |
headedDebug(java.lang.String header,
java.lang.Object object)
|
void |
hideNode(TMAbstractNode node)
Delete a node, all incident edges and all nodes and edges that no longer have a path to the focus node as a consequence of this. |
protected void |
initializeAssociation(VizTMAssociationIF anInstance)
Initialize those things only associated with Association Objects |
protected void |
lenientAddNode(TMAbstractNode node)
This method was created as a work-around for bug #1898, which happens when two nodes have the same ID (the second node failing to get added to tgPanel. |
java.util.Collection |
loadNodesInLocality(TMAbstractNode startNode,
boolean create,
boolean delete)
If create is true, adds all nodes within locality's reach that were not already visible. |
protected VizTMObjectIF |
makeAssociation(AssociationIF assoc,
TMTopicNode activePlayer,
boolean create)
Create an associations, or, in the case of an n-ary association, if the activePlayer is not null, create the associatin node itself and then only the role that active player is involved in. |
protected TMRoleEdge |
makeRole(TMAssociationNode assoc,
AssociationRoleIF role,
boolean create)
|
protected TMClassInstanceAssociation |
makeTypeInstanceEdge(TMTopicNode instance,
TMTopicNode type)
|
void |
outputDebugInfo(java.lang.String operation)
|
java.util.List |
performSearch(java.lang.String searchString)
|
protected void |
processForegroundQueue(java.awt.Graphics graphics)
|
protected void |
queueInForeground(TMAbstractEdge edge)
|
protected void |
queueInForeground(TMAbstractNode node)
|
void |
removeAssociationScopeFilterTopic(TopicIF scopingTopic)
|
void |
removeDisconnectedNodes()
|
void |
resetDamper()
|
void |
retainNodes(java.util.Collection nodes)
|
void |
retainObjects(java.util.Collection nodes)
|
void |
setAllNodesFixed(boolean fixed)
Sets all nodes to fixed (sticky) or not fixed. |
void |
setAssociationScopeFilterStrictness(int strictness)
Set the current level of strictness of the association scope filter and remove/add edges where needed. |
void |
setAssociationTypeLineWeight(TopicIF type,
int lineWeight)
|
void |
setAssociationTypeShape(TopicIF type,
int shape)
|
void |
setAssociationTypeVisible(TopicIF type,
boolean visible)
NOTE: The calling method is responsible for calling the method: updateAssociationCountForAllTopics(); |
void |
setConfigManager(VizTopicMapConfigurationManager configman)
Called when a new configuration has been loaded. |
protected void |
setFocusNodeOf(TMObjectIF tmObject)
Find the node of the given TMObjectIF. |
protected void |
setHighlightNode(TMAbstractNode node,
java.awt.Graphics g)
|
void |
setLocality(int newLocality)
Set the locality to a given value and adds/removes nodes where appropriate. |
void |
setMaxTopicNameLength(int length)
|
void |
setMotionKillerEnabled(boolean enabled)
|
void |
setPanelBackgroundColour(java.awt.Color aColor)
|
void |
setScopingTopic(TopicIF aScope)
|
void |
setTopicTypeExcluded(TopicIF aType,
boolean excluded)
|
void |
setTopicTypeShape(TopicIF type,
int shape)
|
void |
setTopicTypeShapePadding(TopicIF type,
int value)
|
void |
setTopicTypeVisible(TopicIF type,
boolean visible)
NOTE! The calling mehtod is itself responsible for calling the method: updateAssociationCountForAllTopics(). |
void |
setTypeColor(TopicIF type,
java.awt.Color c)
|
void |
setTypeFont(TopicIF type,
java.awt.Font font)
|
void |
setTypeIcon(TopicIF type,
javax.swing.Icon icon)
|
void |
shouldDisplayRoleHoverHelp(boolean newValue)
|
void |
shouldDisplayScopedAssociationNames(boolean newValue)
|
void |
updateAssociationCountForAllTopics()
|
void |
updateAssociationCountForMarkedTopics()
|
void |
updateDisplay()
|
void |
updateDisplayLazily()
|
void |
updateDisplayNoWork()
|
void |
updateType(TopicIF type)
|
boolean |
useNodeLocality()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected VizTopicMapConfigurationManager configman
protected VizController controller
protected java.util.ArrayList newNodes
protected java.util.ArrayList objectTypeIndex
protected java.util.ArrayList objectsByType
protected TopicIF currentScopingTopic
protected TopicMapView.Debug debug
public PerformanceStat stat
public PerformanceStat stat1
protected java.util.List foregroundQueue
public static int NODE_LOCALITY
public static int EDGE_LOCALITY
Constructor Detail |
---|
public TopicMapView(VizController controller, TopicMapIF topicmap, com.touchgraph.graphlayout.TGPanel tgPanel, VizTopicMapConfigurationManager configman)
Method Detail |
---|
public void updateDisplay()
public void updateDisplayLazily()
public void updateDisplayNoWork()
public void resetDamper()
public void retainNodes(java.util.Collection nodes)
public void retainObjects(java.util.Collection nodes)
public void setLocality(int newLocality)
newLocality
- The new locality.public java.util.Collection loadNodesInLocality(TMAbstractNode startNode, boolean create, boolean delete)
startNode
- The node to start from.create
- Whether to create new nodes and edges.
public void setTypeFont(TopicIF type, java.awt.Font font)
public void setTopicTypeShape(TopicIF type, int shape)
public void setTypeColor(TopicIF type, java.awt.Color c)
public void setTopicTypeShapePadding(TopicIF type, int value)
public void setTypeIcon(TopicIF type, javax.swing.Icon icon)
public void updateType(TopicIF type)
protected java.util.List getTopicNodesFor(TopicIF type)
public void setAssociationTypeShape(TopicIF type, int shape)
public void setAssociationTypeLineWeight(TopicIF type, int lineWeight)
protected void focusNode(TMAbstractNode node)
public void clearFocusNode()
public void setConfigManager(VizTopicMapConfigurationManager configman)
public void hideNode(TMAbstractNode node)
node
- The base node to delete.public static java.lang.String fullName(com.touchgraph.graphlayout.Node node)
public void headedDebug(java.lang.String header, java.lang.Object object)
public void setTopicTypeVisible(TopicIF type, boolean visible)
public void setAssociationTypeVisible(TopicIF type, boolean visible)
type
- The type to set (in)visible.visible
- true if 'type' should be set visible. Otherwise false.public void setAssociationScopeFilterStrictness(int strictness)
strictness
- The new level of strictnesspublic void removeAssociationScopeFilterTopic(TopicIF scopingTopic)
public void addAssociationScopeFilterTopic(TopicIF scopingTopic)
public void updateAssociationCountForAllTopics()
public void updateAssociationCountForMarkedTopics()
public TopicMapIF getTopicMap()
public java.util.Collection getPagesFor(TopicIF topic)
public java.util.Collection getAssociationTypes()
public java.util.Collection getAllTopicTypesWithNull()
public java.util.Collection getAllTopicTypes()
protected void build()
protected TMTopicNode buildTopic(TopicIF topic)
public void buildAllSilent()
protected void buildAll()
protected TMTopicNode assertNode(TopicIF topic, boolean create)
protected void queueInForeground(TMAbstractNode node)
protected void queueInForeground(TMAbstractEdge edge)
protected void setHighlightNode(TMAbstractNode node, java.awt.Graphics g)
protected void processForegroundQueue(java.awt.Graphics graphics)
protected VizTMObjectIF findObject(java.lang.Object object, TopicIF type)
protected TMClassInstanceAssociation makeTypeInstanceEdge(TMTopicNode instance, TMTopicNode type)
protected VizTMObjectIF makeAssociation(AssociationIF assoc, TMTopicNode activePlayer, boolean create)
protected void lenientAddNode(TMAbstractNode node)
node
- The node that should be added to tgPanel.protected void setFocusNodeOf(TMObjectIF tmObject)
tmObject
- from which to create the node.protected TMRoleEdge makeRole(TMAssociationNode assoc, AssociationRoleIF role, boolean create)
protected void initializeAssociation(VizTMAssociationIF anInstance)
anInstance
- protected void addAssociation(VizTMObjectIF object)
protected VizController.VizHoverHelpManager getHoverHelpManager()
public void createAssociations(TMAbstractNode abstractNode)
public void createAssociations(TMAbstractNode abstractNode, boolean create)
public void createAssociations(TMAbstractNode abstractNode, boolean create, boolean createEdgesToExistingNodes)
public int getLocalityAlgorithm()
public boolean useNodeLocality()
public void deleteEdges(java.util.Collection edges)
public void deleteEdgeUndoable(VizTMObjectIF edge)
public void deleteEdge(VizTMObjectIF vizTMObject)
public void deleteSingleEdge(VizTMObjectIF edge)
public void deleteNode(TMAssociationNode node)
public void deleteNode(TMTopicNode node)
protected TMAssociationEdge getEdge(AssociationIF association)
protected TMRoleEdge getEdge(AssociationRoleIF role)
protected TMClassInstanceAssociation getEdge(TopicIF type, TopicIF instance)
protected TMAssociationNode getNode(AssociationIF association)
public void shouldDisplayRoleHoverHelp(boolean newValue)
public void setMotionKillerEnabled(boolean enabled)
public void shouldDisplayScopedAssociationNames(boolean newValue)
public void setPanelBackgroundColour(java.awt.Color aColor)
public void removeDisconnectedNodes()
public void setTopicTypeExcluded(TopicIF aType, boolean excluded)
public java.util.List performSearch(java.lang.String searchString)
public int getLocality()
public TMTopicNode getStartNode()
public TMAbstractNode getFocusNode()
public com.touchgraph.graphlayout.TGPanel getTGPanel()
public void outputDebugInfo(java.lang.String operation)
public void setScopingTopic(TopicIF aScope)
public void clearModel()
public void setAllNodesFixed(boolean fixed)
fixed
- true(/false) if all nodes should get a (un)fixed position.public int getMaxTopicNameLength()
public void setMaxTopicNameLength(int length)
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |