com.tensegrity.gui.graphdocument.persistence
Interface GraphDocumentReaderConflictHandler


public interface GraphDocumentReaderConflictHandler

This interface defines the functionality used to check for and resolve conflicts in GraphDocuments concerning Style, Geometry, Layout, Rule and Image definitions.

Author:
BurkhardWick

Method Summary
 ElementDefinitionWrapper getElementDefinitionWrapper()
          Returns the ElementDefinitionWrapper instance to use for storing information about conflicts.
 int getGeometriesOption(boolean showConflict)
          Returns the option for resolving a styles conflict
 int getImagesOption(boolean showConflict)
          Returns the option for resolving a image conflict
 int getLayoutContextOption(boolean showConflict)
          Returns the option for resolving a layout context conflict
 int getRulesOption(boolean showConflict)
          Returns the option for resolving a styles conflict
 int getStyleNamesOption(boolean showConflict)
          Returns the option for resolving a style names conflict
 int getStylesOption(boolean showConflict)
          Returns the option for resolving a styles conflict
 boolean reassignLayoutContexts(ElementDefinitionUtil.RenameAttributable attributable)
          Reassigns missing layout contexts to existing ones.
 boolean reassignMissingFonts(ElementDefinitionUtil.RenameAttributable attributable)
          Reassigns missing fonts to existing ones.
 boolean reassignMissingRules(ElementDefinitionUtil.RenameAttributable attributable)
          Reassigns missing rules to existing ones.
 boolean resolveConflicts(LayoutController lc, boolean resolveLayoutConflict, boolean resolveStylesConflict, boolean resolveStyleNamesConflict, boolean resolveGeometryConflict, boolean resolveRulesConflict, boolean resolveImageConflict)
          Resolve conflicts and determine an apply option for each conflict type.
 void setElementDefinitionWrapper(ElementDefinitionWrapper edw)
          Sets the ElementDefinitionWrapper instance that is used to hold the information about the conflicts that occurred.
 boolean storeNewDefaults()
          Returns true if the currently selected apply options should be used as new defaults.
 boolean suppressFutureConflicts()
          Returns true if future conflicts of the current types should always use the default and should therefore skip an interactive selection process.
 

Method Detail

setElementDefinitionWrapper

public void setElementDefinitionWrapper(ElementDefinitionWrapper edw)
Sets the ElementDefinitionWrapper instance that is used to hold the information about the conflicts that occurred.

Parameters:
edw - The instance to use

getElementDefinitionWrapper

public ElementDefinitionWrapper getElementDefinitionWrapper()
Returns the ElementDefinitionWrapper instance to use for storing information about conflicts.

Returns:
the ElementDefinitionWrapper instance to use for storing information about conflicts.

resolveConflicts

public boolean resolveConflicts(LayoutController lc,
                                boolean resolveLayoutConflict,
                                boolean resolveStylesConflict,
                                boolean resolveStyleNamesConflict,
                                boolean resolveGeometryConflict,
                                boolean resolveRulesConflict,
                                boolean resolveImageConflict)
Resolve conflicts and determine an apply option for each conflict type. This is usually done by presenting a dialog to the user.

Parameters:
lc - The layout controller
resolveLayoutConflict - true, to resolve the layout conflicts
resolveStylesConflict - true, to resolve the styles conflicts
resolveStyleNamesConflict - true, to resolve the style name conflicts
resolveGeometryConflict - true, to resolve the geometry conflicts
resolveRulesConflict - true, to resolve the rules conflicts
resolveImageConflict - true, to resolve the image conflicts
Returns:
false, to cancel loading

storeNewDefaults

public boolean storeNewDefaults()
Returns true if the currently selected apply options should be used as new defaults.

Returns:
true if the currently selected apply options should be used as new defaults.

suppressFutureConflicts

public boolean suppressFutureConflicts()
Returns true if future conflicts of the current types should always use the default and should therefore skip an interactive selection process.

Returns:
true if future conflicts of the current types should always use the default and should therefore skip an interactive selection process.

reassignLayoutContexts

public boolean reassignLayoutContexts(ElementDefinitionUtil.RenameAttributable attributable)
Reassigns missing layout contexts to existing ones. The attributable returns a set of attributes where the name of the attribute is the name of the layout context to rename and the value is the new context to use. Use AttributableOnSet.getAttributesTree() and AttributableOnSet.setAttributesTree(AttributeSet) to retrieve and set the data.

Parameters:
attributable - The attributable containing the reassignment information
Returns:
False if loading should be canceled

reassignMissingRules

public boolean reassignMissingRules(ElementDefinitionUtil.RenameAttributable attributable)
Reassigns missing rules to existing ones. The attributable returns a set of attributes where the name of the attribute is the name of the rule to reassign and the value is the name of the rule to use instead. Use AttributableOnSet.getAttributesTree() and AttributableOnSet.setAttributesTree(AttributeSet) to retrieve and set the data.

Parameters:
attributable - The attributable containing the reassignment information
Returns:
False if loading should be canceled

reassignMissingFonts

public boolean reassignMissingFonts(ElementDefinitionUtil.RenameAttributable attributable)
Reassigns missing fonts to existing ones. The attributable returns a set of attributes where the name of the attribute is the name of the font to reassign and the value is the name of the font to use instead. Use AttributableOnSet.getAttributesTree() and AttributableOnSet.setAttributesTree(AttributeSet) to retrieve and set the data.

Parameters:
attributable - The attributable containing the reassignment information
Returns:
False if loading should be canceled

getRulesOption

public int getRulesOption(boolean showConflict)
Returns the option for resolving a styles conflict

Parameters:
showConflict - true if the option was changed from default e.g. by presenting a dialog to the user false to use the default from preferences
Returns:
the option for resolving a styles conflict

getGeometriesOption

public int getGeometriesOption(boolean showConflict)
Returns the option for resolving a styles conflict

Parameters:
showConflict - true if the option was changed from default e.g. by presenting a dialog to the user false to use the default from preferences
Returns:
the option for resolving a styles conflict

getImagesOption

public int getImagesOption(boolean showConflict)
Returns the option for resolving a image conflict

Parameters:
showConflict - true if the option was changed from default e.g. by presenting a dialog to the user false to use the default from preferences
Returns:
the option for resolving a image conflict

getStylesOption

public int getStylesOption(boolean showConflict)
Returns the option for resolving a styles conflict

Parameters:
showConflict - true if the option was changed from default e.g. by presenting a dialog to the user false to use the default from preferences
Returns:
the option for resolving a styles conflict

getStyleNamesOption

public int getStyleNamesOption(boolean showConflict)
Returns the option for resolving a style names conflict

Parameters:
showConflict - true if the option was changed from default e.g. by presenting a dialog to the user false to use the default from preferences
Returns:
the option for resolving a style names conflict

getLayoutContextOption

public int getLayoutContextOption(boolean showConflict)
Returns the option for resolving a layout context conflict

Parameters:
showConflict - true if the option was changed from default e.g. by presenting a dialog to the user false to use the default from preferences
Returns:
the option for resolving a layout context conflict


Copyright © 2005 Tensegrity Software GmbH. All Rights Reserved. Date of creation: 09.06.2006.