org.eu.sk.zero.acd
Class ModuleAdapter

java.lang.Object
  |
  +--org.eu.sk.zero.acd.ModuleAdapter
All Implemented Interfaces:
Module

public abstract class ModuleAdapter
extends Object
implements Module

Module adapter class. Module should create cpomonent types, add velue types to the component types, add methods and triggers to the component types. To create a module, cubclass ModuleAdapter and override its constructor

Version:
$Id: ModuleAdapter.java,v 1.3 2003/04/12 17:26:23 robo Exp $
See Also:
ComponentType, ValueType, Method, Trigger

Field Summary
protected  Collection actions
          Add your defined actions to this container
protected  org.eu.sk.zero.acd.ACD app
          Application reference.
protected  org.eu.sk.zero.acd.ComponentTypes areaTypes
          Add your defined component types to this container
protected  String author
          Author identification.
protected  ClassLoader cloader
          Module class loader.
protected  String desc
          Longer module description
protected  org.eu.sk.zero.acd.ComponentTypes edgeTypes
          Add your defined component types to this container
protected  String name
          Name of the module
protected  org.eu.sk.zero.acd.ComponentTypes nodeTypes
          Add your defined component types to this container
 
Constructor Summary
ModuleAdapter()
          To create a module, subclass the ModuleAdapter class and override this constructor.
 
Method Summary
 Collection getActions()
          Exported actions.
 Collection getAreaTypes()
          Only called from the application.
 String getAuthor()
          Author and copyright information.
 String getDescription()
          Longer module description.
 Collection getEdgeTypes()
          Only called from the application.
 String getName()
          Name of the module.
 Collection getNodeTypes()
          Only called from the application.
 void setApplication(org.eu.sk.zero.acd.ACD a)
          Reference to the application itself.
 String toString()
           
protected  URL url(String fileName)
          Converts a filename to url.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

name

protected String name
Name of the module


author

protected String author
Author identification. Possibly including copyright information


desc

protected String desc
Longer module description


nodeTypes

protected org.eu.sk.zero.acd.ComponentTypes nodeTypes
Add your defined component types to this container


edgeTypes

protected org.eu.sk.zero.acd.ComponentTypes edgeTypes
Add your defined component types to this container


areaTypes

protected org.eu.sk.zero.acd.ComponentTypes areaTypes
Add your defined component types to this container


actions

protected Collection actions
Add your defined actions to this container


app

protected org.eu.sk.zero.acd.ACD app
Application reference.


cloader

protected ClassLoader cloader
Module class loader.

Constructor Detail

ModuleAdapter

public ModuleAdapter()
To create a module, subclass the ModuleAdapter class and override this constructor.

Method Detail

getNodeTypes

public Collection getNodeTypes()
Only called from the application. Called when loading the module to add all node types defined in this module

Specified by:
getNodeTypes in interface Module

getEdgeTypes

public Collection getEdgeTypes()
Only called from the application. Called when loading the module to add all edge types defined in this module

Specified by:
getEdgeTypes in interface Module

getAreaTypes

public Collection getAreaTypes()
Only called from the application. Called when loading the module to add all area types defined in this module

Specified by:
getAreaTypes in interface Module

toString

public String toString()
Overrides:
toString in class Object

getName

public String getName()
Description copied from interface: Module
Name of the module.

Specified by:
getName in interface Module

getAuthor

public String getAuthor()
Description copied from interface: Module
Author and copyright information.

Specified by:
getAuthor in interface Module

getDescription

public String getDescription()
Description copied from interface: Module
Longer module description.

Specified by:
getDescription in interface Module

getActions

public Collection getActions()
Description copied from interface: Module
Exported actions. Only objects implementing javax.swing.Action must be contained in the returned collection

Specified by:
getActions in interface Module

setApplication

public void setApplication(org.eu.sk.zero.acd.ACD a)
Description copied from interface: Module
Reference to the application itself. Application calls this right after the module object is created.

Specified by:
setApplication in interface Module

url

protected URL url(String fileName)
Converts a filename to url. Use this to retrieve resources from module jar.