Dresden OCL Toolkit

tudresden.ocl.gui
Class JOCLEditorApp.DefaultOCLEditorModel

java.lang.Object
  extended bytudresden.ocl.gui.JOCLEditorApp.DefaultOCLEditorModel
All Implemented Interfaces:
OCLEditorModel
Enclosing class:
JOCLEditorApp

public static class JOCLEditorApp.DefaultOCLEditorModel
extends Object
implements OCLEditorModel


Nested Class Summary
 class JOCLEditorApp.DefaultOCLEditorModel.DefaultConstraintRepresentation
           
 
Field Summary
private  EventListenerList m_ellListeners
          List of listeners.
private  List m_lcrConstraints
           
 
Constructor Summary
JOCLEditorApp.DefaultOCLEditorModel()
           
 
Method Summary
 void addConstraint()
          Add a fresh constraint to the model.
 void addConstraintChangeListener(ConstraintChangeListener ccl)
          Add a listener to be informed of changes in the model.
protected  void fireConstraintAdded()
           
protected  void fireConstraintDataChanged(int nIdx, String sOldConstraint, ConstraintRepresentation crNew)
           
protected  void fireConstraintNameChanged(int nIdx, String sOldName, ConstraintRepresentation crNew)
           
protected  void fireConstraintRemoved(ConstraintRepresentation cr, int nIdx)
           
 ConstraintRepresentation getConstraintAt(int nIdx)
          Return the constraint with the specified index.
 int getConstraintCount()
          Return the number of constraints in this model.
 void removeConstraintAt(int nIdx)
          Remove the specified constraint from the model.
 void removeConstraintChangeListener(ConstraintChangeListener ccl)
          Remove a listener to be informed of changes in the model.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

m_lcrConstraints

private List m_lcrConstraints

m_ellListeners

private EventListenerList m_ellListeners
List of listeners.

Constructor Detail

JOCLEditorApp.DefaultOCLEditorModel

public JOCLEditorApp.DefaultOCLEditorModel()
Method Detail

getConstraintCount

public int getConstraintCount()
Return the number of constraints in this model.

Specified by:
getConstraintCount in interface OCLEditorModel

getConstraintAt

public ConstraintRepresentation getConstraintAt(int nIdx)
Return the constraint with the specified index.

Specified by:
getConstraintAt in interface OCLEditorModel
Parameters:
nIdx - the index of the constraint to be returned. 0 <= nIdx < getConstraintCount()

addConstraint

public void addConstraint()
Add a fresh constraint to the model.

Specified by:
addConstraint in interface OCLEditorModel

removeConstraintAt

public void removeConstraintAt(int nIdx)
Remove the specified constraint from the model.

Specified by:
removeConstraintAt in interface OCLEditorModel
Parameters:
nIdx - the index of the constraint to be removed. 0 <= nIdx < getConstraintCount()

addConstraintChangeListener

public void addConstraintChangeListener(ConstraintChangeListener ccl)
Add a listener to be informed of changes in the model.

Specified by:
addConstraintChangeListener in interface OCLEditorModel
Parameters:
ccl - the new listener

removeConstraintChangeListener

public void removeConstraintChangeListener(ConstraintChangeListener ccl)
Remove a listener to be informed of changes in the model.

Specified by:
removeConstraintChangeListener in interface OCLEditorModel
Parameters:
ccl - the listener to be removed

fireConstraintRemoved

protected void fireConstraintRemoved(ConstraintRepresentation cr,
                                     int nIdx)

fireConstraintAdded

protected void fireConstraintAdded()

fireConstraintDataChanged

protected void fireConstraintDataChanged(int nIdx,
                                         String sOldConstraint,
                                         ConstraintRepresentation crNew)

fireConstraintNameChanged

protected void fireConstraintNameChanged(int nIdx,
                                         String sOldName,
                                         ConstraintRepresentation crNew)

Dresden OCL Toolkit

Submit a bug
Developed at the Dresden University of Technology.
This software is published under the GNU Lesser General Public License.