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.
  • Field Details

    • undoManager

      protected UndoManager 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

      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 Function<TopicIF,String> 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()