MetaDone
|
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) |
JMenu metadone.plugin.helloworld.HelloPlugin.createMenu | ( | ) |
Creates a menu to show in the main window.
This method should be called from the swing thread.
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.
MetaAction metadone.plugin.helloworld.HelloPlugin.getActionFor | ( | MetaObject | obj | ) | [private] |
void metadone.plugin.helloworld.HelloPlugin.startUp | ( | MetadoneEvents | eventManager | ) |
Starts with just the event manager.
eventManager | The event manager |
Reimplemented from metadone.client.plugin.AbstractMetadonePlugin.
References metadone.plugin.helloworld.HelloPlugin.client, and metadone.plugin.helloworld.HelloPlugin.eventHandler.
final SubscriberHandler<MainClientMetadone> metadone.plugin.helloworld.HelloPlugin.client [private] |
final GrasylaFactoryConfig metadone.plugin.helloworld.HelloPlugin.config [private] |
new GrasylaFactoryConfig() { @Override public void configure(BootstrapGrasyla grasyla, GrasylaFactoryConfigurator c) { c.addBuilder("hello", newBuilder(String.class, HelloEngine.class)); } }
final SubscriberHandler<UserEvent> metadone.plugin.helloworld.HelloPlugin.eventHandler [private] |
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] |
Referenced by metadone.plugin.helloworld.HelloPlugin.getActionFor().