MetaDone
metadone.plugin.helloworld.HelloPlugin Class Reference
Inheritance diagram for metadone.plugin.helloworld.HelloPlugin:
Collaboration diagram for metadone.plugin.helloworld.HelloPlugin:

List of all members.

Public Member Functions

JMenu createMenu ()
void startUp (MetadoneEvents eventManager)
void dispose ()

Private Member Functions

MetaAction getActionFor (MetaObject obj)

Private Attributes

final SubscriberHandler
< UserEvent
eventHandler
final GrasylaFactoryConfig config
final SubscriberHandler
< MainClientMetadone
client

Static Private Attributes

static final Logger logger = Logger.getLogger(HelloPlugin.class)

Member Function Documentation

JMenu metadone.plugin.helloworld.HelloPlugin.createMenu ( )

Creates a menu to show in the main window.

This method should be called from the swing thread.

Returns:
A new menu for this instance of the plugin or null

Reimplemented from metadone.client.plugin.AbstractMetadonePlugin.

References metadone.client.plugin.AbstractMetadonePlugin.getEventManager(), metadone.client.plugin.AbstractMetadonePlugin.getName(), metadone.metabusiness.events.Notification.inform(), and metadone.metabusiness.events.MetadoneEvents.trigger().

void metadone.plugin.helloworld.HelloPlugin.dispose ( )

Cleans up all the injections. This method should be called just before unloading the plugin.

Reimplemented from metadone.client.plugin.AbstractMetadonePlugin.

References metadone.plugin.helloworld.HelloPlugin.client, and metadone.plugin.helloworld.HelloPlugin.eventHandler.

void metadone.plugin.helloworld.HelloPlugin.startUp ( MetadoneEvents  eventManager)

Starts with just the event manager.

Parameters:
eventManagerThe event manager

Reimplemented from metadone.client.plugin.AbstractMetadonePlugin.

References metadone.plugin.helloworld.HelloPlugin.client, and metadone.plugin.helloworld.HelloPlugin.eventHandler.


Member Data Documentation

Initial value:
 new GrasylaFactoryConfig() {
        @Override
        public void configure(BootstrapGrasyla grasyla, GrasylaFactoryConfigurator c) {
            c.addBuilder("hello", newBuilder(String.class, HelloEngine.class));
        }
    }
Initial value:
 new SubscriberHandler<UserEvent>(UserEvent.class, MapFcts.equal(UserEvent.getEventName, "doubleClick")) {
        @Override
        public void trigger(UserEvent event) {
            final MetaObject mo = event.getEngine().getContext().getEquation().getLHS().getMetaObject();
            final MetaAction act = getActionFor(mo);
            if (act != null) {
                event.getActions().add(act);
            }
        }
    }

Referenced by metadone.plugin.helloworld.HelloPlugin.dispose(), and metadone.plugin.helloworld.HelloPlugin.startUp().

final Logger metadone.plugin.helloworld.HelloPlugin.logger = Logger.getLogger(HelloPlugin.class) [static, private]

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