public class TopicMapView extends Object
Modifier and Type | Class and Description |
---|---|
protected class |
TopicMapView.Debug
INTERNAL: PRIVATE: Purpose: Output debug information
|
Modifier and Type | Field and Description |
---|---|
protected VizTopicMapConfigurationManager |
configman |
protected VizController |
controller |
protected TopicIF |
currentScopingTopic |
protected TopicMapView.Debug |
debug |
static int |
EDGE_LOCALITY |
protected List |
foregroundQueue |
protected MotionKiller |
motionKiller |
protected ArrayList |
newNodes |
static int |
NODE_LOCALITY |
protected Collection |
nodesUpdateCount |
protected ArrayList |
objectsByType |
protected ArrayList |
objectTypeIndex |
PerformanceStat |
stat |
PerformanceStat |
stat1 |
protected VizigatorUser |
vizigatorUser |
Constructor and Description |
---|
TopicMapView(VizController controller,
TopicMapIF topicmap,
com.touchgraph.graphlayout.TGPanel tgPanel,
VizTopicMapConfigurationManager configman)
Creates the view and updates the TGPanel to show the new view.
|
Modifier and Type | Method and Description |
---|---|
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(Collection edges) |
void |
deleteEdgeUndoable(VizTMObjectIF edge) |
void |
deleteNode(TMAssociationNode node) |
void |
deleteNode(TMTopicNode node) |
void |
deleteSingleEdge(VizTMObjectIF edge) |
protected VizTMObjectIF |
findObject(Object object,
TopicIF type) |
protected void |
focusNode(TMAbstractNode node) |
static String |
fullName(com.touchgraph.graphlayout.Node node) |
Collection |
getAllTopicTypes()
Returns a collection of all topic types in the topic map.
|
Collection |
getAllTopicTypesWithNull()
Returns a collection of all topic types in the topic map including null
(untyped).
|
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) |
Collection |
getPagesFor(TopicIF topic) |
TMTopicNode |
getStartNode() |
com.touchgraph.graphlayout.TGPanel |
getTGPanel() |
TopicMapIF |
getTopicMap() |
protected List |
getTopicNodesFor(TopicIF type) |
void |
headedDebug(String header,
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.
|
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(String operation) |
List |
performSearch(String searchString) |
protected void |
processForegroundQueue(Graphics graphics) |
protected void |
queueInForeground(TMAbstractEdge edge) |
protected void |
queueInForeground(TMAbstractNode node) |
void |
removeAssociationScopeFilterTopic(TopicIF scopingTopic) |
void |
removeDisconnectedNodes() |
void |
resetDamper() |
void |
retainNodes(Collection nodes) |
void |
retainObjects(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,
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(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,
Color c) |
void |
setTypeFont(TopicIF type,
Font font) |
void |
setTypeIcon(TopicIF type,
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() |
protected VizTopicMapConfigurationManager configman
protected VizController controller
protected ArrayList newNodes
protected ArrayList objectTypeIndex
protected ArrayList objectsByType
protected TopicIF currentScopingTopic
protected TopicMapView.Debug debug
protected Collection nodesUpdateCount
public PerformanceStat stat
public PerformanceStat stat1
protected MotionKiller motionKiller
protected VizigatorUser vizigatorUser
protected List foregroundQueue
public static int NODE_LOCALITY
public static int EDGE_LOCALITY
public TopicMapView(VizController controller, TopicMapIF topicmap, com.touchgraph.graphlayout.TGPanel tgPanel, VizTopicMapConfigurationManager configman)
public void updateDisplay()
public void updateDisplayLazily()
public void updateDisplayNoWork()
public void resetDamper()
public void retainNodes(Collection nodes)
public void retainObjects(Collection nodes)
public void setLocality(int newLocality)
newLocality
- The new locality.public Collection loadNodesInLocality(TMAbstractNode startNode, boolean create, boolean delete)
startNode
- The node to start from.create
- Whether to create new nodes and edges.public void setTopicTypeShape(TopicIF type, int shape)
public void setTopicTypeShapePadding(TopicIF type, int value)
public void updateType(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 String fullName(com.touchgraph.graphlayout.Node node)
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 Collection getPagesFor(TopicIF topic)
public Collection getAssociationTypes()
public Collection getAllTopicTypesWithNull()
public 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, Graphics g)
protected void processForegroundQueue(Graphics graphics)
protected VizTMObjectIF findObject(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(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(Color aColor)
public void removeDisconnectedNodes()
public void setTopicTypeExcluded(TopicIF aType, boolean excluded)
public int getLocality()
public TMTopicNode getStartNode()
public TMAbstractNode getFocusNode()
public com.touchgraph.graphlayout.TGPanel getTGPanel()
public void outputDebugInfo(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)