Package net.ontopia.topicmaps.viz
Class VizController
java.lang.Object
net.ontopia.topicmaps.viz.VizController
INTERNAL: The VizController manages the interaction between the
gui, model and configuration manager.
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprotected classINTERNAL: Hover Help Manager -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionVizController(VizPanel vpanel, VizFrontEndIF vizFrontEnd, com.touchgraph.graphlayout.TGPanel aTgPanel) -
Method Summary
Modifier and TypeMethodDescriptionprotected voidaddToHidden(TMAbstractNode target, com.touchgraph.graphlayout.Node source, Vector hidden) booleancanRedo()booleancanUndo()voidvoidcollapseNode(TMAbstractNode node) voidconfigure(AssociationScopeFilterMenu menu, TopicMapIF topicmap, ActionListener parentListener) Configure the given AssociationScopeFilterMenuvoidenableAnimation(boolean enable) Enables/disables animation.voidenableMotionKiller(boolean enable) Enables/disables the motion killer.voidexpandNode(TMAbstractNode node) voidfocusNode(TMAbstractNode node) Set the given node to be the focus node.voidSet the given node to be the focus node.voidvoidintintgetAssoicationTypeLineWeight(TopicIF selectedType) intgetAssoicationTypeShape(TopicIF selectedType) intgetDefaultScopingTopic(TopicMapIF topicmap) protected VizController.VizHoverHelpManagerbooleanRequired because the colour chooser will trigger the setTypeColor method when the selected is colour is changed by Vizigator (no user input).intgetStartTopic(TopicMapIF aTopicmap) getTopicTypeColor(TopicIF type) intgetTopicTypeShape(TopicIF type) intgetTopicTypeShapePadding(TopicIF selectedType) getTypeFont(TopicIF selectedType) getTypeIcon(TopicIF selectedType) getTypeIconFilename(TopicIF selectedType) intgetTypeVisibility(TopicIF selectedType) getView()voidvoidbooleanvoidhideEdge(TMAbstractEdge edge) voidhideNode(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.voidbooleanbooleanisApplet()booleanisAssocTypeVisible(TopicIF type) booleanbooleanbooleanisTopicTypeVisible(TopicIF type) voidvoidloadConfig(File f) voidloadNode(TMAbstractNode node) voidloadTopicMap(File f) loadTopicMap(File tmfile, File cfgfile) loadTopicMap(TopicMapIF topicMap) loadTopicMap(TopicMapIF topicmap, File cfgfile) voidvoidopenProperties(TMTopicNode node) voidopenPropertiesURL(String url) Opens the supplied url string in a browser window.voidoutputDebugInfo(String operation) performSearch(String searchString) voidredo()voidvoidvoidsetAllNodesFixed(boolean fixed) Sets all nodes to fixed (sticky) or not fixed.voidsetAssociationScopeFilterStrictness(int strictness) voidsetAssociationTypeLineWeight(TopicIF type, int i) voidsetAssociationTypeShape(TopicIF type, int i) voidsetAssociationTypeVisibility(TopicIF type, int visibility) voidsetAssociationTypeVisible(TopicIF type, boolean visible) voidsetColorToDefault(TopicIF type, boolean topicType) voidvoidsetCurrentRDBMSDir(String dir) voidsetCurrentTMDir(String currentTMDir) voidsetFontToDefault(TopicIF type, boolean topicType) voidsetGeneralDoubleClick(int anAction) voidsetGeneralLocalityAlgorithm(int anAction) voidsetGeneralSingleClick(int anAction) protected voidsetHighlightNode(TMAbstractNode node, Graphics g) voidsetIgnoreStateChangedEvent(boolean ignoreStateChangedEvent) voidsetInAssociationScopeFilter(TopicIF scope, boolean useInFilter) voidsetLocality(int locality) voidsetMaxTopicNameLength(int length) voidsetMotionKillerDelay(int seconds) voidsetMotionKillerEnabled(boolean newValue) voidsetPanelBackgroundColour(Color aColor) voidsetRdfMappingFile(File file) voidsetScopingTopic(TopicIF aScope) voidsetStartTopic(TopicIF topic) voidsetTopicTypeShape(TopicIF type, int i) voidsetTopicTypeShapePadding(TopicIF type, int i) voidsetTopicTypeVisibility(TopicIF type, int visibility) voidsetTopicTypeVisible(TopicIF type, boolean visible) voidsetTypeColor(TopicIF type, Color c) voidsetTypeExcluded(TopicIF type) voidsetTypeFont(TopicIF type, Font font) voidsetTypeIconFilename(TopicIF type, String string) voidsetTypeIncluded(TopicIF type) voidshouldDisplayRoleHoverHelp(boolean newValue) voidshouldDisplayScopedAssociationNames(boolean newValue) voidStops the motion of all nodes completely.voidundo()voidvoidupdateViewType(TopicIF type) voidupdateViewTypeColor(TopicIF type, Color color)
-
Field Details
-
undoManager
-
showNeighbouringCircle
protected boolean showNeighbouringCircle -
showNeighboursOnMouseover
protected boolean showNeighboursOnMouseover
-
-
Constructor Details
-
VizController
public VizController(VizPanel vpanel, VizFrontEndIF vizFrontEnd, com.touchgraph.graphlayout.TGPanel aTgPanel)
-
-
Method Details
-
getVizPanel
-
getView
-
getDefaultScopingTopic
-
hasTopicMap
public boolean hasTopicMap() -
isApplet
public boolean isApplet() -
getAssociationTypes
-
getAllTopicTypesWithNull
-
getAllTopicTypes
-
isAssocTypeVisible
-
isTopicTypeVisible
-
getTopicTypeColor
-
getTopicMap
-
getTopicTypeShape
-
getAssociationTypeColor
-
getStartTopic
-
getStartTopic
-
setLocality
public void setLocality(int locality) -
getIgnoreStateChangedEvent
public boolean getIgnoreStateChangedEvent()Required because the colour chooser will trigger the setTypeColor method when the selected is colour is changed by Vizigator (no user input). In this case the colour view and configuration should not be changed. -
setIgnoreStateChangedEvent
public void setIgnoreStateChangedEvent(boolean ignoreStateChangedEvent) -
updateViewTypeColor
-
updateViewType
-
setColorToDefault
-
setTypeColor
-
focusNode
Set the given node to be the focus node. This method should only be called from the user interface, and should not be used to implement other operations. To implement other operations, use focusNodeInternal(TMAbstractNode).- Parameters:
node- The new focus node.
-
focusNodeInternal
Set the given node to be the focus node. This method should only be used for the internal working of other operations, like focusNode(TMAbstractNode), and should not be called directly from the user interface.- Parameters:
node- The new focus node.
-
setAllNodesFixed
public void setAllNodesFixed(boolean fixed) Sets all nodes to fixed (sticky) or not fixed.- Parameters:
fixed- true(/false) if all nodes should get a (un)fixed position.
-
getFocusNode
-
setStartTopic
-
clearStartTopic
public void clearStartTopic() -
openPropertiesURL
Opens the supplied url string in a browser window. Which window is used is defined by the 'propTarget' applet parameter- Parameters:
url- String representing the target url
-
goToTopic
-
saveTopicMapConfiguration
- Throws:
IOException
-
loadConfig
- Throws:
IOException
-
loadTopicMap
- Throws:
IOException
-
loadTopicMap
- Throws:
IOException
-
loadTopicMap
- Throws:
IOException
-
loadTopicMap
- Throws:
IOException
-
getDefaultLocality
public int getDefaultLocality() -
getMaxLocality
public int getMaxLocality() -
setHighlightNode
-
getConfigurationManager
-
setTopicTypeVisibility
-
setAssociationTypeVisibility
-
setTopicTypeVisible
-
setAssociationTypeVisible
-
goToMapView
public void goToMapView() -
setTopicTypeShape
-
setAssociationTypeShape
-
setFontToDefault
-
setTypeFont
-
setAssociationTypeLineWeight
-
setTopicTypeShapePadding
-
getTypeVisibility
-
getAssoicationTypeShape
-
getAssoicationTypeLineWeight
-
getTopicTypeShapePadding
-
getTypeIconFilename
-
getTypeIcon
-
getTypeFont
-
setTypeIconFilename
-
openProperties
-
shouldDisplayRoleHoverHelp
public void shouldDisplayRoleHoverHelp(boolean newValue) -
initializeMotionKillerEnabled
public void initializeMotionKillerEnabled() -
setMotionKillerEnabled
public void setMotionKillerEnabled(boolean newValue) -
shouldDisplayScopedAssociationNames
public void shouldDisplayScopedAssociationNames(boolean newValue) -
setPanelBackgroundColour
-
setGeneralSingleClick
public void setGeneralSingleClick(int anAction) -
setGeneralLocalityAlgorithm
public void setGeneralLocalityAlgorithm(int anAction) -
setMotionKillerDelay
public void setMotionKillerDelay(int seconds) -
setGeneralDoubleClick
public void setGeneralDoubleClick(int anAction) -
setMaxTopicNameLength
public void setMaxTopicNameLength(int length) -
setTypeIncluded
-
setTypeExcluded
-
performSearch
-
loadNode
-
outputDebugInfo
-
expandNode
-
getStringifier
-
saveGeneralConfiguration
- Throws:
IOException
-
updateRecentFiles
-
getRecentFiles
-
getRdfMappingFile
-
setRdfMappingFile
- Throws:
IOException
-
getCurrentTMDir
-
setCurrentTMDir
- Throws:
IOException
-
getCurrentRDBMSDir
-
setCurrentRDBMSDir
- Throws:
IOException
-
getCurrentConfigDir
-
setCurrentConfigDir
- Throws:
IOException
-
loadTopic
-
collapseNode
-
addToHidden
protected void addToHidden(TMAbstractNode target, com.touchgraph.graphlayout.Node source, Vector hidden) -
focusStartTopic
public void focusStartTopic() -
focusStartTopicInternal
public void focusStartTopicInternal() -
getHoverHelpManager
-
setScopingTopic
-
configure
public void configure(AssociationScopeFilterMenu menu, TopicMapIF topicmap, ActionListener parentListener) Configure the given AssociationScopeFilterMenu- Parameters:
menu- The menu to configure.topicmap- The topicmap filtered by the filter of the menu.parentListener- Listens for actions on the items in the menu.
-
setInAssociationScopeFilter
-
setAssociationScopeFilterStrictness
public void setAssociationScopeFilterStrictness(int strictness) -
getAssociationScopeFilterStrictness
public int getAssociationScopeFilterStrictness() -
isInAssociationScopeFilter
-
getTopicFrame
-
getAssocFrame
-
hideEdge
-
undo
public void undo() -
canUndo
public boolean canUndo() -
canRedo
public boolean canRedo() -
redo
public void redo() -
hideNode
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.- Parameters:
node- The base node to delete.
-
stopMovingNodes
public void stopMovingNodes()Stops the motion of all nodes completely. -
enableMotionKiller
public void enableMotionKiller(boolean enable) Enables/disables the motion killer. Note: VizPanel uses the value of enabled to build menus, so this method should only be changed (indirectly) from there. -
isMotionKillerEnabled
public boolean isMotionKillerEnabled() -
enableAnimation
public void enableAnimation(boolean enable) Enables/disables animation. Note: VizPanel uses the value of enabled to build menus, so this method should only be changed (indirectly) from there. -
isAnimationEnabled
public boolean isAnimationEnabled() -
getEnabledItemIds
-
loadAssociationTypes
public void loadAssociationTypes() -
loadTopicTypes
public void loadTopicTypes()
-