Class VizTopicMapConfigurationManager

java.lang.Object
net.ontopia.topicmaps.viz.VizConfigurationManager
net.ontopia.topicmaps.viz.VizTopicMapConfigurationManager

public class VizTopicMapConfigurationManager extends VizConfigurationManager
INTERNAL: Stores and manages configuration. The configuration information is stored as a topic map.
  • Field Details

  • Constructor Details

    • VizTopicMapConfigurationManager

      public VizTopicMapConfigurationManager(File tmfile) throws IOException
      Constructor initializes the configuration by loading a topic map from the URL given in the parameter.
      Throws:
      IOException
    • VizTopicMapConfigurationManager

      public VizTopicMapConfigurationManager(URL tmurl) throws IOException
      Constructor initializes the configuration by loading a topic map from the URL given in the parameter.
      Throws:
      IOException
    • VizTopicMapConfigurationManager

      public VizTopicMapConfigurationManager()
      Creates an empty configuration manager where everything is set to default.
  • Method Details

    • init

      protected void init()
      Overrides:
      init in class VizConfigurationManager
    • getOverrideColorsTopic

      public TopicIF getOverrideColorsTopic()
    • getTopicTypeShapeTopic

      public TopicIF getTopicTypeShapeTopic()
    • getAssociationTypeColorAutogeneratedTopic

      public TopicIF getAssociationTypeColorAutogeneratedTopic()
    • getTopicTypeColorAutogeneratedTopic

      public TopicIF getTopicTypeColorAutogeneratedTopic()
    • getAssociationTypeShapeTopic

      public TopicIF getAssociationTypeShapeTopic()
    • getTopicTypeShapePaddingTopic

      public TopicIF getTopicTypeShapePaddingTopic()
    • getTopicTypeIconTopic

      public TopicIF getTopicTypeIconTopic()
    • getTopicTypeFontTopic

      public TopicIF getTopicTypeFontTopic()
    • getTopicTypeColorTopic

      public TopicIF getTopicTypeColorTopic()
    • getAssociationTypeColorTopic

      public TopicIF getAssociationTypeColorTopic()
    • getTypeVisibleTopic

      public TopicIF getTypeVisibleTopic()
    • getTopicTypeExcludedTopic

      public TopicIF getTopicTypeExcludedTopic()
    • getAssociationTypeLineWeightTopic

      public TopicIF getAssociationTypeLineWeightTopic()
    • getAssociationTypeFontTopic

      public TopicIF getAssociationTypeFontTopic()
    • getTTPriorityManager

      public VizTopicTypePriorityConfigManager getTTPriorityManager()
    • getAssociationTypeColor

      public Color getAssociationTypeColor(TopicIF type)
    • defaultOverrides

      public boolean defaultOverrides(boolean isTopicType)
      returns true iff the default type is set to verride autogenerated values.
      Parameters:
      isTopicType - Set to true to check for the association default type, and false for the topic default type.
    • getUsesDefault

      public boolean getUsesDefault(TopicIF type, boolean isTopicType)
      returns true iff the given topic type is set to use default when it doesn't its own colour.
      Parameters:
      type - The type to check.
      isTopicType -
    • getTopicTypeColor

      public Color getTopicTypeColor(TopicIF type)
    • getTopicTypeShape

      public int getTopicTypeShape(TopicIF topictype)
    • hasOccurrence

      public boolean hasOccurrence(TopicIF topictype, TopicIF type)
    • getDefaultFont

      public Font getDefaultFont()
    • setTypeColor

      public void setTypeColor(TopicIF type, Color c)
    • setTypeColor

      public void setTypeColor(TopicIF type, Color c, TopicMapView view)
      Sets the colour of a given 'type' and updates 'view' accordingly. If the type is defaultType/defaultTopicType, all topic/association types that have no explicit colour setting are updated with this colour.
    • setColorToDefault

      public void setColorToDefault(TopicIF type, boolean topicType, TopicMapView view)
      Sets the color of a given topic/association 'type' to the default value and updates 'view' accordingly.
    • setTypeVisibility

      public void setTypeVisibility(TopicIF type, int visibility, TopicMapView view)
      Sets the given topic 'type' be either filtered in, filtered out or to use the filter setting of the default type. For defaultType, updates all types with no explicit setting. Updates view accordingly.
    • setAssociationTypeVisible

      public void setAssociationTypeVisible(TopicIF type, int visibility, TopicMapView view)
      Sets the given association 'type' be either filtered in, filtered out or to use the filter setting of the default type. For defaultAssociationType, updates all types with no explicit setting. Updates view accordingly.
    • setTypeVisible

      public void setTypeVisible(TopicIF type, boolean visible, TopicMapView view)
      Sets the given topic 'type' to be visible and updates 'view' accordingly. For defaultType, updates all types with no explicit setting.
    • setAssociationTypeVisible

      public void setAssociationTypeVisible(TopicIF type, boolean visible, TopicMapView view)
      Sets the given association 'type' to be visible and updates 'view' accordingly. For defaultAssociationType, updates all types with no explicit setting.
    • setTopicTypeShape

      public void setTopicTypeShape(TopicIF type, int i, TopicMapView view)
      Sets the shape of the given topic 'type' and updates 'view' accordingly. For defaultType, updates all types with no explicit setting.
    • setAssociationTypeShape

      public void setAssociationTypeShape(TopicIF type, int i, TopicMapView view)
      Sets the shape of the given association 'type' and updates 'view' accordingly. For defaultType, updates all types with no explicit setting.
    • setFontToDefault

      public void setFontToDefault(TopicIF type, boolean topicType, TopicMapView view)
      Sets the font of a given topic/association 'type' to the default value and updates 'view' accordingly.
    • setTypeFont

      public void setTypeFont(TopicIF type, Font font, TopicMapView view)
      Sets the font of the given topic/association 'type' and updates 'view' accordingly. For defaultType/defaultAssociationType, updates all types with no explicit setting.
    • setAssociationTypeLineWeight

      public void setAssociationTypeLineWeight(TopicIF type, int i, TopicMapView view)
      Sets the line weight of the given association 'type' and updates 'view' accordingly. For defaultAssociationType, updates all types with no explicit setting.
    • setTopicTypeShapePadding

      public void setTopicTypeShapePadding(TopicIF type, int i, TopicMapView view)
      Sets the shape padding of the given topic 'type' and updates 'view' accordingly. For defaultType, updates all types with no explicit setting.
    • setTypeIconFilename

      public void setTypeIconFilename(TopicIF type, String string, TopicMapView view)
      Sets the name of the icon file (optional) of the given topic 'type' and updates 'view' accordingly. For defaultType, updates all types with no explicit setting.
    • setTypeIncluded

      public void setTypeIncluded(TopicIF type, TopicMapView view)
      Sets the given topic 'type' to be included and updates 'view' accordingly. For defaultType, updates all types with no explicit setting.
    • setTypeExcluded

      public void setTypeExcluded(TopicIF type, TopicMapView view)
      Sets the given topic 'type' to be excluded and updates 'view' accordingly. For defaultType, updates all types with no explicit setting.
    • setTopicTypeShape

      public void setTopicTypeShape(TopicIF type, int i)
    • setAssociationTypeShape

      public void setAssociationTypeShape(TopicIF type, int i)
    • setTypeLineWeight

      public void setTypeLineWeight(TopicIF type, int i)
    • setTopicTypeShapePadding

      public void setTopicTypeShapePadding(TopicIF type, int i)
    • setTypeVisible

      public void setTypeVisible(TopicIF type, int visibility)
    • setTypeVisible

      public void setTypeVisible(TopicIF type, boolean visible)
    • isAssociationTypeVisible

      public boolean isAssociationTypeVisible(TopicIF assoctype)
    • isTopicTypeVisible

      public boolean isTopicTypeVisible(TopicIF assoctype)
    • lookupVisible

      public boolean lookupVisible(TopicIF type, TopicIF occtype, TopicIF defType)
    • isVisible

      public boolean isVisible(TopicIF topic)
    • isVisible

      public boolean isVisible(AssociationIF assoc)
    • matchesFilter

      public boolean matchesFilter(Collection scope)
      Checks if a given scope matches the association scope filter. See matchScope(scope, filter) for details.
      Parameters:
      scope - The scope to check for matching.
      Returns:
      true iff scope matches the association scope filter.
    • matchesFilter

      public boolean matchesFilter(Collection scope, Collection filter)
      Checks if a given scope (collection of topics) matches a given filter (another collection of topics).
      Parameters:
      scope - The scope to match with the filter.
      filter - The filter for the scope to be matched with.
      Returns:
      true iff scope matches filter. The scope either has to contain one, all or none of the topics in filter, depending on getAssociationFilterTightness().
    • isVisible

      public boolean isVisible(AssociationRoleIF role)
    • lookupColor

      public Color lookupColor(TopicIF type, TopicIF occtype)
      Finds the color for this association or topic type that is stored in the topic map. Returns null if no color is stored in the topic map.
    • getStartTopic

      public TopicIF getStartTopic(TopicMapIF graphtm)
      INTERNAL: Finds the start topic in the given topic map, and returns it.
    • getScopingTopic

      public TopicIF getScopingTopic(TopicMapIF graphtm)
      INTERNAL: Finds the scoping topic in the given topic map, and returns it.
    • getScopingTopicHolder

      public TopicIF getScopingTopicHolder()
      INTERNAL: Finds the scoping topic in the given topic map, and returns it.
    • setStartTopic

      public void setStartTopic(TopicIF extstart)
      Sets the start topic of the vizualization. We use the srclocator stored in an occurrence as not all topics have a subjind.
    • setTopicReference

      protected void setTopicReference(TopicIF topic, TopicIF extstart, String base)
    • clearTopic

      public void clearTopic(TopicIF aTopic)
      Clear the start topic if it was set.
    • getTypeInstanceType

      public TopicIF getTypeInstanceType()
    • getTypeVisibility

      public int getTypeVisibility(TopicIF selectedType)
    • getAssociationTypeShape

      public int getAssociationTypeShape(TopicIF selectedType)
    • getAssociationTypeLineWeight

      public int getAssociationTypeLineWeight(TopicIF selectedType)
    • getTopicTypeShapePadding

      public int getTopicTypeShapePadding(TopicIF selectedType)
    • getTypeIconFilename

      public String getTypeIconFilename(TopicIF type)
    • getTypeIcon

      public Icon getTypeIcon(TopicIF type)
    • getTypeFont

      public Font getTypeFont(TopicIF type)
    • getAssociationTypeFont

      public Font getAssociationTypeFont(TopicIF type)
    • setTypeFont

      public void setTypeFont(TopicIF type, Font font)
    • parseFont

      public Font parseFont(String fontString)
    • setTypeIconFilename

      public void setTypeIconFilename(TopicIF type, String string)
    • shouldDisplayRoleHoverHelp

      public boolean shouldDisplayRoleHoverHelp()
    • isMotionKillerEnabled

      public boolean isMotionKillerEnabled()
    • shouldDisplayScopedAssociationNames

      public boolean shouldDisplayScopedAssociationNames()
    • shouldDisplayRoleHoverHelp

      public void shouldDisplayRoleHoverHelp(boolean value)
    • setMotionKillerEnabled

      public void setMotionKillerEnabled(boolean value)
    • shouldDisplayScopedAssociationNames

      public void shouldDisplayScopedAssociationNames(boolean value)
    • setPanelBackgroundColour

      public void setPanelBackgroundColour(Color aColor)
    • getPanelBackgroundColour

      public Color getPanelBackgroundColour()
    • setGeneralSingleClick

      public void setGeneralSingleClick(int anAction)
    • setGeneralLocalityAlgorithm

      public void setGeneralLocalityAlgorithm(int anAction)
    • setMotionKillerDelay

      public void setMotionKillerDelay(int seconds)
    • setMaxTopicNameLength

      public void setMaxTopicNameLength(int length)
    • setGeneralDoubleClick

      public void setGeneralDoubleClick(int anAction)
    • getGeneralDoubleClick

      public int getGeneralDoubleClick()
    • getGeneralSingleClick

      public int getGeneralSingleClick()
    • getGeneralLocalityAlgorithm

      public int getGeneralLocalityAlgorithm()
    • getGeneralMotionKillerDelay

      public int getGeneralMotionKillerDelay()
    • getMaxTopicNameLength

      public int getMaxTopicNameLength()
    • setTypeIncluded

      public void setTypeIncluded(TopicIF type)
    • setTypeExcluded

      public void setTypeExcluded(TopicIF type)
    • isTypeExcluded

      public boolean isTypeExcluded(TopicIF aType)
    • setScopingTopic

      public void setScopingTopic(TopicIF scope)
    • clearStartTopic

      public void clearStartTopic()
    • getSourceLocator

      protected TopicIF getSourceLocator()
    • getSubject

      protected TopicIF getSubject()
    • getSubjectIndicator

      protected TopicIF getSubjectIndicator()
    • setInAssociationScopeFilter

      public void setInAssociationScopeFilter(TopicIF scope, boolean included)
    • isInAssociationScopeFilter

      public boolean isInAssociationScopeFilter(TopicIF scope)
    • setAssociationScopeFilterStrictness

      public void setAssociationScopeFilterStrictness(int strictness)
    • getAssociationScopeFilterStrictness

      public int getAssociationScopeFilterStrictness()
    • getAssociationScopeFilter

      public Collection getAssociationScopeFilter()
      Returns:
      All topics that are used as scopes of associations and are used to filter associations in Vizigator.