pl.edu.agh.cast.data.model.visual
Interface IVisualDataSet<T extends IVisualElement<? extends IPresentationElement<? extends IElement>>,M extends IPresentationDataSet<? extends IPresentationElement<? extends IElement>>>

Type Parameters:
T - type of visual element which can be in specific visual data set
M - type of wrapped presentation data set
All Superinterfaces:
IDataSet<T>, Identifiable, IDisposable, IPropertyChangeProvider, IPropertyContainer, IValidatable, Observer, Serializable
All Known Subinterfaces:
IVisualSchemaDataSet
All Known Implementing Classes:
VisualDataSet, VisualSchemaDataSet

public interface IVisualDataSet<T extends IVisualElement<? extends IPresentationElement<? extends IElement>>,M extends IPresentationDataSet<? extends IPresentationElement<? extends IElement>>>
extends IDataSet<T>, IPropertyChangeProvider

An interface which describes data set containing elements of visual model.

Visual model wraps presentation model and holds additional visual description of presentation elements IPresentationDataSet such as location, colour, icon, line style, etc. Visual elements (IVisualElement are associated with presentation elements (in one-to-one relation) and can be perceived as theirs decorators.

Visual models should be specialized for different types of diagrams, for instance time-line, schema diagrams, etc.

Author:
AGH CAST Team
See Also:
IVisualElement, IPresentationDataSet

Nested Class Summary
static class IVisualDataSet.Events
          Events for visual data set and it's elements.
 
Nested classes/interfaces inherited from interface pl.edu.agh.cast.data.model.IDataSet
IDataSet.Properties
 
Field Summary
static Collection<Type> ACCEPTED_TYPES
          Collection of element types accepted by this type of data set.
static Type TYPE
          The type of IPresentationDataSet.
 
Method Summary
 String getAllPropertiesMarkedAsLabel()
          Gets serialized map of properties marked as labels for types of elements in the data set.
 VisualDataSetDescriptor getDescriptor()
          Returns the descriptor of this data set.
 M getPresentationDataSet()
          Gets wrapped presentation data set.
 Collection<PresentationPropertyDescriptor> getPropertiesMarkedAsLabel(Type type)
          Gets collection of descriptors describing properties which should be included in label returned by IVisualElement.getVisualLabel().
 boolean isLayoutInitialized()
          Tells if a data set has already initialized by a layout.
 boolean isSuppressLocationChangeEvents()
          Returns suppress locations change events flag.
 void markLayoutInitialized()
          Marks that a layout has been just initialized.
 void markPropertyAsLabel(Type type, PresentationPropertyDescriptor descriptor, boolean flag)
           Marks given property as label for given type.
 void setAllPropertiesMarkedAsLabel(String value)
          Sets map of of properties marked as labels for types of elements in the data set.
 void setSuppressAllEvents(boolean flag)
          Sets suppress all events flag.
 void setSuppressLocationChangeEvents(boolean suppressLocationChangeEvents)
          Sets suppress location change events flag.
 
Methods inherited from interface pl.edu.agh.cast.data.model.IDataSet
addElement, addElements, addElements, addMetaPropertyManager, addMetaPropertyManagersForAcceptedTypes, getAcceptedTypes, getAssignableElements, getCreationDate, getElement, getElementCount, getElements, getElements, getElementTypes, getMetaPropertyManager, getMetaPropertyManagers, getName, getRegisteredTypes, removeElement, removeElement, removeElements, removeElements, setCreationDate, setElements, setName
 
Methods inherited from interface pl.edu.agh.cast.data.model.Identifiable
getId, getType
 
Methods inherited from interface pl.edu.agh.cast.data.model.property.IPropertyContainer
addProperty, getCustomProperties, getMetaPropertyManager, getPermanentProperties, getProperties, getProperty, getTransientProperties, matches, removeProperty, setProperty
 
Methods inherited from interface java.util.Observer
update
 
Methods inherited from interface pl.edu.agh.cast.common.IValidatable
isValid
 
Methods inherited from interface pl.edu.agh.cast.common.IDisposable
dispose
 
Methods inherited from interface pl.edu.agh.cast.data.model.property.IPropertyChangeProvider
addPropertyChangeListener, removePropertyChangeListener
 

Field Detail

TYPE

static final Type TYPE
The type of IPresentationDataSet.


ACCEPTED_TYPES

static final Collection<Type> ACCEPTED_TYPES
Collection of element types accepted by this type of data set.

Method Detail

getDescriptor

VisualDataSetDescriptor getDescriptor()
Returns the descriptor of this data set.

Specified by:
getDescriptor in interface IDataSet<T extends IVisualElement<? extends IPresentationElement<? extends IElement>>>
Returns:
the descriptor of this data set
See Also:
IDataSet.getDescriptor()

getPresentationDataSet

@PropertyGetter(name="PRESENTATION_DATA_SET",
                type=REFERENCE,
                matchable=true,
                required=true)
M getPresentationDataSet()
Gets wrapped presentation data set.

Returns:
wrapped data set

getAllPropertiesMarkedAsLabel

String getAllPropertiesMarkedAsLabel()
Gets serialized map of properties marked as labels for types of elements in the data set.

Note: This method is introduced only for persistence layer and should not be used elsewhere.

Returns:
serialized map

setAllPropertiesMarkedAsLabel

void setAllPropertiesMarkedAsLabel(String value)
Sets map of of properties marked as labels for types of elements in the data set. The string value is deserialized to map.

Note: This method is introduced only for persistence layer and should not be used elsewhere.

Parameters:
value - serialized map

isLayoutInitialized

boolean isLayoutInitialized()
Tells if a data set has already initialized by a layout.

Returns:
true if data set has a layout, false otherwise

markLayoutInitialized

void markLayoutInitialized()
Marks that a layout has been just initialized.


isSuppressLocationChangeEvents

boolean isSuppressLocationChangeEvents()
Returns suppress locations change events flag. If true, that any location change won't generate property change event.

Returns:
see description

setSuppressLocationChangeEvents

void setSuppressLocationChangeEvents(boolean suppressLocationChangeEvents)
Sets suppress location change events flag. If set to true, any location change won't generate property change event.

Parameters:
suppressLocationChangeEvents - the flag

setSuppressAllEvents

void setSuppressAllEvents(boolean flag)
Sets suppress all events flag. If flag set to true all events will be ignored.

Parameters:
flag - suppress all events flag

getPropertiesMarkedAsLabel

Collection<PresentationPropertyDescriptor> getPropertiesMarkedAsLabel(Type type)
Gets collection of descriptors describing properties which should be included in label returned by IVisualElement.getVisualLabel(). This method can return null, therefore the visual element is responsible for providing default property to label.

Parameters:
type - sub-type of ACCEPTED_TYPES for which properties should be returned
Returns:
collection of properties descriptor

markPropertyAsLabel

void markPropertyAsLabel(Type type,
                         PresentationPropertyDescriptor descriptor,
                         boolean flag)

Marks given property as label for given type. The type must be a sub-type of ACCEPTED_TYPES.

Note: This method does not verify if the given property name is correct.

Parameters:
type - type of element for which given property is marked as label
descriptor - descriptor which describes property to be marked as label
flag - true if property will be treated as label, false otherwise


Copyright © 2007-2009 IISG AGH-UST Krakow, Poland. All Rights Reserved.