Package net.ontopia.topicmaps.viz
Class VizTopicMapConfigurationManager
java.lang.Object
net.ontopia.topicmaps.viz.VizConfigurationManager
net.ontopia.topicmaps.viz.VizTopicMapConfigurationManager
INTERNAL: Stores and manages configuration. The configuration information is
stored as a topic map.
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final intstatic final Colorstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intstatic final intprotected static final Stringprotected TopicIFstatic final intstatic final intstatic final intFields inherited from class net.ontopia.topicmaps.viz.VizConfigurationManager
BASE, builder, DEFAULT_ASSOCIATION_TYPE, DEFAULT_TYPE, defaultAssociationType, defaultType, GENERAL_TOPIC, generalTopic, topicmap, UNTYPED, untypedTopic -
Constructor Summary
ConstructorsConstructorDescriptionCreates an empty configuration manager where everything is set to default.VizTopicMapConfigurationManager(File tmfile) Constructor initializes the configuration by loading a topic map from the URL given in the parameter.Constructor initializes the configuration by loading a topic map from the URL given in the parameter. -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidclearTopic(TopicIF aTopic) Clear the start topic if it was set.booleandefaultOverrides(boolean isTopicType) returns true iff the default type is set to verride autogenerated values.intintgetAssociationTypeLineWeight(TopicIF selectedType) intgetAssociationTypeShape(TopicIF selectedType) intintintintintgetScopingTopic(TopicMapIF graphtm) INTERNAL: Finds the scoping topic in the given topic map, and returns it.INTERNAL: Finds the scoping topic in the given topic map, and returns it.protected TopicIFgetStartTopic(TopicMapIF graphtm) INTERNAL: Finds the start topic in the given topic map, and returns it.protected TopicIFprotected TopicIFgetTopicTypeColor(TopicIF type) intgetTopicTypeShape(TopicIF topictype) intgetTopicTypeShapePadding(TopicIF selectedType) getTypeFont(TopicIF type) getTypeIcon(TopicIF type) getTypeIconFilename(TopicIF type) intgetTypeVisibility(TopicIF selectedType) booleangetUsesDefault(TopicIF type, boolean isTopicType) returns true iff the given topic type is set to use default when it doesn't its own colour.booleanhasOccurrence(TopicIF topictype, TopicIF type) protected voidinit()booleanisAssociationTypeVisible(TopicIF assoctype) booleanbooleanbooleanisTopicTypeVisible(TopicIF assoctype) booleanisTypeExcluded(TopicIF aType) booleanisVisible(AssociationIF assoc) booleanisVisible(AssociationRoleIF role) booleanlookupColor(TopicIF type, TopicIF occtype) Finds the color for this association or topic type that is stored in the topic map.booleanlookupVisible(TopicIF type, TopicIF occtype, TopicIF defType) booleanmatchesFilter(Collection scope) Checks if a given scope matches the association scope filter.booleanmatchesFilter(Collection scope, Collection filter) Checks if a given scope (collection of topics) matches a given filter (another collection of topics).voidsetAssociationScopeFilterStrictness(int strictness) voidsetAssociationTypeLineWeight(TopicIF type, int i, TopicMapView view) Sets the line weight of the given association 'type' and updates 'view' accordingly.voidsetAssociationTypeShape(TopicIF type, int i) voidsetAssociationTypeShape(TopicIF type, int i, TopicMapView view) Sets the shape of the given association 'type' and updates 'view' accordingly.voidsetAssociationTypeVisible(TopicIF type, boolean visible, TopicMapView view) Sets the given association 'type' to be visible and updates 'view' accordingly.voidsetAssociationTypeVisible(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.voidsetColorToDefault(TopicIF type, boolean topicType, TopicMapView view) Sets the color of a given topic/association 'type' to the default value and updates 'view' accordingly.voidsetFontToDefault(TopicIF type, boolean topicType, TopicMapView view) Sets the font of a given topic/association 'type' to the default value and updates 'view' accordingly.voidsetGeneralDoubleClick(int anAction) voidsetGeneralLocalityAlgorithm(int anAction) voidsetGeneralSingleClick(int anAction) voidsetInAssociationScopeFilter(TopicIF scope, boolean included) voidsetMaxTopicNameLength(int length) voidsetMotionKillerDelay(int seconds) voidsetMotionKillerEnabled(boolean value) voidsetPanelBackgroundColour(Color aColor) voidsetScopingTopic(TopicIF scope) voidsetStartTopic(TopicIF extstart) Sets the start topic of the vizualization.protected voidsetTopicReference(TopicIF topic, TopicIF extstart, String base) voidsetTopicTypeShape(TopicIF type, int i) voidsetTopicTypeShape(TopicIF type, int i, TopicMapView view) Sets the shape of the given topic 'type' and updates 'view' accordingly.voidsetTopicTypeShapePadding(TopicIF type, int i) voidsetTopicTypeShapePadding(TopicIF type, int i, TopicMapView view) Sets the shape padding of the given topic 'type' and updates 'view' accordingly.voidsetTypeColor(TopicIF type, Color c) voidsetTypeColor(TopicIF type, Color c, TopicMapView view) Sets the colour of a given 'type' and updates 'view' accordingly.voidsetTypeExcluded(TopicIF type) voidsetTypeExcluded(TopicIF type, TopicMapView view) Sets the given topic 'type' to be excluded and updates 'view' accordingly.voidsetTypeFont(TopicIF type, Font font) voidsetTypeFont(TopicIF type, Font font, TopicMapView view) Sets the font of the given topic/association 'type' and updates 'view' accordingly.voidsetTypeIconFilename(TopicIF type, String string) voidsetTypeIconFilename(TopicIF type, String string, TopicMapView view) Sets the name of the icon file (optional) of the given topic 'type' and updates 'view' accordingly.voidsetTypeIncluded(TopicIF type) voidsetTypeIncluded(TopicIF type, TopicMapView view) Sets the given topic 'type' to be included and updates 'view' accordingly.voidsetTypeLineWeight(TopicIF type, int i) voidsetTypeVisibility(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.voidsetTypeVisible(TopicIF type, boolean visible) voidsetTypeVisible(TopicIF type, boolean visible, TopicMapView view) Sets the given topic 'type' to be visible and updates 'view' accordingly.voidsetTypeVisible(TopicIF type, int visibility) booleanvoidshouldDisplayRoleHoverHelp(boolean value) booleanvoidshouldDisplayScopedAssociationNames(boolean value) Methods inherited from class net.ontopia.topicmaps.viz.VizConfigurationManager
getConfigTopic, getOccurrence, getOccurrenceValue, getOccurrenceValue, getOccurrenceValue, getTopic, getTopic, getTopicMap, removeOccurence, removeOccurrence, save, setOccurenceValue, setOccurenceValue, setOccurrenceValue
-
Field Details
-
DEFAULT_PANEL_BACKGROUND_COLOUR
-
NODE_ORIENTED
public static final int NODE_ORIENTED- See Also:
-
EDGE_ORIENTED
public static final int EDGE_ORIENTED- See Also:
-
EXPAND_NODE
public static final int EXPAND_NODE- See Also:
-
SET_FOCUS_NODE
public static final int SET_FOCUS_NODE- See Also:
-
GO_TO_TOPIC
public static final int GO_TO_TOPIC- See Also:
-
DEFAULT_MAX_TOPIC_NAME_LENGTH
public static final int DEFAULT_MAX_TOPIC_NAME_LENGTH- See Also:
-
SHOW_ALL_ASSOCIATION_SCOPES
public static final int SHOW_ALL_ASSOCIATION_SCOPES- See Also:
-
LOOSE_ASSOCIATION_SCOPES
public static final int LOOSE_ASSOCIATION_SCOPES- See Also:
-
STRICT_ASSOCIATION_SCOPES
public static final int STRICT_ASSOCIATION_SCOPES- See Also:
-
NULL_TOPIC
- See Also:
-
nullTopic
-
FILTER_DEFAULT
public static final int FILTER_DEFAULT- See Also:
-
FILTER_OUT
public static final int FILTER_OUT- See Also:
-
FILTER_IN
public static final int FILTER_IN- See Also:
-
-
Constructor Details
-
VizTopicMapConfigurationManager
Constructor initializes the configuration by loading a topic map from the URL given in the parameter.- Throws:
IOException
-
VizTopicMapConfigurationManager
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:
initin classVizConfigurationManager
-
getOverrideColorsTopic
-
getTopicTypeShapeTopic
-
getAssociationTypeColorAutogeneratedTopic
-
getTopicTypeColorAutogeneratedTopic
-
getAssociationTypeShapeTopic
-
getTopicTypeShapePaddingTopic
-
getTopicTypeIconTopic
-
getTopicTypeFontTopic
-
getTopicTypeColorTopic
-
getAssociationTypeColorTopic
-
getTypeVisibleTopic
-
getTopicTypeExcludedTopic
-
getAssociationTypeLineWeightTopic
-
getAssociationTypeFontTopic
-
getTTPriorityManager
-
getAssociationTypeColor
-
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
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
-
getTopicTypeShape
-
hasOccurrence
-
getDefaultFont
-
setTypeColor
-
setTypeColor
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
Sets the color of a given topic/association 'type' to the default value and updates 'view' accordingly. -
setTypeVisibility
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
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
Sets the given topic 'type' to be visible and updates 'view' accordingly. For defaultType, updates all types with no explicit setting. -
setAssociationTypeVisible
Sets the given association 'type' to be visible and updates 'view' accordingly. For defaultAssociationType, updates all types with no explicit setting. -
setTopicTypeShape
Sets the shape of the given topic 'type' and updates 'view' accordingly. For defaultType, updates all types with no explicit setting. -
setAssociationTypeShape
Sets the shape of the given association 'type' and updates 'view' accordingly. For defaultType, updates all types with no explicit setting. -
setFontToDefault
Sets the font of a given topic/association 'type' to the default value and updates 'view' accordingly. -
setTypeFont
Sets the font of the given topic/association 'type' and updates 'view' accordingly. For defaultType/defaultAssociationType, updates all types with no explicit setting. -
setAssociationTypeLineWeight
Sets the line weight of the given association 'type' and updates 'view' accordingly. For defaultAssociationType, updates all types with no explicit setting. -
setTopicTypeShapePadding
Sets the shape padding of the given topic 'type' and updates 'view' accordingly. For defaultType, updates all types with no explicit setting. -
setTypeIconFilename
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
Sets the given topic 'type' to be included and updates 'view' accordingly. For defaultType, updates all types with no explicit setting. -
setTypeExcluded
Sets the given topic 'type' to be excluded and updates 'view' accordingly. For defaultType, updates all types with no explicit setting. -
setTopicTypeShape
-
setAssociationTypeShape
-
setTypeLineWeight
-
setTopicTypeShapePadding
-
setTypeVisible
-
setTypeVisible
-
isAssociationTypeVisible
-
isTopicTypeVisible
-
lookupVisible
-
isVisible
-
isVisible
-
matchesFilter
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
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
-
lookupColor
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
INTERNAL: Finds the start topic in the given topic map, and returns it. -
getScopingTopic
INTERNAL: Finds the scoping topic in the given topic map, and returns it. -
getScopingTopicHolder
INTERNAL: Finds the scoping topic in the given topic map, and returns it. -
setStartTopic
Sets the start topic of the vizualization. We use the srclocator stored in an occurrence as not all topics have a subjind. -
setTopicReference
-
clearTopic
Clear the start topic if it was set. -
getTypeInstanceType
-
getTypeVisibility
-
getAssociationTypeShape
-
getAssociationTypeLineWeight
-
getTopicTypeShapePadding
-
getTypeIconFilename
-
getTypeIcon
-
getTypeFont
-
getAssociationTypeFont
-
setTypeFont
-
parseFont
-
setTypeIconFilename
-
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
-
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
-
setTypeExcluded
-
isTypeExcluded
-
setScopingTopic
-
clearStartTopic
public void clearStartTopic() -
getSourceLocator
-
getSubject
-
getSubjectIndicator
-
setInAssociationScopeFilter
-
isInAssociationScopeFilter
-
setAssociationScopeFilterStrictness
public void setAssociationScopeFilterStrictness(int strictness) -
getAssociationScopeFilterStrictness
public int getAssociationScopeFilterStrictness() -
getAssociationScopeFilter
- Returns:
- All topics that are used as scopes of associations and are used to filter associations in Vizigator.
-