|
Dresden OCL Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecttudresden.ocl.sql.SimpleOCLEditorModel
A simple implementation of the OCLEditorModel interface to serve the requirements of the OCL2SQL tool.
Nested Class Summary | |
class |
SimpleOCLEditorModel.SimpleConstraintRepresentation
A simple implementation of the ConstraintRepresentation interface. |
Field Summary | |
(package private) static long |
serialVersionUID
To control serialization. |
private List |
theConstraints
List of all constraints. |
private EventListenerList |
theEventListeners
List of listeners. |
private ModelFacade |
theModelFacade
A ModelFacade for typechecking. |
Constructor Summary | |
SimpleOCLEditorModel()
Creates new SimpleOCLEditorModel. |
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,
ConstraintRepresentation crOld,
ConstraintRepresentation crNew)
|
protected void |
fireConstraintNameChanged(int nIdx,
ConstraintRepresentation crOld,
ConstraintRepresentation crNew)
|
protected void |
fireConstraintRemoved(ConstraintRepresentation mc,
int nIdx)
|
ConstraintRepresentation |
getConstraintAt(int nIdx)
Return the constraint with the specified index. |
int |
getConstraintCount()
Return the number of constraints in this model. |
private void |
readObject(ObjectInputStream in)
Implementation of the Serialization interface to avoid the serialization of the event listeners. |
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. |
void |
setModelFacade(ModelFacade mf)
A ModelFacade for the OCL compiler. |
private void |
writeObject(ObjectOutputStream out)
Implementation of the Serialization interface to avoid the serialization of the event listeners. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static final long serialVersionUID
private List theConstraints
private EventListenerList theEventListeners
private ModelFacade theModelFacade
Constructor Detail |
public SimpleOCLEditorModel()
Method Detail |
public void addConstraint()
addConstraint
in interface OCLEditorModel
public void addConstraintChangeListener(ConstraintChangeListener ccl)
addConstraintChangeListener
in interface OCLEditorModel
ccl
- the new listenerpublic ConstraintRepresentation getConstraintAt(int nIdx)
getConstraintAt
in interface OCLEditorModel
nIdx
- the index of the constraint to be returned. 0 <= nIdx < getConstraintCount()
public int getConstraintCount()
getConstraintCount
in interface OCLEditorModel
public void removeConstraintAt(int nIdx)
removeConstraintAt
in interface OCLEditorModel
nIdx
- the index of the constraint to be removed. 0 <= nIdx < getConstraintCount()
public void removeConstraintChangeListener(ConstraintChangeListener ccl)
removeConstraintChangeListener
in interface OCLEditorModel
ccl
- the listener to be removedprotected void fireConstraintRemoved(ConstraintRepresentation mc, int nIdx)
protected void fireConstraintAdded()
protected void fireConstraintDataChanged(int nIdx, ConstraintRepresentation crOld, ConstraintRepresentation crNew)
protected void fireConstraintNameChanged(int nIdx, ConstraintRepresentation crOld, ConstraintRepresentation crNew)
private void writeObject(ObjectOutputStream out) throws IOException
IOException
private void readObject(ObjectInputStream in) throws IOException, ClassNotFoundException
IOException
ClassNotFoundException
public void setModelFacade(ModelFacade mf)
|
Dresden OCL Toolkit | |||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |