MetaDone
|
Classes | |
class | AttributeHandler< T > |
class | ChildComponent |
class | ConcreteObjectChangeHandler |
class | HasType |
class | SubscriberRegistration< T > |
Public Types | |
enum | GrasylaEngineState { DISPOSED, BUILDING, DISPOSING, READY, ACTIVE } |
Public Member Functions | |
GrasylaEngine (GrasylaContext context, ConcreteObject expression, Engine parent) throws BadPreCondition | |
final boolean | isAdapted () |
GrasylaEngineState | getState () |
Set< Subscriber<?super Component<?> > > | getComponentChangeSubscribers () |
GrasylaContext | getContext () |
Engine | getParent () |
boolean | isClassSupported (Class<?> clComp) |
final ConcreteObject | getExpression () |
List<?extends GrasylaEngine > | getChildren () |
Iterable<?extends GrasylaEngine > | getChildrenExpressions () |
final void | dispose () |
final< C > Component<?extends C > | buildComponent (Class< C > clComp, boolean active) |
void | refresh () |
boolean | isActive () |
void | unregisterSubscriber (Subscriber<?> subscriber) |
final void | registerAttributeHandler (AttributeHandler<?> handler) |
final< T > Component<?extends T > | buildChild (GrasylaContext context, Class< T > clComp, ConcreteObject expr, Object attr) throws BadPreCondition |
final void | buildChildrenExpressions (GrasylaContext context, Class<?> clComp) throws BadPreCondition |
void | trigger (EngineEvent event) |
final void | notifyChildChanged (Engine child) |
Iterator< ConcreteObject > | getContainedExpressions () throws BadPreCondition |
Iterator< Pair< String, ConcreteObject > > | getContainedAttributes () throws BadPreCondition |
Iterator< ConcreteObject > | getAttributes (final String name) throws BadPreCondition |
Iterator< ConcreteObject > | getContainedVariables () throws BadPreCondition |
void | debugEngineTreeGraphViz (Appendable out, boolean recursive, int verbose) throws IOException |
Protected Types | |
enum | FindIndex { NORMAL, NO_ATTR, COMPSIZE, COMPSIZE_NEXT } |
Protected Member Functions | |
void | initActionHander () |
BootstrapGrasyla | getGrasyla () |
MetadoneEvents | getEventManager () |
GrasylaContext | updateContext (final GrasylaContext context) throws BadPreCondition |
final void | removeChild (Engine e) |
final ChildComponent | removeChildWithoutDispose (Engine e) |
final void | clearChildren () |
final void | clearChildrenExpressions () |
ChildComponent | getChildComponent (GrasylaEngine engine) |
GrasylaEngine | getChildEngine (Component<?> comp) |
void | finalize () throws Throwable |
void | disposeInternal () |
void | createAttributes () throws BadPreCondition |
boolean | isNativeAttribute (String name) |
abstract< C > Component <?extends C > | buildNewComponent (Class< C > clComp) throws BadPreCondition |
void | activate () |
boolean | canActivateChild (GrasylaEngine ch) |
void | deactivate () |
void | registerAttributeHandler (AttributeHandler<?> handler, boolean overwrite) |
AttributeHandler<?> | removeAttributeHandler (String name) |
final void | building (boolean go) |
void | building_hook (boolean go) |
final boolean | isBuilding () |
void | updateComponent (Component<?> component) |
int | findIndex (Engine child, FindIndex opt) |
void | notifyChildChanged (Engine child, ChildComponent comp) |
void | setCanUpdateObject (boolean b) |
Component<?> | updateToConcreteObject (ConcreteObjectGroupChange event) |
void | debugEngineTreeGraphViz_nodeContents (Appendable out, int verbose) throws IOException |
Static Protected Member Functions | |
static String | graphviz_escape (String s) |
Static Protected Attributes | |
static final Logger | logger = Logger.getLogger(GrasylaEngine.class) |
Package Functions | |
protected< T > Component <?extends T > | addChild (GrasylaEngine e, Class< T > clComp, Object attr) |
public< C > Component<?extends C > | getComponent (Class< C > clComp) |
private< T > void | createAttribute (AttributeHandler< T > handler, ConcreteObject expr) throws BadPreCondition |
public< T > void | registerSubscriber (boolean activation, boolean persist, EventTower<?super T > manager, Class< T > cl, MapFct<?super T, Boolean > predicate, Subscriber<?super T > subscriber) |
protected< C > Component <?extends C > | getChildComponent (Class< C > clComp, boolean active, GrasylaEngine engine) |
Private Member Functions | |
Iterator< ConcreteObject > | getContained () throws BadPreCondition |
Private Attributes | |
final GrasylaContext | context |
final ConcreteObject | expression |
Component<?> | component |
GrasylaEngineState | state = GrasylaEngineState.DISPOSED |
int | building |
final Set< Subscriber<?super Component<?> > > | componentChangeSubscribers = new HashSet<Subscriber<? super Component<?>>>() |
final Engine | parent |
final List< GrasylaEngine > | children = new ArrayList<GrasylaEngine>() |
final transient List < GrasylaEngine > | children_unmodif = Collections.unmodifiableList(children) |
final Map< GrasylaEngine, ChildComponent > | childrenComponents = new HashMap<GrasylaEngine, ChildComponent>() |
final Set < SubscriberRegistration<?> > | subscribers = new HashSet<SubscriberRegistration<?>>() |
final Map< String, AttributeHandler<?> > | attributes = new HashMap<String, AttributeHandler<?>>() |
The base for all grasyla engines.
A Grasyla engine is responsible for producing and managing a component based on the expression and the context.
An engine can be in various states. It may hold created component. It can be active: meaning that observers are registered for repository events which will trigger updates to the held component. The engine has also a way to indicate whether a build is in progress using isBuilding(). Also the state of the engine is indicated using getState().
The engine manages automatically its children. It means that children components can be easily accessed or created. The state of child engines is also managed: if this engine is disposed, its children are also disposed. The same happens for the activation of child engines. Also, this behavior can be overwritten by a subclass.
Attributes are so common, that AttributeHandler can be used to keep track of the build attribute components. Moreover, the engine manages subscriptions to events which can be subscribed or unsubscribed when a component is built or when the engine's activation state changes.
enum metadone::client::grasyla2::GrasylaEngine::FindIndex [protected] |
metadone.client.grasyla2.GrasylaEngine.GrasylaEngine | ( | GrasylaContext | context, |
ConcreteObject | expression, | ||
Engine | parent | ||
) | throws BadPreCondition |
Initializes this grasyla engine.
context | The context |
expression | The expression |
parent | The parent engine or null |
BadPreCondition |
References metadone.client.grasyla2.GrasylaEngine.componentChangeSubscribers, metadone.client.grasyla2.GrasylaEngine.context, metadone.client.grasyla2.GrasylaEngine.expression, metadone.client.grasyla2.GrasylaEngine.getGrasyla(), metadone.client.grasyla2.GrasylaEngine.getParent(), metadone.metabusiness.ConcreteObject.hasType(), metadone.client.grasyla2.GrasylaEngine.initActionHander(), metadone.client.grasyla2.GrasylaEngine.logger, metadone.client.display.Engine.notifyChildChanged(), metadone.client.grasyla2.GrasylaEngine.parent, metadone.client.grasyla2.GrasylaEngine.trigger(), and metadone.client.grasyla2.GrasylaEngine.updateContext().
void metadone.client.grasyla2.GrasylaEngine.activate | ( | ) | [protected] |
Activates this engine.
Reimplemented in metadone.client.grasyla2.ref.RefObjectEngine, metadone.client.grasyla2.ref.RefRoleEngine, metadone.client.grasyla2.ref.RefSpecEngine, and metadone.client.grasyla2.ref.SideEngine.
References metadone.client.grasyla2.GrasylaContext.activate(), metadone.client.grasyla2.GrasylaEngine.canActivateChild(), metadone.client.grasyla2.GrasylaEngine.getChildren(), metadone.client.grasyla2.GrasylaEngine.getContext(), metadone.client.grasyla2.GrasylaEngine.logger, metadone.client.grasyla2.GrasylaEngine.state, and metadone.client.grasyla2.GrasylaEngine.subscribers.
Referenced by metadone.client.grasyla2.GrasylaEngine.buildComponent(), metadone.client.grasyla2.generic.GuardEngine.buildNewTrueComponent(), and metadone.client.grasyla2.GrasylaEngine.refresh().
protected<T> Component<? extends T> metadone.client.grasyla2.GrasylaEngine.addChild | ( | GrasylaEngine | e, |
Class< T > | clComp, | ||
Object | attr | ||
) | [package] |
Adds a child to this engine.
The parent of the given engine must be this object.
e | The engine to add |
clComp | The component class to build or null |
attr | A string indicating the name of the attribute, an integer indicating the position where to insert the child, a pair (string, integer), otherwise null |
null
if clComp was null
References metadone.client.grasyla2.GrasylaEngine.canActivateChild(), metadone.client.grasyla2.GrasylaEngine.children, metadone.client.grasyla2.GrasylaEngine.childrenComponents, metadone.client.grasyla2.GrasylaEngine.getChildComponent(), metadone.client.grasyla2.GrasylaEngine.getParent(), and metadone.client.grasyla2.GrasylaEngine.isActive().
Referenced by metadone.client.grasyla2.GrasylaEngine.buildChild().
final<T> Component<? extends T> metadone.client.grasyla2.GrasylaEngine.buildChild | ( | GrasylaContext | context, |
Class< T > | clComp, | ||
ConcreteObject | expr, | ||
Object | attr | ||
) | throws BadPreCondition |
Builds a child component.
<T> | The type |
context | The context for the child |
clComp | The class |
expr | The expression for the child or null to read from the context |
attr | The attribute (may be null ) |
BadPreCondition |
References metadone.client.grasyla2.GrasylaEngine.addChild(), metadone.client.grasyla2.GrasylaEngine.context, metadone.client.grasyla2.GrasylaEngineFactory.createEngine(), metadone.client.grasyla2.GrasylaContext.getEquation(), metadone.client.grasyla2.GrasylaContext.getFactory(), and metadone.metabusiness.syntax.grasyla.GrasylaEquation.getRHS().
Referenced by metadone.client.grasyla2.GrasylaEngine.buildChildrenExpressions(), metadone.client.grasyla2.ref.SideEngine.buildNewComponent(), metadone.client.grasyla2.ref.MetaEngine.buildNewComponent(), metadone.client.grasyla2.GrasylaInterpreter.buildNewComponent(), metadone.client.grasyla2.generic.TailEngine.buildNewComponent(), metadone.client.grasyla2.generic.ListEngine.buildNewComponent(), metadone.client.grasyla2.generic.IfEngine.buildNewComponent(), metadone.client.grasyla2.generic.HeadEngine.buildNewComponent(), metadone.client.grasyla2.generic.GuardEngine.buildNewComponent(), metadone.client.grasyla2.generic.GroupEngine.buildNewComponent(), metadone.client.grasyla2.generic.ListEngine.buildSeparator(), metadone.client.grasyla2.GrasylaEngine.createAttribute(), metadone.client.grasyla2.generic.IfEngine.evaluate(), metadone.client.grasyla2.generic.IfEngine.evaluateSimple(), metadone.client.grasyla2.generic.ModelEngine.updateContext(), and metadone.client.grasyla2.generic.ListEngine.updateToConcreteObject().
final void metadone.client.grasyla2.GrasylaEngine.buildChildrenExpressions | ( | GrasylaContext | context, |
Class<?> | clComp | ||
) | throws BadPreCondition |
Builds all children components.
context | The context |
clComp | The component class |
BadPreCondition |
References metadone.client.grasyla2.GrasylaEngine.buildChild(), metadone.client.grasyla2.GrasylaEngine.context, and metadone.client.grasyla2.GrasylaEngine.getContainedExpressions().
final<C> Component<? extends C> metadone.client.grasyla2.GrasylaEngine.buildComponent | ( | Class< C > | clComp, |
boolean | active | ||
) |
Builds a component.
The component is not managed by this class.
clComp | The class denoting the component type to build (usually Widget.class, JComponent.class, etc...) |
active | Whether to activate the engine when building |
Implements metadone.client.display.Engine.
References metadone.client.grasyla2.GrasylaEngine.activate(), metadone.client.grasyla2.GrasylaEngine.attributes, metadone.client.grasyla2.GrasylaEngineFactory.buildFor(), metadone.client.grasyla2.GrasylaEngine.building, metadone.client.grasyla2.GrasylaEngine.buildNewComponent(), metadone.client.grasyla2.GrasylaEngine.createAttributes(), metadone.client.grasyla2.GrasylaEngine.deactivate(), metadone.client.grasyla2.GrasylaEngine.getComponent(), metadone.client.grasyla2.GrasylaEngine.getContext(), metadone.client.grasyla2.GrasylaContext.getFactory(), metadone.client.grasyla2.GrasylaEngine.isActive(), metadone.client.grasyla2.GrasylaEngine.logger, metadone.client.grasyla2.GrasylaEngine.state, metadone.client.grasyla2.GrasylaEngine.subscribers, and metadone.client.grasyla2.GrasylaEngine.updateComponent().
Referenced by metadone.client.grasyla2.actions.GAction.execute(), and metadone.client.grasyla2.GrasylaEngine.refresh().
final void metadone.client.grasyla2.GrasylaEngine.building | ( | boolean | go | ) | [protected] |
Used to control the building property.
go | Whether to begin or to end building |
References metadone.client.grasyla2.GrasylaEngine.building, and metadone.client.grasyla2.GrasylaEngine.building_hook().
void metadone.client.grasyla2.GrasylaEngine.building_hook | ( | boolean | go | ) | [protected] |
Called when building of the components is started or stopped.
go | true indicates that the process is started, otherwise it is false |
Reimplemented in metadone.client.grasyla2.visuallibrary.GraphEngine.
Referenced by metadone.client.grasyla2.GrasylaEngine.building().
abstract <C> Component<? extends C> metadone.client.grasyla2.GrasylaEngine.buildNewComponent | ( | Class< C > | clComp | ) | throws BadPreCondition [protected, pure virtual] |
Builds a new component.
<C> | The type |
clComp | The class |
BadPreCondition |
Implemented in metadone.client.grasyla2.base.GrasylaEngineTyped< T >, metadone.client.grasyla2.generic.GroupEngine, metadone.client.grasyla2.generic.GuardEngine, metadone.client.grasyla2.generic.HeadEngine, metadone.client.grasyla2.generic.IfEngine, metadone.client.grasyla2.generic.ListEngine, metadone.client.grasyla2.generic.NoneEngine, metadone.client.grasyla2.generic.TailEngine, metadone.client.grasyla2.GrasylaInterpreter, metadone.client.grasyla2.ref.MetaEngine, metadone.client.grasyla2.ref.RefObjectEngine, metadone.client.grasyla2.ref.RefRoleEngine, metadone.client.grasyla2.ref.RefSpecEngine, metadone.client.grasyla2.ref.SideEngine, and metadone.client.grasyla2.visuallibrary.GraphEngine.
Referenced by metadone.client.grasyla2.GrasylaEngine.buildComponent().
boolean metadone.client.grasyla2.GrasylaEngine.canActivateChild | ( | GrasylaEngine | ch | ) | [protected] |
Tests whether a child can be activated.
ch | The child to test |
true
if the child can be activated Referenced by metadone.client.grasyla2.GrasylaEngine.activate(), and metadone.client.grasyla2.GrasylaEngine.addChild().
final void metadone.client.grasyla2.GrasylaEngine.clearChildren | ( | ) | [protected] |
Removes all the children.
References metadone.client.grasyla2.GrasylaEngine.getChildren(), and metadone.client.grasyla2.GrasylaEngine.removeChild().
Referenced by metadone.client.grasyla2.GrasylaEngine.dispose(), metadone.client.grasyla2.generic.GuardEngine.notifyChildChanged(), and metadone.client.grasyla2.ref.RefEngine.updateComponent().
final void metadone.client.grasyla2.GrasylaEngine.clearChildrenExpressions | ( | ) | [protected] |
Removes all the children that are not attributes.
References metadone.client.grasyla2.GrasylaEngine.getChildComponent(), metadone.client.grasyla2.GrasylaEngine.getChildren(), metadone.client.grasyla2.GrasylaEngine.ChildComponent.isAttribute(), and metadone.client.grasyla2.GrasylaEngine.removeChild().
Referenced by metadone.client.grasyla2.ref.SideEngine.activate(), metadone.client.grasyla2.generic.IfEngine.evaluate(), and metadone.client.grasyla2.generic.GuardEngine.notifyChildChanged().
private<T> void metadone.client.grasyla2.GrasylaEngine.createAttribute | ( | AttributeHandler< T > | handler, |
ConcreteObject | expr | ||
) | throws BadPreCondition [package] |
void metadone.client.grasyla2.GrasylaEngine.createAttributes | ( | ) | throws BadPreCondition [protected] |
Creates the attributes for this engine.
BadPreCondition |
References metadone.client.grasyla2.GrasylaEngine.attributes, metadone.client.grasyla2.GrasylaEngine.createAttribute(), metadone.client.grasyla2.GrasylaEngine.getContainedAttributes(), metadone.client.grasyla2.GrasylaEngine.isNativeAttribute(), and metadone.client.grasyla2.GrasylaEngine.logger.
Referenced by metadone.client.grasyla2.GrasylaEngine.buildComponent().
void metadone.client.grasyla2.GrasylaEngine.deactivate | ( | ) | [protected] |
Deactivates this engine.
References metadone.client.grasyla2.GrasylaContext.deactivate(), metadone.client.grasyla2.GrasylaEngine.getChildren(), metadone.client.grasyla2.GrasylaEngine.getContext(), metadone.client.grasyla2.GrasylaEngine.state, and metadone.client.grasyla2.GrasylaEngine.subscribers.
Referenced by metadone.client.grasyla2.ref.SideEngine.activate(), metadone.client.grasyla2.GrasylaEngine.buildComponent(), metadone.client.grasyla2.GrasylaEngine.dispose(), and metadone.client.grasyla2.GrasylaEngine.refresh().
void metadone.client.grasyla2.GrasylaEngine.debugEngineTreeGraphViz | ( | Appendable | out, |
boolean | recursive, | ||
int | verbose | ||
) | throws IOException |
Prints the children of this engine.
The output is valid for GraphViz. It consists of a node representing this engine and optional edges to the children nodes.
out | The output |
rescursive | Indicates whether the call is recursive |
verbose | The verbose level |
Implements metadone.client.display.Engine.
References metadone.client.grasyla2.GrasylaEngine.debugEngineTreeGraphViz_nodeContents(), metadone.client.grasyla2.GrasylaEngine.ChildComponent.getAttribute(), metadone.client.grasyla2.GrasylaEngine.getChildComponent(), metadone.client.grasyla2.GrasylaEngine.getChildren(), metadone.client.grasyla2.GrasylaEngine.graphviz_escape(), and metadone.client.grasyla2.GrasylaEngine.ChildComponent.isAttribute().
void metadone.client.grasyla2.GrasylaEngine.debugEngineTreeGraphViz_nodeContents | ( | Appendable | out, |
int | verbose | ||
) | throws IOException [protected] |
Prints the contents of a graphviz node for debugging.
The verbosity levels:
out | The output |
verbose | The verbosity level |
IOException | when there was an error while appending |
References metadone.client.grasyla2.GrasylaEngine.component, metadone.client.grasyla2.GrasylaEngine.getComponent(), metadone.client.grasyla2.GrasylaEngine.getContext(), metadone.client.grasyla2.GrasylaContext.getEquation(), metadone.client.grasyla2.GrasylaEngine.getParent(), metadone.client.grasyla2.GrasylaEngine.getState(), metadone.client.grasyla2.GrasylaEngine.graphviz_escape(), and metadone.metabusiness.syntax.grasyla.GrasylaEquation.toString().
Referenced by metadone.client.grasyla2.GrasylaEngine.debugEngineTreeGraphViz().
final void metadone.client.grasyla2.GrasylaEngine.dispose | ( | ) |
Disposes this engine.
Implements metadone.client.display.Engine.
References metadone.client.grasyla2.GrasylaEngine.building, metadone.client.grasyla2.GrasylaEngine.children, metadone.client.grasyla2.GrasylaEngine.clearChildren(), metadone.client.grasyla2.GrasylaEngine.component, metadone.client.grasyla2.GrasylaEngine.deactivate(), metadone.client.grasyla2.GrasylaEngine.disposeInternal(), metadone.client.grasyla2.GrasylaEngine.isActive(), metadone.client.grasyla2.GrasylaEngine.state, and metadone.client.grasyla2.GrasylaEngine.updateComponent().
Referenced by metadone.client.grasyla2.actions.GAction.execute(), metadone.client.grasyla2.GrasylaEngine.finalize(), metadone.client.grasyla2.GrasylaInterpreter.GrasylaInterpreter(), and metadone.client.grasyla2.GrasylaEngine.refresh().
void metadone.client.grasyla2.GrasylaEngine.disposeInternal | ( | ) | [protected] |
Called by dispose().
It is called after clearing the children, the goal is to let subtypes clear their internal variables when disposing.
Reimplemented in metadone.client.grasyla2.base.GrasylaEngineAdaptor< S, T >, metadone.client.grasyla2.generic.ListEngine, metadone.client.grasyla2.ref.RefObjectEngine, and metadone.client.grasyla2.visuallibrary.GraphEngine.
References metadone.client.grasyla2.GrasylaEngine.subscribers.
Referenced by metadone.client.grasyla2.GrasylaEngine.dispose().
void metadone.client.grasyla2.GrasylaEngine.finalize | ( | ) | throws Throwable [protected] |
References metadone.client.grasyla2.GrasylaEngine.dispose().
Finds the index for a child component which is not an attribute.
child | The child engine |
opt | The type of search |
References metadone.client.grasyla2.GrasylaEngine.getChildComponent(), metadone.client.grasyla2.GrasylaEngine.getChildren(), metadone.client.grasyla2.GrasylaEngine.ChildComponent.getComponent(), and metadone.client.grasyla2.GrasylaEngine.ChildComponent.isAttribute().
Referenced by metadone.client.grasyla2.generic.IfEngine.rebuildSingle(), and metadone.client.grasyla2.generic.ListEngine.updateToConcreteObject().
Iterator<ConcreteObject> metadone.client.grasyla2.GrasylaEngine.getAttributes | ( | final String | name | ) | throws BadPreCondition |
Gets attributes by name.
name | The name |
BadPreCondition |
References metadone.util.IteratorUtil.filter(), metadone.client.grasyla2.GrasylaEngine.getContainedAttributes(), and metadone.util.IteratorUtil.map().
Referenced by metadone.client.grasyla2.generic.ListEngine.buildNewComponent(), metadone.client.grasyla2.generic.IfEngine.buildNewComponent(), metadone.client.grasyla2.generic.GuardEngine.buildNewComponent(), metadone.client.grasyla2.actions.GAction.cancel(), and metadone.client.grasyla2.GrasylaEngine.registerAttributeHandler().
ChildComponent metadone.client.grasyla2.GrasylaEngine.getChildComponent | ( | GrasylaEngine | engine | ) | [protected] |
Gets a child component.
engine | The engine |
null
References metadone.client.grasyla2.GrasylaEngine.childrenComponents.
Referenced by metadone.client.grasyla2.GrasylaEngine.addChild(), metadone.client.grasyla2.generic.ListEngine.buildComponent(), metadone.client.grasyla2.GrasylaEngine.clearChildrenExpressions(), metadone.client.grasyla2.GrasylaEngine.debugEngineTreeGraphViz(), metadone.client.grasyla2.GrasylaEngine.findIndex(), metadone.client.grasyla2.GrasylaEngine.getChildrenExpressions(), metadone.client.grasyla2.generic.IfEngine.rebuildAll(), metadone.client.grasyla2.generic.IfEngine.rebuildSingle(), and metadone.client.grasyla2.generic.ListEngine.updateToConcreteObject().
protected<C> Component<? extends C> metadone.client.grasyla2.GrasylaEngine.getChildComponent | ( | Class< C > | clComp, |
boolean | active, | ||
GrasylaEngine | engine | ||
) | [package] |
Gets the child component for an engine.
The child component is built if needed.
<C> | The type |
clComp | The class |
active | Whether to activate the built child |
engine | The child engine |
References metadone.client.grasyla2.GrasylaEngine.childrenComponents, metadone.client.grasyla2.GrasylaEngine.ChildComponent.cl, metadone.client.grasyla2.GrasylaEngine.component, and metadone.client.grasyla2.GrasylaEngine.ChildComponent.component.
GrasylaEngine metadone.client.grasyla2.GrasylaEngine.getChildEngine | ( | Component<?> | comp | ) | [protected] |
Gets a child component corresponding to a component.
comp | The component |
null
References metadone.client.grasyla2.GrasylaEngine.childrenComponents.
List<? extends GrasylaEngine> metadone.client.grasyla2.GrasylaEngine.getChildren | ( | ) |
Gets the children engines.
Implements metadone.client.display.Engine.
References metadone.client.grasyla2.GrasylaEngine.children_unmodif.
Referenced by metadone.client.grasyla2.GrasylaEngine.activate(), metadone.client.grasyla2.generic.ListEngine.buildComponent(), metadone.client.grasyla2.GrasylaEngine.clearChildren(), metadone.client.grasyla2.GrasylaEngine.clearChildrenExpressions(), metadone.client.grasyla2.GrasylaEngine.deactivate(), metadone.client.grasyla2.GrasylaEngine.debugEngineTreeGraphViz(), metadone.client.grasyla2.GrasylaEngine.findIndex(), metadone.client.grasyla2.visuallibrary.GrasylaScene.getEngineFromWidget(), metadone.client.grasyla2.generic.IfEngine.rebuildAll(), metadone.client.grasyla2.generic.IfEngine.rebuildSingle(), metadone.client.grasyla2.ref.RefEngine.updateComponent(), and metadone.client.grasyla2.generic.ListEngine.updateToConcreteObject().
Iterable<? extends GrasylaEngine> metadone.client.grasyla2.GrasylaEngine.getChildrenExpressions | ( | ) |
Gets the children engines that components are expressions.
References metadone.client.grasyla2.GrasylaEngine.children, metadone.util.IteratorUtil.filter(), metadone.client.grasyla2.GrasylaEngine.getChildComponent(), and metadone.client.grasyla2.GrasylaEngine.ChildComponent.isAttribute().
Referenced by metadone.client.grasyla2.generic.GroupEngine.rebuildComponent().
public<C> Component<? extends C> metadone.client.grasyla2.GrasylaEngine.getComponent | ( | Class< C > | clComp | ) | [package] |
Gets the built component.
null
if nothing has been built Implements metadone.client.display.Engine.
References metadone.client.grasyla2.GrasylaEngine.component.
Referenced by metadone.client.grasyla2.ref.SideEngine.activate(), metadone.client.grasyla2.GrasylaEngine.buildComponent(), metadone.client.grasyla2.visuallibrary.AnchorEngine.AnchorBuilder.buildList(), metadone.client.grasyla2.swing.GrasylaSwingHelper.AttributeFontColor.colorChanged(), metadone.client.grasyla2.swing.GrasylaSwingHelper.AttributeBackground.colorChanged(), metadone.client.grasyla2.GrasylaEngine.debugEngineTreeGraphViz_nodeContents(), metadone.client.grasyla2.swing.GrasylaSwingHelper.AttributeFont.fontChanged(), metadone.client.grasyla2.visuallibrary.AttributeFontColor.getWidgets(), metadone.client.grasyla2.visuallibrary.AttributeBorder.getWidgets(), metadone.client.grasyla2.visuallibrary.AttributeBackground.getWidgets(), metadone.client.grasyla2.visuallibrary.AttributeFont.getWidgets(), metadone.client.grasyla2.generic.ListEngine.notifyChildChanged(), metadone.client.grasyla2.generic.IfEngine.notifyChildChanged(), metadone.client.grasyla2.generic.GuardEngine.notifyChildChanged(), metadone.client.grasyla2.GrasylaEngine.refresh(), metadone.client.grasyla2.GrasylaEngine.registerAttributeHandler(), metadone.client.grasyla2.ref.RefObjectEngine.registerSubscriber(), metadone.client.grasyla2.GrasylaEngine.registerSubscriber(), metadone.client.grasyla2.ref.RefEngine.updateComponent(), metadone.client.grasyla2.generic.NoneEngine.updateToConcreteObject(), metadone.client.grasyla2.generic.ListEngine.updateToConcreteObject(), metadone.client.grasyla2.swing.GrasylaSwingHelper.AttributeTooltip.valueChanged(), metadone.client.grasyla2.swing.GrasylaSwingHelper.AttributeEnabled.valueChanged(), metadone.client.grasyla2.swing.GrasylaSwingHelper.AttributeVisible.valueChanged(), and metadone.client.grasyla2.swing.GrasylaSwingHelper.AttributeName.valueChanged().
Set<Subscriber<? super Component<?> > > metadone.client.grasyla2.GrasylaEngine.getComponentChangeSubscribers | ( | ) |
Gets the set of component change listeners.
References metadone.client.grasyla2.GrasylaEngine.componentChangeSubscribers.
Iterator<ConcreteObject> metadone.client.grasyla2.GrasylaEngine.getContained | ( | ) | throws BadPreCondition [private] |
References metadone.client.grasyla2.GrasylaEngine.expression, metadone.metabusiness.ConcreteObject.getAllConcreteRolesDomainCO(), metadone.metabusiness.syntax.grasyla.BootstrapGrasyla.getBootsMR_Contains(), and metadone.client.grasyla2.GrasylaEngine.getGrasyla().
Referenced by metadone.client.grasyla2.GrasylaEngine.getContainedAttributes(), metadone.client.grasyla2.GrasylaEngine.getContainedExpressions(), and metadone.client.grasyla2.GrasylaEngine.getContainedVariables().
Iterator<Pair<String, ConcreteObject> > metadone.client.grasyla2.GrasylaEngine.getContainedAttributes | ( | ) | throws BadPreCondition |
Gets the contained attributes.
BadPreCondition |
References metadone.util.IteratorUtil.filter(), metadone.metabusiness.syntax.grasyla.BootstrapGrasyla.getBootsMO_Attribute(), metadone.metabusiness.syntax.grasyla.BootstrapGrasyla.getBootsMP_Name(), metadone.metabusiness.syntax.grasyla.BootstrapGrasyla.getBootsMR_Value(), metadone.client.grasyla2.GrasylaEngine.getContained(), metadone.client.grasyla2.GrasylaEngine.getGrasyla(), metadone.metabusiness.ConcreteObject.getOneConcreteRolesDomainCO(), metadone.metabusiness.ConcreteObject.getOnePropertyValue(), metadone.metabusiness.ConcreteObject.hasType(), and metadone.util.IteratorUtil.map().
Referenced by metadone.client.grasyla2.GrasylaEngine.createAttributes(), metadone.client.grasyla2.GrasylaEngine.getAttributes(), and metadone.client.grasyla2.generic.ModelEngine.updateContext().
Iterator<ConcreteObject> metadone.client.grasyla2.GrasylaEngine.getContainedExpressions | ( | ) | throws BadPreCondition |
Gets the contained expressions.
BadPreCondition |
References metadone.util.IteratorUtil.filter(), metadone.client.grasyla2.GrasylaEngine.getContained(), and metadone.client.grasyla2.GrasylaEngine.getGrasyla().
Referenced by metadone.client.grasyla2.GrasylaEngine.buildChildrenExpressions(), metadone.client.grasyla2.ref.MetaEngine.buildNewComponent(), metadone.client.grasyla2.generic.GroupEngine.buildNewComponent(), metadone.client.grasyla2.generic.IfEngine.evaluate(), metadone.client.grasyla2.generic.IfEngine.evaluateSimple(), and metadone.client.grasyla2.actions.GAction.fire().
Iterator<ConcreteObject> metadone.client.grasyla2.GrasylaEngine.getContainedVariables | ( | ) | throws BadPreCondition |
Gets the contained variables.
BadPreCondition |
References metadone.util.IteratorUtil.filter(), metadone.client.grasyla2.GrasylaEngine.getContained(), and metadone.client.grasyla2.GrasylaEngine.getGrasyla().
Referenced by metadone.client.grasyla2.GrasylaEngine.updateContext().
GrasylaContext metadone.client.grasyla2.GrasylaEngine.getContext | ( | ) |
Gets the context.
Implements metadone.client.display.Engine.
References metadone.client.grasyla2.GrasylaEngine.context.
Referenced by metadone.client.grasyla2.GrasylaEngine.activate(), metadone.client.grasyla2.ref.RefEngine.buildChild(), metadone.client.grasyla2.GrasylaEngine.buildComponent(), metadone.client.grasyla2.ref.SideEngine.buildNewComponent(), metadone.client.grasyla2.ref.RefSpecEngine.buildNewComponent(), metadone.client.grasyla2.ref.MetaEngine.buildNewComponent(), metadone.client.grasyla2.GrasylaInterpreter.buildNewComponent(), metadone.client.grasyla2.generic.TailEngine.buildNewComponent(), metadone.client.grasyla2.generic.ListEngine.buildNewComponent(), metadone.client.grasyla2.generic.IfEngine.buildNewComponent(), metadone.client.grasyla2.generic.HeadEngine.buildNewComponent(), metadone.client.grasyla2.generic.GuardEngine.buildNewComponent(), metadone.client.grasyla2.generic.GroupEngine.buildNewComponent(), metadone.client.grasyla2.generic.ListEngine.buildSeparator(), metadone.client.grasyla2.visuallibrary.GrasylaScene.configure(), metadone.client.grasyla2.GrasylaInterpreter.configure(), metadone.client.grasyla2.visuallibrary.GrasylaScene.MyConnectProvider.createConnection(), metadone.client.grasyla2.GrasylaEngine.deactivate(), metadone.client.grasyla2.GrasylaEngine.debugEngineTreeGraphViz_nodeContents(), metadone.client.grasyla2.generic.IfEngine.evaluate(), metadone.client.grasyla2.generic.IfEngine.evaluateSimple(), metadone.client.grasyla2.visuallibrary.GrasylaScene.getCOForMovable(), metadone.client.grasyla2.GrasylaEngine.AttributeHandler< T >.getContext(), metadone.client.grasyla2.actions.GAction.getContext(), metadone.client.grasyla2.GrasylaInterpreter.getFeatures(), metadone.client.grasyla2.swing.GrasylaSwingHelper.AttributeFont.getFontContext(), metadone.client.grasyla2.visuallibrary.AttributeFont.getFontContext(), metadone.client.grasyla2.visuallibrary.GrasylaScene.getPhenomenon(), metadone.client.grasyla2.ref.SideEngine.getRole(), metadone.client.grasyla2.ref.RefEngine.getSelf(), metadone.client.grasyla2.visuallibrary.GraphEngine.GraphEngine(), metadone.client.grasyla2.GrasylaInterpreter.GrasylaInterpreter(), metadone.client.grasyla2.visuallibrary.GrasylaScene.MyConnectProvider.isSourceWidget(), metadone.client.grasyla2.visuallibrary.GrasylaScene.MyConnectProvider.isTargetWidget(), metadone.client.grasyla2.GrasylaEngine.refresh(), metadone.client.grasyla2.ref.RefSpecEngine.RefSpecEngine(), metadone.client.grasyla2.visuallibrary.AnchorEngine.registerAttributeHandlers(), metadone.client.grasyla2.GrasylaInterpreter.runInitScript(), metadone.client.grasyla2.GrasylaEngine.setCanUpdateObject(), metadone.client.grasyla2.GrasylaEngine.trigger(), metadone.client.grasyla2.generic.ReduceEngine.updateComponent(), and metadone.client.grasyla2.generic.ListEngine.updateToConcreteObject().
MetadoneEvents metadone.client.grasyla2.GrasylaEngine.getEventManager | ( | ) | [protected] |
Gets the event manager.
References metadone.client.grasyla2.GrasylaEngine.expression, metadone.metabusiness.Workspace.getEventManager(), and metadone.metabusiness.WorkspaceObject.getWorkspace().
Referenced by metadone.client.grasyla2.GrasylaEngine.SubscriberRegistration< T >.getUsedManager().
final ConcreteObject metadone.client.grasyla2.GrasylaEngine.getExpression | ( | ) |
Gets the interpreted grasyla expression.
References metadone.client.grasyla2.GrasylaEngine.expression.
Referenced by metadone.client.grasyla2.GrasylaContext.activate(), metadone.client.grasyla2.ref.RefEngine.buildChild(), metadone.client.grasyla2.ref.RefRoleEngine.buildNewComponent(), metadone.client.grasyla2.GrasylaInterpreter.buildNewComponent(), metadone.client.grasyla2.GrasylaContext.deactivate(), metadone.client.grasyla2.GrasylaContext.declareVariable(), metadone.client.grasyla2.visuallibrary.GrasylaScene.getPhenomenon(), metadone.client.grasyla2.GrasylaContext.getVariable(), metadone.client.grasyla2.GrasylaEngine.isAdapted(), metadone.client.grasyla2.generic.GuardEngine.notifyChildChanged(), metadone.client.grasyla2.GrasylaContext.setVariable(), and metadone.client.grasyla2.GrasylaEngine.updateContext().
BootstrapGrasyla metadone.client.grasyla2.GrasylaEngine.getGrasyla | ( | ) | [protected] |
Gets the grasyla bootstrap.
References metadone.client.grasyla2.GrasylaEngine.expression, metadone.metabusiness.Workspace.getBootstrap(), and metadone.metabusiness.WorkspaceObject.getWorkspace().
Referenced by metadone.client.grasyla2.ref.RefEngine.buildChild(), metadone.client.grasyla2.ref.RefSpecEngine.buildNewComponent(), metadone.client.grasyla2.ref.RefRoleEngine.buildNewComponent(), metadone.client.grasyla2.ref.RefObjectEngine.buildNewComponent(), metadone.client.grasyla2.ref.MetaEngine.buildNewComponent(), metadone.client.grasyla2.GrasylaEngine.getContained(), metadone.client.grasyla2.GrasylaEngine.getContainedAttributes(), metadone.client.grasyla2.GrasylaEngine.getContainedExpressions(), metadone.client.grasyla2.GrasylaEngine.getContainedVariables(), metadone.client.grasyla2.GrasylaEngine.GrasylaEngine(), and metadone.client.grasyla2.GrasylaEngine.updateContext().
Engine metadone.client.grasyla2.GrasylaEngine.getParent | ( | ) |
Gets the parent engine.
Implements metadone.client.display.Engine.
References metadone.client.grasyla2.GrasylaEngine.parent.
Referenced by metadone.client.grasyla2.GrasylaEngine.addChild(), metadone.client.grasyla2.GrasylaEngine.debugEngineTreeGraphViz_nodeContents(), metadone.client.grasyla2.actions.GAction.getEngine(), metadone.client.grasyla2.visuallibrary.GrasylaScene.getPhenomenon(), metadone.client.grasyla2.GrasylaEngine.GrasylaEngine(), metadone.client.grasyla2.GrasylaEngine.isAdapted(), and metadone.client.grasyla2.GrasylaEngine.trigger().
GrasylaEngineState metadone.client.grasyla2.GrasylaEngine.getState | ( | ) |
Gets the state of the engine.
References metadone.client.grasyla2.GrasylaEngine.state.
Referenced by metadone.client.grasyla2.GrasylaEngine.debugEngineTreeGraphViz_nodeContents(), metadone.client.grasyla2.generic.ListEngine.notifyChildChanged(), metadone.client.grasyla2.generic.IfEngine.notifyChildChanged(), and metadone.client.grasyla2.generic.GuardEngine.notifyChildChanged().
static String metadone.client.grasyla2.GrasylaEngine.graphviz_escape | ( | String | s | ) | [static, protected] |
Escapes a string to be usable in a graphviz output.
s | The string |
Referenced by metadone.client.grasyla2.GrasylaEngine.debugEngineTreeGraphViz(), and metadone.client.grasyla2.GrasylaEngine.debugEngineTreeGraphViz_nodeContents().
void metadone.client.grasyla2.GrasylaEngine.initActionHander | ( | ) | [protected] |
Registers the attribute handlers for events (actions).
Reimplemented in metadone.client.grasyla2.base.GrasylaEngineForAttribute< T >, and metadone.client.grasyla2.generic.NoneEngine.
References metadone.client.grasyla2.GrasylaEngine.isAdapted(), and metadone.client.grasyla2.GrasylaEngine.registerAttributeHandler().
Referenced by metadone.client.grasyla2.GrasylaEngine.GrasylaEngine().
boolean metadone.client.grasyla2.GrasylaEngine.isActive | ( | ) |
Indicates whether this engine is active.
true
iff this engine is active Implements metadone.client.display.Engine.
References metadone.client.grasyla2.GrasylaEngine.state.
Referenced by metadone.client.grasyla2.ref.SideEngine.activate(), metadone.client.grasyla2.GrasylaEngine.addChild(), metadone.client.grasyla2.GrasylaEngine.buildComponent(), metadone.client.grasyla2.GrasylaEngine.dispose(), metadone.client.grasyla2.generic.GuardEngine.notifyChildChanged(), metadone.client.grasyla2.GrasylaEngine.refresh(), and metadone.client.grasyla2.GrasylaEngine.registerSubscriber().
final boolean metadone.client.grasyla2.GrasylaEngine.isAdapted | ( | ) |
Indicates whether this engine is adapted.
An adapted engine is just a wrapped inside another engine. It was created using the same expression.
true
if the engine is adapted References metadone.util.Objects.cast(), metadone.util.Objects.equal(), metadone.client.grasyla2.GrasylaEngine.getExpression(), and metadone.client.grasyla2.GrasylaEngine.getParent().
Referenced by metadone.client.grasyla2.GrasylaEngine.initActionHander(), and metadone.client.grasyla2.GrasylaEngine.updateContext().
final boolean metadone.client.grasyla2.GrasylaEngine.isBuilding | ( | ) | [protected] |
Indicates whether the component is being built.
true
if the component is being built References metadone.client.grasyla2.GrasylaEngine.building.
Referenced by metadone.client.grasyla2.GrasylaEngine.registerAttributeHandler().
boolean metadone.client.grasyla2.GrasylaEngine.isClassSupported | ( | Class<?> | clComp | ) |
Tests if the given class can be used by this component.
clComp | The component class |
true
iff the class is supported Implements metadone.client.display.Engine.
Reimplemented in metadone.client.grasyla2.base.GrasylaEngineTyped< T >, and metadone.client.grasyla2.visuallibrary.GraphEngine.
boolean metadone.client.grasyla2.GrasylaEngine.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.
name | The name of the attribute |
true
if name is a native attribute Reimplemented in metadone.client.grasyla2.base.GrasylaEngineForAttribute< T >, metadone.client.grasyla2.generic.GuardEngine, metadone.client.grasyla2.generic.IfEngine, metadone.client.grasyla2.generic.ListEngine, and metadone.client.grasyla2.generic.ModelEngine.
Referenced by metadone.client.grasyla2.GrasylaEngine.createAttributes().
void metadone.client.grasyla2.GrasylaEngine.notifyChildChanged | ( | Engine | child, |
ChildComponent | comp | ||
) | [protected] |
Reimplemented in metadone.client.grasyla2.base.GrasylaEngineAdaptor< S, T >, metadone.client.grasyla2.base.GrasylaEngineForAttribute< T >, metadone.client.grasyla2.generic.GroupEngine, metadone.client.grasyla2.generic.GuardEngine, metadone.client.grasyla2.generic.HeadEngine, metadone.client.grasyla2.generic.IfEngine, metadone.client.grasyla2.generic.ListEngine, metadone.client.grasyla2.generic.TailEngine, metadone.client.grasyla2.GrasylaInterpreter, metadone.client.grasyla2.ref.MetaEngine, metadone.client.grasyla2.ref.RefEngine, metadone.client.grasyla2.ref.SideEngine, and metadone.client.grasyla2.visuallibrary.GraphEngine.
References metadone.client.grasyla2.GrasylaEngine.attributes, and metadone.client.grasyla2.GrasylaEngine.logger.
final void metadone.client.grasyla2.GrasylaEngine.notifyChildChanged | ( | Engine | child | ) |
Called by the active child to indicate that its component has changed.
child | The child engine |
Implements metadone.client.display.Engine.
References metadone.client.grasyla2.GrasylaEngine.building, metadone.client.grasyla2.GrasylaEngine.childrenComponents, and metadone.client.grasyla2.GrasylaEngine.ChildComponent.getComponentClass().
void metadone.client.grasyla2.GrasylaEngine.refresh | ( | ) |
Rebuilds the engine contents if there are any.
Reimplemented in metadone.client.grasyla2.GrasylaInterpreter.
References metadone.client.grasyla2.GrasylaEngine.activate(), metadone.client.grasyla2.GrasylaEngine.buildComponent(), metadone.client.grasyla2.GrasylaEngineFactory.buildFor(), metadone.client.grasyla2.GrasylaEngine.deactivate(), metadone.client.grasyla2.GrasylaEngine.dispose(), metadone.client.grasyla2.GrasylaEngine.getComponent(), metadone.client.grasyla2.GrasylaEngine.getContext(), metadone.client.grasyla2.GrasylaContext.getFactory(), metadone.client.grasyla2.GrasylaEngine.isActive(), and metadone.client.grasyla2.GrasylaEngine.updateComponent().
void metadone.client.grasyla2.GrasylaEngine.registerAttributeHandler | ( | AttributeHandler<?> | handler, |
boolean | overwrite | ||
) | [protected] |
Registers an attribute handler.
handler | The handler |
overwrite |
IllegalArgumentException | when there is a collision for the attribute's name |
References metadone.client.grasyla2.GrasylaEngine.attributes, metadone.client.grasyla2.GrasylaEngine.createAttribute(), metadone.client.grasyla2.GrasylaEngine.getAttributes(), metadone.client.grasyla2.GrasylaEngine.getComponent(), metadone.client.grasyla2.GrasylaEngine.isBuilding(), and metadone.client.grasyla2.GrasylaEngine.logger.
final void metadone.client.grasyla2.GrasylaEngine.registerAttributeHandler | ( | AttributeHandler<?> | handler | ) |
Registers an attribute handler.
handler | The handler |
IllegalArgumentException | when there is a collision for the attribute's name |
Referenced by metadone.client.grasyla2.visuallibrary.GraphEngine.GraphEngine(), metadone.client.grasyla2.GrasylaEngine.initActionHander(), metadone.client.grasyla2.visuallibrary.GrasylaScene.registerAttributeHandlers(), metadone.client.grasyla2.visuallibrary.AnchorEngine.registerAttributeHandlers(), metadone.client.grasyla2.swing.GrasylaSwingHelper.registerAttributeHandlers(), and metadone.client.grasyla2.visuallibrary.VLNearEngine.VLNearEngine().
public<T> void metadone.client.grasyla2.GrasylaEngine.registerSubscriber | ( | boolean | activation, |
boolean | persist, | ||
EventTower<?super T > | manager, | ||
Class< T > | cl, | ||
MapFct<?super T, Boolean > | predicate, | ||
Subscriber<?super T > | subscriber | ||
) | [package] |
Registers a subscriber that will be managed by this engine.
<T> | The type |
activation | Whether this subscriber should only be subscribed when the engine is active |
persist | Whether this subscriber will be reactivated after a deactivation |
manager | The event tower or null to use the manager of the context |
cl | The class |
predicate | The predicate or null |
subscriber | The subscriber |
References metadone.client.grasyla2.GrasylaEngine.SubscriberRegistration< T >.activation, metadone.client.grasyla2.GrasylaEngine.getComponent(), metadone.client.grasyla2.GrasylaEngine.isActive(), and metadone.client.grasyla2.GrasylaEngine.subscribers.
Referenced by metadone.client.grasyla2.ref.SideEngine.activate(), metadone.client.grasyla2.GrasylaInterpreter.GrasylaInterpreter(), metadone.client.grasyla2.ref.RefSpecEngine.registerSubscriber(), metadone.client.grasyla2.ref.RefRoleEngine.registerSubscriber(), metadone.client.grasyla2.ref.RefObjectEngine.registerSubscriber(), metadone.client.grasyla2.GrasylaEngine.setCanUpdateObject(), metadone.client.grasyla2.visuallibrary.GrasylaScene.FreeWidgetUpdater.updateControlPoints(), and metadone.client.grasyla2.visuallibrary.GrasylaScene.FreeWidgetUpdater.updateFreeWidgetLocation().
AttributeHandler<?> metadone.client.grasyla2.GrasylaEngine.removeAttributeHandler | ( | String | name | ) | [protected] |
Removes an attribute handler.
name | The name of the attribute |
null
References metadone.client.grasyla2.GrasylaEngine.attributes.
final void metadone.client.grasyla2.GrasylaEngine.removeChild | ( | Engine | e | ) | [protected] |
Removes a child from this engine.
When a child is removed, it is disposed.
e | The child to remove |
References metadone.client.grasyla2.GrasylaEngine.building, metadone.client.grasyla2.GrasylaEngine.children, metadone.client.grasyla2.GrasylaEngine.childrenComponents, and metadone.client.display.Engine.dispose().
Referenced by metadone.client.grasyla2.GrasylaEngine.clearChildren(), metadone.client.grasyla2.GrasylaEngine.clearChildrenExpressions(), metadone.client.grasyla2.generic.IfEngine.rebuildSingle(), and metadone.client.grasyla2.generic.ListEngine.updateToConcreteObject().
final ChildComponent metadone.client.grasyla2.GrasylaEngine.removeChildWithoutDispose | ( | Engine | e | ) | [protected] |
Removes a child from this engine.
e | The child to remove |
null
when child was not in this engine References metadone.client.grasyla2.GrasylaEngine.children, and metadone.client.grasyla2.GrasylaEngine.childrenComponents.
void metadone.client.grasyla2.GrasylaEngine.setCanUpdateObject | ( | boolean | b | ) | [protected] |
Sets whether the concrete objects request changes are accepted.
This can be set to true
if this engine does not use the context's object.
b | The value |
References metadone.client.grasyla2.GrasylaEngine.getContext(), metadone.client.grasyla2.GrasylaEngine.registerSubscriber(), and metadone.client.grasyla2.GrasylaEngine.subscribers.
Referenced by metadone.client.grasyla2.generic.ListEngine.ListEngine(), and metadone.client.grasyla2.generic.NoneEngine.NoneEngine().
void metadone.client.grasyla2.GrasylaEngine.trigger | ( | EngineEvent | event | ) |
Reimplemented in metadone.client.grasyla2.visuallibrary.GraphEngine.
References metadone.client.grasyla2.actions.GrasylaActionAttributeHandler.ATTR_ACTION, metadone.client.grasyla2.GrasylaEngine.attributes, metadone.util.Objects.cast(), metadone.client.grasyla2.GrasylaEngine.getContext(), metadone.metabusiness.Workspace.getEventManager(), metadone.client.grasyla2.GrasylaEngine.getParent(), metadone.client.grasyla2.GrasylaContext.getWorkspace(), metadone.client.grasyla2.actions.GrasylaActionAttributeHandler.handle(), metadone.client.grasyla2.actions.UserEvent.isCancelled(), metadone.client.grasyla2.GrasylaEngine.parent, metadone.metabusiness.events.MetadoneEvents.trigger(), and metadone.client.grasyla2.GrasylaEngine.trigger().
Referenced by metadone.client.grasyla2.ref.SideEngine.activate(), metadone.client.grasyla2.ref.RefSpecEngine.activate(), metadone.client.grasyla2.ref.RefRoleEngine.activate(), metadone.client.grasyla2.ref.RefObjectEngine.activate(), metadone.client.grasyla2.GrasylaEngine.GrasylaEngine(), metadone.client.grasyla2.GrasylaInterpreter.GrasylaInterpreter(), metadone.client.grasyla2.swing.GrasylaSwingHelper.GrasylaMouseListener.popupCheck(), metadone.client.grasyla2.ref.RefRoleEngine.registerSubscriber(), metadone.client.grasyla2.ref.RefObjectEngine.registerSubscriber(), metadone.client.grasyla2.GrasylaEngine.trigger(), and metadone.client.grasyla2.actions.UserEvent.trigger().
void metadone.client.grasyla2.GrasylaEngine.unregisterSubscriber | ( | Subscriber<?> | subscriber | ) |
Unsubscribes a subscriber.
subscriber | The subscriber or null |
References metadone.util.Objects.equal(), and metadone.client.grasyla2.GrasylaEngine.subscribers.
void metadone.client.grasyla2.GrasylaEngine.updateComponent | ( | Component<?> | component | ) | [protected] |
Updates the rendered component by this engine.
This method will notify the subscribers too.
component | The new component or null |
Reimplemented in metadone.client.grasyla2.visuallibrary.VLNearEngine.
References metadone.client.grasyla2.GrasylaEngine.component, metadone.client.grasyla2.GrasylaEngine.componentChangeSubscribers, and metadone.util.Objects.equal().
Referenced by metadone.client.grasyla2.ref.SideEngine.activate(), metadone.client.grasyla2.GrasylaEngine.buildComponent(), metadone.client.grasyla2.GrasylaEngine.dispose(), metadone.client.grasyla2.ref.SideEngine.notifyChildChanged(), metadone.client.grasyla2.ref.MetaEngine.notifyChildChanged(), metadone.client.grasyla2.GrasylaInterpreter.notifyChildChanged(), metadone.client.grasyla2.generic.TailEngine.notifyChildChanged(), metadone.client.grasyla2.generic.ListEngine.notifyChildChanged(), metadone.client.grasyla2.generic.IfEngine.notifyChildChanged(), metadone.client.grasyla2.generic.HeadEngine.notifyChildChanged(), metadone.client.grasyla2.generic.GuardEngine.notifyChildChanged(), metadone.client.grasyla2.generic.GroupEngine.notifyChildChanged(), metadone.client.grasyla2.generic.IfEngine.rebuildSingle(), metadone.client.grasyla2.GrasylaInterpreter.refresh(), metadone.client.grasyla2.GrasylaEngine.refresh(), and metadone.client.grasyla2.GrasylaEngine.ConcreteObjectChangeHandler.trigger().
GrasylaContext metadone.client.grasyla2.GrasylaEngine.updateContext | ( | final GrasylaContext | context | ) | throws BadPreCondition [protected] |
Builds the context for this engine.
This is called from the constructor to setup the context.
By default, this method returns the given context and declares the variables.
context | The context |
BadPreCondition |
References metadone.client.grasyla2.GrasylaContext.configure(), metadone.client.grasyla2.GrasylaEngine.context, metadone.client.grasyla2.GrasylaContext.declareVariable(), metadone.metabusiness.syntax.grasyla.BootstrapGrasyla.getBootsMO_Expression(), metadone.metabusiness.syntax.grasyla.BootstrapGrasyla.getBootsMO_Variable(), metadone.metabusiness.syntax.grasyla.BootstrapGrasyla.getBootsMP_Functor(), metadone.metabusiness.syntax.grasyla.BootstrapGrasyla.getBootsMP_Stored(), metadone.metabusiness.syntax.grasyla.BootstrapGrasyla.getBootsMP_VarName(), metadone.client.grasyla2.GrasylaEngine.getContainedVariables(), metadone.client.grasyla2.GrasylaEngine.getExpression(), metadone.metabusiness.syntax.grasyla.BootstrapGrasyla.getExpressionValue(), metadone.client.grasyla2.GrasylaEngine.getGrasyla(), metadone.metabusiness.ConcreteObject.getOnePropertyValue(), metadone.client.grasyla2.GrasylaEngine.isAdapted(), metadone.client.grasyla2.GrasylaEngine.logger, metadone.client.grasyla2.GrasylaContext.setFunctor(), and metadone.client.grasyla2.GrasylaContext.setOwner().
Referenced by metadone.client.grasyla2.GrasylaEngine.GrasylaEngine().
Component<?> metadone.client.grasyla2.GrasylaEngine.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
.
event | The event |
Reimplemented in metadone.client.grasyla2.base.GrasylaEngineForAttribute< T >, metadone.client.grasyla2.generic.ListEngine, and metadone.client.grasyla2.generic.NoneEngine.
Referenced by metadone.client.grasyla2.GrasylaEngine.ConcreteObjectChangeHandler.trigger().
final Map<String, AttributeHandler<?> > metadone.client.grasyla2.GrasylaEngine.attributes = new HashMap<String, AttributeHandler<?>>() [private] |
Referenced by metadone.client.grasyla2.GrasylaEngine.buildComponent(), metadone.client.grasyla2.GrasylaEngine.createAttributes(), metadone.client.grasyla2.GrasylaEngine.notifyChildChanged(), metadone.client.grasyla2.GrasylaEngine.registerAttributeHandler(), metadone.client.grasyla2.GrasylaEngine.removeAttributeHandler(), and metadone.client.grasyla2.GrasylaEngine.trigger().
int metadone.client.grasyla2.GrasylaEngine.building [private] |
Referenced by metadone.client.grasyla2.GrasylaEngine.buildComponent(), metadone.client.grasyla2.GrasylaEngine.building(), metadone.client.grasyla2.GrasylaEngine.dispose(), metadone.client.grasyla2.GrasylaEngine.isBuilding(), metadone.client.grasyla2.GrasylaEngine.notifyChildChanged(), metadone.client.grasyla2.generic.IfEngine.notifyChildChanged(), metadone.client.grasyla2.GrasylaEngine.removeChild(), and metadone.client.grasyla2.GrasylaEngine.ConcreteObjectChangeHandler.trigger().
final List<GrasylaEngine> metadone.client.grasyla2.GrasylaEngine.children = new ArrayList<GrasylaEngine>() [private] |
Referenced by metadone.client.grasyla2.GrasylaEngine.addChild(), metadone.client.grasyla2.GrasylaEngine.dispose(), metadone.client.grasyla2.GrasylaEngine.getChildrenExpressions(), metadone.client.grasyla2.GrasylaEngine.removeChild(), metadone.client.grasyla2.GrasylaEngine.removeChildWithoutDispose(), and metadone.client.grasyla2.generic.ListEngine.updateToConcreteObject().
final transient List<GrasylaEngine> metadone.client.grasyla2.GrasylaEngine.children_unmodif = Collections.unmodifiableList(children) [private] |
Referenced by metadone.client.grasyla2.GrasylaEngine.getChildren().
final Map<GrasylaEngine, ChildComponent> metadone.client.grasyla2.GrasylaEngine.childrenComponents = new HashMap<GrasylaEngine, ChildComponent>() [private] |
Referenced by metadone.client.grasyla2.GrasylaEngine.addChild(), metadone.client.grasyla2.GrasylaEngine.getChildComponent(), metadone.client.grasyla2.GrasylaEngine.getChildEngine(), metadone.client.grasyla2.GrasylaEngine.notifyChildChanged(), metadone.client.grasyla2.GrasylaEngine.removeChild(), and metadone.client.grasyla2.GrasylaEngine.removeChildWithoutDispose().
Component<?> metadone.client.grasyla2.GrasylaEngine.component [private] |
Referenced by metadone.client.grasyla2.GrasylaEngine.debugEngineTreeGraphViz_nodeContents(), metadone.client.grasyla2.GrasylaEngine.dispose(), metadone.client.grasyla2.GrasylaEngine.getChildComponent(), metadone.client.grasyla2.GrasylaEngine.getComponent(), and metadone.client.grasyla2.GrasylaEngine.updateComponent().
final Set<Subscriber<? super Component<?> > > metadone.client.grasyla2.GrasylaEngine.componentChangeSubscribers = new HashSet<Subscriber<? super Component<?>>>() [private] |
final GrasylaContext metadone.client.grasyla2.GrasylaEngine.context [private] |
Referenced by metadone.client.grasyla2.GrasylaEngine.buildChild(), metadone.client.grasyla2.GrasylaEngine.buildChildrenExpressions(), metadone.client.grasyla2.generic.TailEngine.buildNewComponent(), metadone.client.grasyla2.generic.GroupEngine.buildNewComponent(), metadone.client.grasyla2.GrasylaInterpreter.configure(), metadone.client.grasyla2.GrasylaEngine.getContext(), metadone.client.grasyla2.ref.RefObjectEngine.getProperty(), metadone.client.grasyla2.visuallibrary.GraphEngine.GraphEngine(), metadone.client.grasyla2.GrasylaEngine.GrasylaEngine(), metadone.client.grasyla2.GrasylaInterpreter.GrasylaInterpreter(), metadone.client.grasyla2.generic.GroupEngine.GroupEngine(), metadone.client.grasyla2.generic.GuardEngine.GuardEngine(), metadone.client.grasyla2.generic.HeadEngine.HeadEngine(), metadone.client.grasyla2.generic.IfEngine.IfEngine(), metadone.client.grasyla2.generic.ListEngine.ListEngine(), metadone.client.grasyla2.ref.MetaEngine.MetaEngine(), metadone.client.grasyla2.generic.ModelEngine.ModelEngine(), metadone.client.grasyla2.generic.NoneEngine.NoneEngine(), metadone.client.grasyla2.generic.ReduceEngine.ReduceEngine(), metadone.client.grasyla2.ref.RefEngine.RefEngine(), metadone.client.grasyla2.ref.RefObjectEngine.RefObjectEngine(), metadone.client.grasyla2.ref.RefRoleEngine.RefRoleEngine(), metadone.client.grasyla2.ref.RefSpecEngine.RefSpecEngine(), metadone.client.grasyla2.ref.SideEngine.SideEngine(), metadone.client.grasyla2.generic.TailEngine.TailEngine(), metadone.client.grasyla2.GrasylaEngine.updateContext(), metadone.client.grasyla2.generic.ModelEngine.updateContext(), and metadone.client.grasyla2.visuallibrary.VLNearEngine.VLNearEngine().
final ConcreteObject metadone.client.grasyla2.GrasylaEngine.expression [private] |
Referenced by metadone.client.grasyla2.GrasylaEngine.getContained(), metadone.client.grasyla2.GrasylaEngine.getEventManager(), metadone.client.grasyla2.GrasylaEngine.getExpression(), metadone.client.grasyla2.GrasylaEngine.getGrasyla(), metadone.client.grasyla2.ref.RefSpecEngine.getTypeAndSide(), metadone.client.grasyla2.visuallibrary.GraphEngine.GraphEngine(), metadone.client.grasyla2.GrasylaEngine.GrasylaEngine(), metadone.client.grasyla2.generic.GroupEngine.GroupEngine(), metadone.client.grasyla2.generic.GuardEngine.GuardEngine(), metadone.client.grasyla2.generic.HeadEngine.HeadEngine(), metadone.client.grasyla2.generic.IfEngine.IfEngine(), metadone.client.grasyla2.generic.ListEngine.ListEngine(), metadone.client.grasyla2.ref.MetaEngine.MetaEngine(), metadone.client.grasyla2.generic.ModelEngine.ModelEngine(), metadone.client.grasyla2.generic.NoneEngine.NoneEngine(), metadone.client.grasyla2.generic.ReduceEngine.ReduceEngine(), metadone.client.grasyla2.ref.RefEngine.RefEngine(), metadone.client.grasyla2.ref.RefObjectEngine.RefObjectEngine(), metadone.client.grasyla2.ref.RefRoleEngine.RefRoleEngine(), metadone.client.grasyla2.ref.RefSpecEngine.RefSpecEngine(), metadone.client.grasyla2.ref.SideEngine.SideEngine(), metadone.client.grasyla2.generic.TailEngine.TailEngine(), and metadone.client.grasyla2.visuallibrary.VLNearEngine.VLNearEngine().
final Logger metadone.client.grasyla2.GrasylaEngine.logger = Logger.getLogger(GrasylaEngine.class) [static, protected] |
The logger
Reimplemented in metadone.client.grasyla2.GrasylaInterpreter.
Referenced by metadone.client.grasyla2.ref.SideEngine.activate(), metadone.client.grasyla2.ref.RefRoleEngine.activate(), metadone.client.grasyla2.ref.RefObjectEngine.activate(), metadone.client.grasyla2.GrasylaEngine.activate(), metadone.client.grasyla2.GrasylaEngine.buildComponent(), metadone.client.grasyla2.generic.ListEngine.buildComponent(), metadone.client.grasyla2.ref.MetaEngine.buildNewComponent(), metadone.client.grasyla2.GrasylaEngine.createAttributes(), metadone.client.grasyla2.GrasylaEngine.GrasylaEngine(), metadone.client.grasyla2.GrasylaEngine.notifyChildChanged(), metadone.client.grasyla2.generic.IfEngine.notifyChildChanged(), metadone.client.grasyla2.generic.GuardEngine.notifyChildChanged(), metadone.client.grasyla2.generic.IfEngine.rebuildSingle(), metadone.client.grasyla2.GrasylaEngine.registerAttributeHandler(), metadone.client.grasyla2.ref.RefRoleEngine.registerSubscriber(), metadone.client.grasyla2.ref.RefObjectEngine.registerSubscriber(), metadone.client.grasyla2.ref.RefEngine.updateComponent(), metadone.client.grasyla2.GrasylaEngine.updateContext(), and metadone.client.grasyla2.generic.ListEngine.updateToConcreteObject().
final Engine metadone.client.grasyla2.GrasylaEngine.parent [private] |
Referenced by metadone.client.grasyla2.GrasylaEngine.getParent(), metadone.client.grasyla2.visuallibrary.GraphEngine.GraphEngine(), metadone.client.grasyla2.GrasylaEngine.GrasylaEngine(), metadone.client.grasyla2.GrasylaInterpreter.GrasylaInterpreter(), metadone.client.grasyla2.generic.GroupEngine.GroupEngine(), metadone.client.grasyla2.generic.GuardEngine.GuardEngine(), metadone.client.grasyla2.generic.HeadEngine.HeadEngine(), metadone.client.grasyla2.generic.IfEngine.IfEngine(), metadone.client.grasyla2.generic.ListEngine.ListEngine(), metadone.client.grasyla2.ref.MetaEngine.MetaEngine(), metadone.client.grasyla2.generic.ModelEngine.ModelEngine(), metadone.client.grasyla2.generic.NoneEngine.NoneEngine(), metadone.client.grasyla2.generic.ReduceEngine.ReduceEngine(), metadone.client.grasyla2.ref.RefEngine.RefEngine(), metadone.client.grasyla2.ref.RefObjectEngine.RefObjectEngine(), metadone.client.grasyla2.ref.RefRoleEngine.RefRoleEngine(), metadone.client.grasyla2.ref.RefSpecEngine.RefSpecEngine(), metadone.client.grasyla2.ref.SideEngine.SideEngine(), metadone.client.grasyla2.generic.TailEngine.TailEngine(), metadone.client.grasyla2.GrasylaEngine.trigger(), metadone.client.grasyla2.generic.ModelEngine.updateContext(), and metadone.client.grasyla2.visuallibrary.VLNearEngine.VLNearEngine().
GrasylaEngineState metadone.client.grasyla2.GrasylaEngine.state = GrasylaEngineState.DISPOSED [private] |
Referenced by metadone.client.grasyla2.GrasylaEngine.activate(), metadone.client.grasyla2.GrasylaEngine.buildComponent(), metadone.client.grasyla2.GrasylaEngine.deactivate(), metadone.client.grasyla2.GrasylaEngine.dispose(), metadone.client.grasyla2.GrasylaEngine.getState(), and metadone.client.grasyla2.GrasylaEngine.isActive().
final Set<SubscriberRegistration<?> > metadone.client.grasyla2.GrasylaEngine.subscribers = new HashSet<SubscriberRegistration<?>>() [private] |
Referenced by metadone.client.grasyla2.GrasylaEngine.activate(), metadone.client.grasyla2.GrasylaEngine.buildComponent(), metadone.client.grasyla2.GrasylaEngine.deactivate(), metadone.client.grasyla2.GrasylaEngine.disposeInternal(), metadone.client.grasyla2.GrasylaEngine.registerSubscriber(), metadone.client.grasyla2.GrasylaEngine.setCanUpdateObject(), and metadone.client.grasyla2.GrasylaEngine.unregisterSubscriber().