net.ontopia.topicmaps.viz
Class VizController
java.lang.Object
net.ontopia.topicmaps.viz.VizController
public class VizController
- extends Object
INTERNAL: The VizController manages the interaction between the
gui, model and configuration manager.
Method Summary |
protected void |
addToHidden(TMAbstractNode target,
com.touchgraph.graphlayout.Node source,
Vector hidden)
|
boolean |
canRedo()
|
boolean |
canUndo()
|
void |
clearStartTopic()
|
void |
collapseNode(TMAbstractNode node)
|
void |
configure(AssociationScopeFilterMenu menu,
TopicMapIF topicmap,
ActionListener parentListener)
Configure the given AssociationScopeFilterMenu |
void |
enableAnimation(boolean enable)
Enables/disables animation. |
void |
enableMotionKiller(boolean enable)
Enables/disables the motion killer. |
void |
expandNode(TMAbstractNode node)
|
void |
focusNode(TMAbstractNode node)
Set the given node to be the focus node. |
void |
focusNodeInternal(TMAbstractNode node)
Set the given node to be the focus node. |
void |
focusStartTopic()
|
void |
focusStartTopicInternal()
|
Collection |
getAllTopicTypes()
|
Collection |
getAllTopicTypesWithNull()
|
TypesConfigFrame |
getAssocFrame()
|
int |
getAssociationScopeFilterStrictness()
|
Color |
getAssociationTypeColor(TopicIF type)
|
Collection |
getAssociationTypes()
|
int |
getAssoicationTypeLineWeight(TopicIF selectedType)
|
int |
getAssoicationTypeShape(TopicIF selectedType)
|
VizTopicMapConfigurationManager |
getConfigurationManager()
|
String |
getCurrentConfigDir()
|
String |
getCurrentRDBMSDir()
|
String |
getCurrentTMDir()
|
int |
getDefaultLocality()
|
TopicIF |
getDefaultScopingTopic(TopicMapIF topicmap)
|
ParsedMenuFile |
getEnabledItemIds()
|
TMAbstractNode |
getFocusNode()
|
protected VizController.VizHoverHelpManager |
getHoverHelpManager()
|
boolean |
getIgnoreStateChangedEvent()
Required because the colour chooser will trigger the setTypeColor method
when the selected is colour is changed by Vizigator (no user input). |
int |
getMaxLocality()
|
String |
getRdfMappingFile()
|
List |
getRecentFiles()
|
TopicIF |
getStartTopic()
|
TopicIF |
getStartTopic(TopicMapIF aTopicmap)
|
StringifierIF |
getStringifier()
|
TypesConfigFrame |
getTopicFrame()
|
TopicMapIF |
getTopicMap()
|
Color |
getTopicTypeColor(TopicIF type)
|
int |
getTopicTypeShape(TopicIF type)
|
int |
getTopicTypeShapePadding(TopicIF selectedType)
|
Font |
getTypeFont(TopicIF selectedType)
|
Icon |
getTypeIcon(TopicIF selectedType)
|
String |
getTypeIconFilename(TopicIF selectedType)
|
int |
getTypeVisibility(TopicIF selectedType)
|
TopicMapView |
getView()
|
VizPanel |
getVizPanel()
|
void |
goToMapView()
|
void |
goToTopic(TopicIF topic)
|
boolean |
hasTopicMap()
|
void |
hideEdge(TMAbstractEdge edge)
|
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. |
void |
initializeMotionKillerEnabled()
|
boolean |
isAnimationEnabled()
|
boolean |
isApplet()
|
boolean |
isAssocTypeVisible(TopicIF type)
|
boolean |
isInAssociationScopeFilter(TopicIF scope)
|
boolean |
isMotionKillerEnabled()
|
boolean |
isTopicTypeVisible(TopicIF type)
|
void |
loadAssociationTypes()
|
void |
loadConfig(File f)
|
void |
loadNode(TMAbstractNode node)
|
void |
loadTopic(TopicIF aTopic)
|
TopicMapIF |
loadTopicMap(File f)
|
TopicMapIF |
loadTopicMap(File tmfile,
File cfgfile)
|
TopicMapIF |
loadTopicMap(TopicMapIF topicMap)
|
TopicMapIF |
loadTopicMap(TopicMapIF topicmap,
File cfgfile)
|
void |
loadTopicTypes()
|
void |
openProperties(TMTopicNode node)
|
void |
openPropertiesURL(String url)
Opens the supplied url string in a browser window. |
void |
outputDebugInfo(String operation)
|
List |
performSearch(String searchString)
|
void |
redo()
|
void |
saveGeneralConfiguration()
|
void |
saveTopicMapConfiguration(File file)
|
void |
setAllNodesFixed(boolean fixed)
Sets all nodes to fixed (sticky) or not fixed. |
void |
setAssociationScopeFilterStrictness(int strictness)
|
void |
setAssociationTypeLineWeight(TopicIF type,
int i)
|
void |
setAssociationTypeShape(TopicIF type,
int i)
|
void |
setAssociationTypeVisibility(TopicIF type,
int visibility)
|
void |
setAssociationTypeVisible(TopicIF type,
boolean visible)
|
void |
setColorToDefault(TopicIF type,
boolean topicType)
|
void |
setCurrentConfigDir(String dir)
|
void |
setCurrentRDBMSDir(String dir)
|
void |
setCurrentTMDir(String currentTMDir)
|
void |
setFontToDefault(TopicIF type,
boolean topicType)
|
void |
setGeneralDoubleClick(int anAction)
|
void |
setGeneralLocalityAlgorithm(int anAction)
|
void |
setGeneralSingleClick(int anAction)
|
protected void |
setHighlightNode(TMAbstractNode node,
Graphics g)
|
void |
setIgnoreStateChangedEvent(boolean ignoreStateChangedEvent)
|
void |
setInAssociationScopeFilter(TopicIF scope,
boolean useInFilter)
|
void |
setLocality(int locality)
|
void |
setMaxTopicNameLength(int length)
|
void |
setMotionKillerDelay(int seconds)
|
void |
setMotionKillerEnabled(boolean newValue)
|
void |
setPanelBackgroundColour(Color aColor)
|
void |
setRdfMappingFile(File file)
|
void |
setScopingTopic(TopicIF aScope)
|
void |
setStartTopic(TopicIF topic)
|
void |
setTopicTypeShape(TopicIF type,
int i)
|
void |
setTopicTypeShapePadding(TopicIF type,
int i)
|
void |
setTopicTypeVisibility(TopicIF type,
int visibility)
|
void |
setTopicTypeVisible(TopicIF type,
boolean visible)
|
void |
setTypeColor(TopicIF type,
Color c)
|
void |
setTypeExcluded(TopicIF type)
|
void |
setTypeFont(TopicIF type,
Font font)
|
void |
setTypeIconFilename(TopicIF type,
String string)
|
void |
setTypeIncluded(TopicIF type)
|
void |
shouldDisplayRoleHoverHelp(boolean newValue)
|
void |
shouldDisplayScopedAssociationNames(boolean newValue)
|
void |
stopMovingNodes()
Stops the motion of all nodes completely. |
void |
undo()
|
void |
updateRecentFiles(File f)
|
void |
updateViewType(TopicIF type)
|
void |
updateViewTypeColor(TopicIF type,
Color color)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
undoManager
protected UndoManager undoManager
showNeighbouringCircle
protected boolean showNeighbouringCircle
showNeighboursOnMouseover
protected boolean showNeighboursOnMouseover
VizController
public VizController(VizPanel vpanel,
VizFrontEndIF vizFrontEnd,
com.touchgraph.graphlayout.TGPanel aTgPanel)
getVizPanel
public VizPanel getVizPanel()
getView
public TopicMapView getView()
getDefaultScopingTopic
public TopicIF getDefaultScopingTopic(TopicMapIF topicmap)
hasTopicMap
public boolean hasTopicMap()
isApplet
public boolean isApplet()
getAssociationTypes
public Collection getAssociationTypes()
getAllTopicTypesWithNull
public Collection getAllTopicTypesWithNull()
getAllTopicTypes
public Collection getAllTopicTypes()
isAssocTypeVisible
public boolean isAssocTypeVisible(TopicIF type)
isTopicTypeVisible
public boolean isTopicTypeVisible(TopicIF type)
getTopicTypeColor
public Color getTopicTypeColor(TopicIF type)
getTopicMap
public TopicMapIF getTopicMap()
getTopicTypeShape
public int getTopicTypeShape(TopicIF type)
getAssociationTypeColor
public Color getAssociationTypeColor(TopicIF type)
getStartTopic
public TopicIF getStartTopic()
getStartTopic
public TopicIF getStartTopic(TopicMapIF aTopicmap)
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
public void updateViewTypeColor(TopicIF type,
Color color)
updateViewType
public void updateViewType(TopicIF type)
setColorToDefault
public void setColorToDefault(TopicIF type,
boolean topicType)
setTypeColor
public void setTypeColor(TopicIF type,
Color c)
focusNode
public void focusNode(TMAbstractNode node)
- 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
public void focusNodeInternal(TMAbstractNode node)
- 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
public TMAbstractNode getFocusNode()
setStartTopic
public void setStartTopic(TopicIF topic)
clearStartTopic
public void clearStartTopic()
openPropertiesURL
public void openPropertiesURL(String url)
- 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
public void goToTopic(TopicIF topic)
saveTopicMapConfiguration
public void saveTopicMapConfiguration(File file)
throws IOException
- Throws:
IOException
loadConfig
public void loadConfig(File f)
throws IOException
- Throws:
IOException
loadTopicMap
public TopicMapIF loadTopicMap(File f)
throws IOException
- Throws:
IOException
loadTopicMap
public TopicMapIF loadTopicMap(File tmfile,
File cfgfile)
throws IOException
- Throws:
IOException
loadTopicMap
public TopicMapIF loadTopicMap(TopicMapIF topicMap)
throws IOException
- Throws:
IOException
loadTopicMap
public TopicMapIF loadTopicMap(TopicMapIF topicmap,
File cfgfile)
throws IOException
- Throws:
IOException
getDefaultLocality
public int getDefaultLocality()
getMaxLocality
public int getMaxLocality()
setHighlightNode
protected void setHighlightNode(TMAbstractNode node,
Graphics g)
getConfigurationManager
public VizTopicMapConfigurationManager getConfigurationManager()
setTopicTypeVisibility
public void setTopicTypeVisibility(TopicIF type,
int visibility)
setAssociationTypeVisibility
public void setAssociationTypeVisibility(TopicIF type,
int visibility)
setTopicTypeVisible
public void setTopicTypeVisible(TopicIF type,
boolean visible)
setAssociationTypeVisible
public void setAssociationTypeVisible(TopicIF type,
boolean visible)
goToMapView
public void goToMapView()
setTopicTypeShape
public void setTopicTypeShape(TopicIF type,
int i)
setAssociationTypeShape
public void setAssociationTypeShape(TopicIF type,
int i)
setFontToDefault
public void setFontToDefault(TopicIF type,
boolean topicType)
setTypeFont
public void setTypeFont(TopicIF type,
Font font)
setAssociationTypeLineWeight
public void setAssociationTypeLineWeight(TopicIF type,
int i)
setTopicTypeShapePadding
public void setTopicTypeShapePadding(TopicIF type,
int i)
getTypeVisibility
public int getTypeVisibility(TopicIF selectedType)
getAssoicationTypeShape
public int getAssoicationTypeShape(TopicIF selectedType)
getAssoicationTypeLineWeight
public int getAssoicationTypeLineWeight(TopicIF selectedType)
getTopicTypeShapePadding
public int getTopicTypeShapePadding(TopicIF selectedType)
getTypeIconFilename
public String getTypeIconFilename(TopicIF selectedType)
getTypeIcon
public Icon getTypeIcon(TopicIF selectedType)
getTypeFont
public Font getTypeFont(TopicIF selectedType)
setTypeIconFilename
public void setTypeIconFilename(TopicIF type,
String string)
openProperties
public void openProperties(TMTopicNode node)
shouldDisplayRoleHoverHelp
public void shouldDisplayRoleHoverHelp(boolean newValue)
initializeMotionKillerEnabled
public void initializeMotionKillerEnabled()
setMotionKillerEnabled
public void setMotionKillerEnabled(boolean newValue)
shouldDisplayScopedAssociationNames
public void shouldDisplayScopedAssociationNames(boolean newValue)
setPanelBackgroundColour
public void setPanelBackgroundColour(Color aColor)
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
public void setTypeIncluded(TopicIF type)
setTypeExcluded
public void setTypeExcluded(TopicIF type)
performSearch
public List performSearch(String searchString)
loadNode
public void loadNode(TMAbstractNode node)
outputDebugInfo
public void outputDebugInfo(String operation)
expandNode
public void expandNode(TMAbstractNode node)
getStringifier
public StringifierIF getStringifier()
saveGeneralConfiguration
public void saveGeneralConfiguration()
throws IOException
- Throws:
IOException
updateRecentFiles
public void updateRecentFiles(File f)
getRecentFiles
public List getRecentFiles()
getRdfMappingFile
public String getRdfMappingFile()
setRdfMappingFile
public void setRdfMappingFile(File file)
throws IOException
- Throws:
IOException
getCurrentTMDir
public String getCurrentTMDir()
setCurrentTMDir
public void setCurrentTMDir(String currentTMDir)
throws IOException
- Throws:
IOException
getCurrentRDBMSDir
public String getCurrentRDBMSDir()
setCurrentRDBMSDir
public void setCurrentRDBMSDir(String dir)
throws IOException
- Throws:
IOException
getCurrentConfigDir
public String getCurrentConfigDir()
setCurrentConfigDir
public void setCurrentConfigDir(String dir)
throws IOException
- Throws:
IOException
loadTopic
public void loadTopic(TopicIF aTopic)
collapseNode
public void collapseNode(TMAbstractNode node)
addToHidden
protected void addToHidden(TMAbstractNode target,
com.touchgraph.graphlayout.Node source,
Vector hidden)
focusStartTopic
public void focusStartTopic()
focusStartTopicInternal
public void focusStartTopicInternal()
getHoverHelpManager
protected VizController.VizHoverHelpManager getHoverHelpManager()
setScopingTopic
public void setScopingTopic(TopicIF aScope)
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
public void setInAssociationScopeFilter(TopicIF scope,
boolean useInFilter)
setAssociationScopeFilterStrictness
public void setAssociationScopeFilterStrictness(int strictness)
getAssociationScopeFilterStrictness
public int getAssociationScopeFilterStrictness()
isInAssociationScopeFilter
public boolean isInAssociationScopeFilter(TopicIF scope)
getTopicFrame
public TypesConfigFrame getTopicFrame()
getAssocFrame
public TypesConfigFrame getAssocFrame()
hideEdge
public void hideEdge(TMAbstractEdge edge)
undo
public void undo()
canUndo
public boolean canUndo()
canRedo
public boolean canRedo()
redo
public void redo()
hideNode
public 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.
- 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
public ParsedMenuFile getEnabledItemIds()
loadAssociationTypes
public void loadAssociationTypes()
loadTopicTypes
public void loadTopicTypes()
Copyright © 2000-2012 Ontopia.