|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.gui.graphdocument.ElementDefinitionWrapper
The class ElementDefinitionWrapper contains information and
methods that are used managing definitions and their conflicts during
import operations.
It contains lists of conflicting elements for geometries, styles, rules, layouts and images.
An instance of this class is used for the transfer of information in the GraphDocument persistence and is passed to the conflict dialog.
| Field Summary | |
RuleRegistry |
defaultRuleRegistry
defaultRuleRegistry: The default RuleRegistry
of the application which is used to check for conflicts with the
loaded rule definitions |
java.util.List |
elementConflicts
elementConflicts: A list containing the names of all
conflicting elements of type Element |
AttributeList |
elements
elements: All elements that of the loaded
definition file |
int |
elementsConflictResolving
elementsConflictResolving: The option used for resolving
conflicts of type: element |
AttributeList |
geometries
geometries: All geometries of the loaded definition file |
int |
geometryConflictResolving
geometryConflictResolving: The option used for resolving
conflicts of type: geometry |
java.util.List[] |
geometryConflicts
geometryConflicts: An array holding two lists containing
the names of all conflicting GeometryDescriptors or
GeometryDescriptorItems |
java.util.Map |
geomItemsRenameMap
geomItemsRenameMap: A map containing new names for all
conflicting elements of type GeometryDescriptorItem |
java.util.Map |
geomsRenameMap
geomsRenameMap: A map containing new names for all
conflicting elements of type GeometryDescriptor |
java.util.List |
imageConflicts
imageConflicts: A list containing the names of all
conflicting Rasters |
AttributeList |
images
images: All images of the loaded definition file |
java.util.Map |
imagesRenameMap
imagesRenameMap: A map containing new names for all
conflicting elements of type Raster |
boolean |
isImportToDocument
isImportToDocument: True if the definitions are imported
to a document and there are no application defaults to check/apply
against |
java.util.List |
layoutConflicts
layoutConflicts: A list containing the names of all
conflicting LayoutContexts |
AttributeSet |
layouts
layouts: All layouts of the loaded definition file |
java.util.Map |
layoutsRenameMap
layoutsRenameMap: A map containing new names for all
conflicting elements of type LayoutContext |
int |
ruleConflictResolving
ruleConflictResolving: The option used for resolving
conflicts of type: rule |
java.util.List |
ruleConflicts
ruleConflicts: A list containing the names of all
conflicting Rules |
RuleRegistry |
rules
rules: All rules of the loaded definition file |
java.util.Map |
rulesRenameMap
rulesRenameMap: A map containing new names for all
conflicting elements of type Rule |
int |
styleConflictResolving
styleConflictResolving: The option used for resolving
conflicts of type: style |
java.util.List[] |
styleConflicts
styleConflicts: An array holding two lists containing
the names of all conflicting StyleDescriptors or
StyleDescriptorItems |
java.util.Map |
styleItemsRenameMap
styleItemsRenameMap: A map containing new names for all
conflicting elements of type StyleDescriptorItem |
java.util.List[] |
styleNameConflicts
styleNameConflicts: An array holding two lists containing
the names of all conflicting StyleDescriptors or
StyleDescriptorItems |
AttributeList |
styles
styles: All styles of the loaded definition file |
java.util.Map |
stylesRenameMap
stylesRenameMap: A map containing new names for all
conflicting elements of type StyleDescriptor |
| Constructor Summary | |
ElementDefinitionWrapper(AttributeCollection layoutConfiguration)
Constructor |
|
| Method Summary | |
boolean |
areGeometriesDisposable()
This setting determines whether the geometries can be disposed or not |
boolean |
containsUnconflictingStyles()
Returns true, if the styles contain items that are not in the pool and so will be handled as unconflicting styles and applied in any case. |
void |
createDefaultRenameMaps(LayoutController lc)
Creates default rename maps for conflicting names in styles, geometries, layouts, images and rules. |
boolean |
elementConflict()
Returns true, if there is an element conflict |
boolean |
geometryConflict()
Returns true, if there is an geometry conflict |
java.util.Collection |
getGeometryConflicts()
Returns a collection of all geometry conflicts as a combination of GeometryDescriptorItems and GeometryDescriptors |
java.lang.String |
getNewGeometryNameDefault(java.util.Map map,
java.lang.String oldName)
Generates and returns a new default name for the given geometry name, that can be used in the conflict dialog or when the dialog is suppressed. |
java.lang.String |
getNewImageNameDefault(java.util.Map map,
java.lang.String oldName)
Generates and returns a new default name for the given image name, that can be used in the conflict dialog or when the dialog is suppressed. |
java.lang.String |
getNewLayoutContextNameDefault(java.util.Map map,
LayoutController lc,
java.lang.String oldName)
Generates and returns a new default name for the given layout context name, that can be used in the conflict dialog or when the dialog is suppressed. |
java.lang.String |
getNewRuleNameDefault(java.util.Map map,
java.lang.String oldName)
Generates and returns a new default name for the given rule name, that can be used in the conflict dialog or when the dialog is suppressed. |
java.lang.String |
getNewStyleNameDefault(java.util.Map map,
java.lang.String oldName)
Generates and returns a new default name for the given style name, that can be used in the conflict dialog or when the dialog is suppressed. |
java.util.Collection |
getStyleConflicts()
Returns a collection of all style conflicts as a combination of StyleDescriptorItems and StyleDescriptors |
boolean |
isContextNameValid(java.util.Map map,
java.lang.String name,
LayoutController layoutController)
Checks whether the given name is valid for a new layout context |
boolean |
isGeomNameValid(java.util.Map map,
java.lang.String name)
Checks whether the given name is valid for a new style |
boolean |
isImageNameValid(java.util.Map map,
java.lang.String name)
Checks whether the given name is valid for a new image |
boolean |
isRuleNameValid(java.util.Map map,
java.lang.String name)
Checks whether the given name is valid for a new style |
boolean |
isStyleNameValid(java.util.Map map,
java.lang.String name)
Checks whether the given name is valid for a new style |
boolean |
ruleConflict()
Returns true, if there is an rule conflict |
void |
setGeometriesDisposable(boolean areGeometriesDisposable)
This setting determines whether the geometries can be disposed or not |
boolean |
styleConflict()
Returns true, if there is an style conflict |
boolean |
styleNameConflict()
Returns true, if there is an style name conflict |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public AttributeList elements
elements: All elements that of the loaded
definition file
public AttributeList geometries
geometries: All geometries of the loaded definition file
public AttributeList styles
styles: All styles of the loaded definition file
public AttributeSet layouts
layouts: All layouts of the loaded definition file
public AttributeList images
images: All images of the loaded definition file
public RuleRegistry rules
rules: All rules of the loaded definition file
public RuleRegistry defaultRuleRegistry
defaultRuleRegistry: The default RuleRegistry
of the application which is used to check for conflicts with the
loaded rule definitions
public java.util.Map stylesRenameMap
stylesRenameMap: A map containing new names for all
conflicting elements of type StyleDescriptor
public java.util.Map styleItemsRenameMap
styleItemsRenameMap: A map containing new names for all
conflicting elements of type StyleDescriptorItem
public java.util.Map geomsRenameMap
geomsRenameMap: A map containing new names for all
conflicting elements of type GeometryDescriptor
public java.util.Map geomItemsRenameMap
geomItemsRenameMap: A map containing new names for all
conflicting elements of type GeometryDescriptorItem
public java.util.Map rulesRenameMap
rulesRenameMap: A map containing new names for all
conflicting elements of type Rule
public java.util.Map layoutsRenameMap
layoutsRenameMap: A map containing new names for all
conflicting elements of type LayoutContext
public java.util.Map imagesRenameMap
imagesRenameMap: A map containing new names for all
conflicting elements of type Raster
public java.util.List elementConflicts
elementConflicts: A list containing the names of all
conflicting elements of type Element
public java.util.List[] geometryConflicts
geometryConflicts: An array holding two lists containing
the names of all conflicting GeometryDescriptors or
GeometryDescriptorItems
public java.util.List[] styleConflicts
styleConflicts: An array holding two lists containing
the names of all conflicting StyleDescriptors or
StyleDescriptorItems
public java.util.List[] styleNameConflicts
styleNameConflicts: An array holding two lists containing
the names of all conflicting StyleDescriptors or
StyleDescriptorItems
public java.util.List ruleConflicts
ruleConflicts: A list containing the names of all
conflicting Rules
public java.util.List layoutConflicts
layoutConflicts: A list containing the names of all
conflicting LayoutContexts
public java.util.List imageConflicts
imageConflicts: A list containing the names of all
conflicting Rasters
public int elementsConflictResolving
elementsConflictResolving: The option used for resolving
conflicts of type: element
public int geometryConflictResolving
geometryConflictResolving: The option used for resolving
conflicts of type: geometry
public int styleConflictResolving
styleConflictResolving: The option used for resolving
conflicts of type: style
public int ruleConflictResolving
ruleConflictResolving: The option used for resolving
conflicts of type: rule
public boolean isImportToDocument
isImportToDocument: True if the definitions are imported
to a document and there are no application defaults to check/apply
against
| Constructor Detail |
public ElementDefinitionWrapper(AttributeCollection layoutConfiguration)
layoutConfiguration - The layout configuration represented as an
AttributeCollection, usually read from a
GraphDocument or definition xml file| Method Detail |
public boolean elementConflict()
public boolean geometryConflict()
public boolean styleConflict()
public boolean styleNameConflict()
public boolean ruleConflict()
public final java.lang.String getNewStyleNameDefault(java.util.Map map,
java.lang.String oldName)
map - The map containing all previously generated default
namesoldName - The old (conflicting) name of the item
public final java.lang.String getNewGeometryNameDefault(java.util.Map map,
java.lang.String oldName)
map - The map containing all previously generated default
namesoldName - The old (conflicting) name of the item
public final java.lang.String getNewRuleNameDefault(java.util.Map map,
java.lang.String oldName)
map - The map containing all previously generated default
namesoldName - The old (conflicting) name of the item
public final java.lang.String getNewLayoutContextNameDefault(java.util.Map map,
LayoutController lc,
java.lang.String oldName)
map - The map containing all previously generated default
nameslc - The layout controller to which the generated layout
context name should be addedoldName - The old (conflicting) name of the item
public final java.lang.String getNewImageNameDefault(java.util.Map map,
java.lang.String oldName)
map - The map containing all previously generated default
namesoldName - The old (conflicting) name of the item
public boolean isRuleNameValid(java.util.Map map,
java.lang.String name)
map - The map containing all previously generated default
namesname - The name to check
public boolean isImageNameValid(java.util.Map map,
java.lang.String name)
map - The map containing all previously generated default
namesname - The name to check
public final boolean isContextNameValid(java.util.Map map,
java.lang.String name,
LayoutController layoutController)
map - The map containing all previously generated default
namesname - The name to checklayoutController - The layout controller building the context
for the name
public boolean isStyleNameValid(java.util.Map map,
java.lang.String name)
map - The map containing all previously generated default
namesname - The name to check
public boolean isGeomNameValid(java.util.Map map,
java.lang.String name)
map - The map containing all previously generated default
namesname - The name to check
public java.util.Collection getStyleConflicts()
StyleDescriptorItems and StyleDescriptors
StyleDescriptorItems and
StyleDescriptorspublic java.util.Collection getGeometryConflicts()
GeometryDescriptorItems and GeometryDescriptors
GeometryDescriptorItems and
GeometryDescriptorspublic void createDefaultRenameMaps(LayoutController lc)
lc - The layout controller that is used to generate valid names
for layout contextspublic boolean containsUnconflictingStyles()
public boolean areGeometriesDisposable()
public void setGeometriesDisposable(boolean areGeometriesDisposable)
areGeometriesDisposable - true, if the geometries can be disposed
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||