MetaDone
metadone.client.grasyla2.base.GrasylaEngineForAttribute< T > Class Reference
Inheritance diagram for metadone.client.grasyla2.base.GrasylaEngineForAttribute< T >:
Collaboration diagram for metadone.client.grasyla2.base.GrasylaEngineForAttribute< T >:

List of all members.

Classes

class  AttributeBuilder< T >

Public Member Functions

 GrasylaEngineForAttribute (Class< T > supportedType, GrasylaContext context, ConcreteObject expression, Engine parent) throws BadPreCondition
String getAttributeType ()

Static Public Member Functions

static Set< String > getAttributeTypes ()

Protected Member Functions

final boolean isNativeAttribute (String name)
void initActionHander ()
Component<?> updateToConcreteObject (ConcreteObjectGroupChange event)
abstract AttributeBuilder< T > getBuilder (String type)
abstract AttributeBuilder< T > getDefaultBuilder (String type)
Component<?extends T > evaluateComponent (BootstrapGrasyla grasyla) throws BadPreCondition
void notifyChildChanged (Engine child, ChildComponent comp)
final void rebuildComponent () throws BadPreCondition

Private Member Functions

Component<?extends T > evaluateComponentBuild (GrasylaContext context) throws BadPreCondition

Private Attributes

String type
AttributeBuilder< T > builder

Detailed Description

An abstract engine to produce a lot of similar values.

This can be often used for simple (often immutable) types. Such types are built from some properties, don't depend on the current context and don't change often. An example of usage are colors, fonts, etc.

Events are not handled by this engine and the changes to the context are simply accepted.

Source

If this is built from a property or from a component, its value or name respectively is used as the type.

Attributes
  • type: overwrites the type from the source
Author:
kma
Parameters:
<T>The type of the attributes

Constructor & Destructor Documentation

metadone.client.grasyla2.base.GrasylaEngineForAttribute< T >.GrasylaEngineForAttribute ( Class< T >  supportedType,
GrasylaContext  context,
ConcreteObject  expression,
Engine  parent 
) throws BadPreCondition

Member Function Documentation

Component<? extends T> metadone.client.grasyla2.base.GrasylaEngineForAttribute< T >.evaluateComponent ( BootstrapGrasyla  grasyla) throws BadPreCondition [protected]
Component<? extends T> metadone.client.grasyla2.base.GrasylaEngineForAttribute< T >.evaluateComponentBuild ( GrasylaContext  context) throws BadPreCondition [private]
String metadone.client.grasyla2.base.GrasylaEngineForAttribute< T >.getAttributeType ( )

Gets the type attribute.

Returns:
The type or null
static Set<String> metadone.client.grasyla2.base.GrasylaEngineForAttribute< T >.getAttributeTypes ( ) [static]

Returns the set of supported attribute types.

Returns:
The unmodifiable set of types
abstract AttributeBuilder<T> metadone.client.grasyla2.base.GrasylaEngineForAttribute< T >.getBuilder ( String  type) [protected, pure virtual]

Gets a builder for a given type.

Parameters:
typeThe type or null
Returns:
The builder or null
abstract AttributeBuilder<T> metadone.client.grasyla2.base.GrasylaEngineForAttribute< T >.getDefaultBuilder ( String  type) [protected, pure virtual]

Gets a default builder for a given type.

Parameters:
typeThe type or null
Returns:
The builder
void metadone.client.grasyla2.base.GrasylaEngineForAttribute< T >.initActionHander ( ) [protected]

Registers the attribute handlers for events (actions).

Reimplemented from metadone.client.grasyla2.GrasylaEngine.

final boolean metadone.client.grasyla2.base.GrasylaEngineForAttribute< T >.isNativeAttribute ( String  name) [protected]

Indicates whether an attribute is handled when building the component.

In other words, a native attribute should not be handled by an attribute handler.

Parameters:
nameThe name of the attribute
Returns:
true if name is a native attribute

Reimplemented from metadone.client.grasyla2.GrasylaEngine.

void metadone.client.grasyla2.base.GrasylaEngineForAttribute< T >.notifyChildChanged ( Engine  child,
ChildComponent  comp 
) [protected]
final void metadone.client.grasyla2.base.GrasylaEngineForAttribute< T >.rebuildComponent ( ) throws BadPreCondition [protected]

Rebuilds the component.

This is nearly the same as refresh, but the children are kept; only the current component is rebuilt.

Exceptions:
BadPreCondition
See also:
refresh()
Component<?> metadone.client.grasyla2.base.GrasylaEngineForAttribute< T >.updateToConcreteObject ( ConcreteObjectGroupChange  event) [protected]

Called when the object group has been changed.

This method MUST be overwritten completely when setCanUpdateObject(boolean) is set to true.

Parameters:
eventThe event
Returns:
The new component

Reimplemented from metadone.client.grasyla2.GrasylaEngine.


Member Data Documentation

AttributeBuilder<T> metadone.client.grasyla2.base.GrasylaEngineForAttribute< T >.builder [private]
String metadone.client.grasyla2.base.GrasylaEngineForAttribute< T >.type [private]

The documentation for this class was generated from the following file:
 All Classes Namespaces Files Functions Variables Enumerations