net.ontopia.topicmaps.viz
Class VizController

java.lang.Object
  extended by net.ontopia.topicmaps.viz.VizController

public class VizController
extends java.lang.Object

INTERNAL: The VizController manages the interaction between the gui, model and configuration manager.


Nested Class Summary
protected  class VizController.VizHoverHelpManager
          INTERNAL: Hover Help Manager
 
Field Summary
protected  boolean showNeighbouringCircle
           
protected  boolean showNeighboursOnMouseover
           
protected  UndoManager undoManager
           
 
Constructor Summary
VizController(VizPanel vpanel, VizFrontEndIF vizFrontEnd, com.touchgraph.graphlayout.TGPanel aTgPanel)
           
 
Method Summary
protected  void addToHidden(TMAbstractNode target, com.touchgraph.graphlayout.Node source, java.util.Vector hidden)
           
 boolean canRedo()
           
 boolean canUndo()
           
 void clearStartTopic()
           
 void collapseNode(TMAbstractNode node)
           
 void configure(AssociationScopeFilterMenu menu, TopicMapIF topicmap, java.awt.event.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()
           
 java.util.Collection getAllTopicTypes()
           
 java.util.Collection getAllTopicTypesWithNull()
           
 TypesConfigFrame getAssocFrame()
           
 int getAssociationScopeFilterStrictness()
           
 java.awt.Color getAssociationTypeColor(TopicIF type)
           
 java.util.Collection getAssociationTypes()
           
 int getAssoicationTypeLineWeight(TopicIF selectedType)
           
 int getAssoicationTypeShape(TopicIF selectedType)
           
 VizTopicMapConfigurationManager getConfigurationManager()
           
 java.lang.String getCurrentConfigDir()
           
 java.lang.String getCurrentRDBMSDir()
           
 java.lang.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()
           
 java.lang.String getRdfMappingFile()
           
 java.util.List getRecentFiles()
           
 TopicIF getStartTopic()
           
 TopicIF getStartTopic(TopicMapIF aTopicmap)
           
 StringifierIF getStringifier()
           
 TypesConfigFrame getTopicFrame()
           
 TopicMapIF getTopicMap()
           
 java.awt.Color getTopicTypeColor(TopicIF type)
           
 int getTopicTypeShape(TopicIF type)
           
 int getTopicTypeShapePadding(TopicIF selectedType)
           
 java.awt.Font getTypeFont(TopicIF selectedType)
           
 javax.swing.Icon getTypeIcon(TopicIF selectedType)
           
 java.lang.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(java.io.File f)
           
 void loadNode(TMAbstractNode node)
           
 void loadTopic(TopicIF aTopic)
           
 TopicMapIF loadTopicMap(java.io.File f)
           
 TopicMapIF loadTopicMap(java.io.File tmfile, java.io.File cfgfile)
           
 TopicMapIF loadTopicMap(TopicMapIF topicMap)
           
 TopicMapIF loadTopicMap(TopicMapIF topicmap, java.io.File cfgfile)
           
 void loadTopicTypes()
           
 void openProperties(TMTopicNode node)
           
 void openPropertiesURL(java.lang.String url)
          Opens the supplied url string in a browser window.
 void outputDebugInfo(java.lang.String operation)
           
 java.util.List performSearch(java.lang.String searchString)
           
 void redo()
           
 void saveGeneralConfiguration()
           
 void saveTopicMapConfiguration(java.io.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(java.lang.String dir)
           
 void setCurrentRDBMSDir(java.lang.String dir)
           
 void setCurrentTMDir(java.lang.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, java.awt.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(java.awt.Color aColor)
           
 void setRdfMappingFile(java.io.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, java.awt.Color c)
           
 void setTypeExcluded(TopicIF type)
           
 void setTypeFont(TopicIF type, java.awt.Font font)
           
 void setTypeIconFilename(TopicIF type, java.lang.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(java.io.File f)
           
 void updateViewType(TopicIF type)
           
 void updateViewTypeColor(TopicIF type, java.awt.Color color)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

undoManager

protected UndoManager undoManager

showNeighbouringCircle

protected boolean showNeighbouringCircle

showNeighboursOnMouseover

protected boolean showNeighboursOnMouseover
Constructor Detail

VizController

public VizController(VizPanel vpanel,
                     VizFrontEndIF vizFrontEnd,
                     com.touchgraph.graphlayout.TGPanel aTgPanel)
Method Detail

getVizPanel

public VizPanel getVizPanel()

getView

public TopicMapView getView()

getDefaultScopingTopic

public TopicIF getDefaultScopingTopic(TopicMapIF topicmap)

hasTopicMap

public boolean hasTopicMap()

isApplet

public boolean isApplet()

getAssociationTypes

public java.util.Collection getAssociationTypes()

getAllTopicTypesWithNull

public java.util.Collection getAllTopicTypesWithNull()

getAllTopicTypes

public java.util.Collection getAllTopicTypes()

isAssocTypeVisible

public boolean isAssocTypeVisible(TopicIF type)

isTopicTypeVisible

public boolean isTopicTypeVisible(TopicIF type)

getTopicTypeColor

public java.awt.Color getTopicTypeColor(TopicIF type)

getTopicMap

public TopicMapIF getTopicMap()

getTopicTypeShape

public int getTopicTypeShape(TopicIF type)

getAssociationTypeColor

public java.awt.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,
                                java.awt.Color color)

updateViewType

public void updateViewType(TopicIF type)

setColorToDefault

public void setColorToDefault(TopicIF type,
                              boolean topicType)

setTypeColor

public void setTypeColor(TopicIF type,
                         java.awt.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(java.lang.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(java.io.File file)
                               throws java.io.IOException
Throws:
java.io.IOException

loadConfig

public void loadConfig(java.io.File f)
                throws java.io.IOException
Throws:
java.io.IOException

loadTopicMap

public TopicMapIF loadTopicMap(java.io.File f)
                        throws java.io.IOException
Throws:
java.io.IOException

loadTopicMap

public TopicMapIF loadTopicMap(java.io.File tmfile,
                               java.io.File cfgfile)
                        throws java.io.IOException
Throws:
java.io.IOException

loadTopicMap

public TopicMapIF loadTopicMap(TopicMapIF topicMap)
                        throws java.io.IOException
Throws:
java.io.IOException

loadTopicMap

public TopicMapIF loadTopicMap(TopicMapIF topicmap,
                               java.io.File cfgfile)
                        throws java.io.IOException
Throws:
java.io.IOException

getDefaultLocality

public int getDefaultLocality()

getMaxLocality

public int getMaxLocality()

setHighlightNode

protected void setHighlightNode(TMAbstractNode node,
                                java.awt.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,
                        java.awt.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 java.lang.String getTypeIconFilename(TopicIF selectedType)

getTypeIcon

public javax.swing.Icon getTypeIcon(TopicIF selectedType)

getTypeFont

public java.awt.Font getTypeFont(TopicIF selectedType)

setTypeIconFilename

public void setTypeIconFilename(TopicIF type,
                                java.lang.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(java.awt.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 java.util.List performSearch(java.lang.String searchString)

loadNode

public void loadNode(TMAbstractNode node)

outputDebugInfo

public void outputDebugInfo(java.lang.String operation)

expandNode

public void expandNode(TMAbstractNode node)

getStringifier

public StringifierIF getStringifier()

saveGeneralConfiguration

public void saveGeneralConfiguration()
                              throws java.io.IOException
Throws:
java.io.IOException

updateRecentFiles

public void updateRecentFiles(java.io.File f)

getRecentFiles

public java.util.List getRecentFiles()

getRdfMappingFile

public java.lang.String getRdfMappingFile()

setRdfMappingFile

public void setRdfMappingFile(java.io.File file)
                       throws java.io.IOException
Throws:
java.io.IOException

getCurrentTMDir

public java.lang.String getCurrentTMDir()

setCurrentTMDir

public void setCurrentTMDir(java.lang.String currentTMDir)
                     throws java.io.IOException
Throws:
java.io.IOException

getCurrentRDBMSDir

public java.lang.String getCurrentRDBMSDir()

setCurrentRDBMSDir

public void setCurrentRDBMSDir(java.lang.String dir)
                        throws java.io.IOException
Throws:
java.io.IOException

getCurrentConfigDir

public java.lang.String getCurrentConfigDir()

setCurrentConfigDir

public void setCurrentConfigDir(java.lang.String dir)
                         throws java.io.IOException
Throws:
java.io.IOException

loadTopic

public void loadTopic(TopicIF aTopic)

collapseNode

public void collapseNode(TMAbstractNode node)

addToHidden

protected void addToHidden(TMAbstractNode target,
                           com.touchgraph.graphlayout.Node source,
                           java.util.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,
                      java.awt.event.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.