Docjar: A Java Source and Docuemnt Enginecom.*    java.*    javax.*    org.*    all    new    plug-in

Quick Search    Search Deep

org.modama.framework
Class AbstractFrameworkModel  view AbstractFrameworkModel download AbstractFrameworkModel.java

java.lang.Object
  extended byorg.modama.ModelStates
      extended byorg.modama.Model
          extended byorg.modama.framework.AbstractFrameworkModel

public abstract class AbstractFrameworkModel
extends org.modama.Model

the modelclass for the framework
adds to the model:
- names for events
- load/save/delete methoddeclarations

IMPORTANT: the create and delete methods should also call the put/delete methods of the world


Field Summary
protected  java.lang.String name
          the name of the object
static java.lang.String PROP_NAME
           
 
Fields inherited from class org.modama.Model
changeAgent, EVENT_FIRED, state
 
Fields inherited from class org.modama.ModelStates
CREATED, DELETED, MODIFIED, SAVED
 
Constructor Summary
AbstractFrameworkModel()
           
 
Method Summary
protected abstract  void create()
          initial creation of the object.
abstract  void delete()
          delete the object.
 java.lang.String getName()
          getter for name
abstract  boolean load(java.net.URL url)
          load data for the object
abstract  void save(java.net.URL url)
          save data for the object
 void setName(java.lang.String name)
          setter for name.
 
Methods inherited from class org.modama.Model
addPropertyChangeListener, addPropertyChangeListener, fire, fire, fire, getState, removePropertyChangeListener, removePropertyChangeListener, setState
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

PROP_NAME

public static final java.lang.String PROP_NAME
See Also:
Constant Field Values

name

protected java.lang.String name
the name of the object

Constructor Detail

AbstractFrameworkModel

public AbstractFrameworkModel()
Method Detail

create

protected abstract void create()
initial creation of the object. place code here, that is needed for every instance of your object
call the put method of the world, otherwise the object will not be shown by the gui


delete

public abstract void delete()
                     throws org.modama.framework.exceptions.DeleteCancelledException
delete the object. place code here, to clear up call the remove method of the world, otherwise the object will not be removed by the gui


load

public abstract boolean load(java.net.URL url)
                      throws java.io.IOException
load data for the object


save

public abstract void save(java.net.URL url)
                   throws java.io.IOException
save data for the object


getName

public java.lang.String getName()
getter for name


setName

public void setName(java.lang.String name)
setter for name. causes firePropertyChange