pl.edu.agh.cast.data.model.presentation
Interface IPresentationElement<T extends IElement>

Type Parameters:
T - type of original (presented) elements
All Superinterfaces:
Identifiable, IDisposable, IElement, IPropertyChangeProvider, IPropertyContainer, IReplicable, IValidatable, Observer, Serializable
All Known Subinterfaces:
ISchemaConnection, ISchemaElement<T>, ISchemaNode
All Known Implementing Classes:
PresentationElement, SchemaConnection, SchemaNode

public interface IPresentationElement<T extends IElement>
extends IElement, IPropertyChangeProvider

The interface of elements of the abstract presentation model.

Author:
AGH CAST Team
See Also:
IPresentationDataSet

Nested Class Summary
static class IPresentationElement.Properties
          Enumeration of property name constants.
static class IPresentationElement.PropertyCategory
          Constants which identify presentation element's properties.
 
Field Summary
static String ATTRIBUTE_CHANGE_EVENT
          Id of an event informing of attribute value changes in presentation model elements.
static Type TYPE
          The presentation element type.
 
Method Summary
 Type getDerivedType()
          The derived type of the element is based on the type of the element(s) from the domain model wrapped by this presentation element.
 String getLabel()
          Label getter.
 List<? extends T> getOriginalElements()
          Returns the original elements which are presented by this presentation element.
<V extends IVisualElement<? extends IPresentationElement<T>>>
V
getVisualElement()
          Returns the visual element associated with this presentation element.
 boolean hasAssociatedVisualElement()
          Checks if any visual element is associated with this presentation element.
 void setDerivedType(Type type)
          The derived type setter may be invoked only if there is no domain model element, given presentation element is based on (i.e.
 void setLabel(String label)
          Label setter.
 void setOriginalElements(List<? extends T> elements)
          Sets the original elements which are presented by this presentation elements.
 void setSuppressAllEvents(boolean flag)
          Sets suppress all events flag.
 void setVisualElement(IVisualElement visualElement)
          Sets the visual element associated with this presentation element.
 
Methods inherited from interface pl.edu.agh.cast.data.model.IElement
getDataSet
 
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.common.IReplicable
replicate, replicateTo
 
Methods inherited from interface pl.edu.agh.cast.data.model.property.IPropertyChangeProvider
addPropertyChangeListener, removePropertyChangeListener
 

Field Detail

TYPE

static final Type TYPE
The presentation element type.


ATTRIBUTE_CHANGE_EVENT

static final String ATTRIBUTE_CHANGE_EVENT
Id of an event informing of attribute value changes in presentation model elements.

See Also:
Constant Field Values
Method Detail

getDerivedType

@PropertyGetter(name="DERIVED_TYPE",
                type=TYPE,
                matchable=false)
Type getDerivedType()
The derived type of the element is based on the type of the element(s) from the domain model wrapped by this presentation element.

Returns:
The derived type of the element

setDerivedType

void setDerivedType(Type type)
The derived type setter may be invoked only if there is no domain model element, given presentation element is based on (i.e. the presentation element was created manually).

Parameters:
type - The type to set.

getLabel

@PropertyGetter(name="LABEL",
                type=TEXT,
                matchable=true)
String getLabel()
Label getter.

Returns:
The label of the element.

setLabel

@PropertySetter(name="LABEL")
void setLabel(String label)
Label setter.

Parameters:
label - The label to set.

getOriginalElements

@PropertyGetter(name="ORIGINAL_ELEMENTS",
                type=REFERENCE_LIST,
                matchable=false)
List<? extends T> getOriginalElements()
Returns the original elements which are presented by this presentation element.

Returns:
a list of original elements

setOriginalElements

@PropertySetter(name="ORIGINAL_ELEMENTS")
void setOriginalElements(List<? extends T> elements)
Sets the original elements which are presented by this presentation elements.

Parameters:
elements - a list of original elements presented by this presentation element

getVisualElement

<V extends IVisualElement<? extends IPresentationElement<T>>> V getVisualElement()
Returns the visual element associated with this presentation element.

Type Parameters:
V - the type of expected visual element
Returns:
the associated visual element or null
See Also:
IVisualElement

setVisualElement

void setVisualElement(IVisualElement visualElement)
Sets the visual element associated with this presentation element.

Parameters:
visualElement - the associated visual element (null value is allowed)
See Also:
IVisualElement

hasAssociatedVisualElement

boolean hasAssociatedVisualElement()
Checks if any visual element is associated with this presentation element.

Returns:
true if an associated visual element is present

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


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