|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sourceforge.toscanaj.controller.fca.DiagramController
This class encapsulates all code for handling the diagrams and filtering the objects left after zooming. This is implemented as singleton, use getController() to access the only instance. The inner class DiagramHistory can be used to be inserted into a JList for displaying purposes.
Constructor Summary | |
DiagramController()
|
Method Summary | |
void |
addDiagram(Diagram2D diagram)
Adds a diagram to the history. |
void |
addObserver(ChangeObserver observer)
Implements ChangeObservable.addObserver(ChangeObserver). |
void |
back()
Goes one step back in the history. |
static DiagramController |
getController()
Returns the only instance of this class. |
Diagram2D |
getCurrentDiagram()
Returns the current diagram to be displayed. |
DiagramHistory |
getDiagramHistory()
Returns the history as list model. |
protected Diagram2D |
getNestedDiagram(int pos)
Returns a nested diagram using the list of current diagrams. |
protected Diagram2D |
getSimpleDiagram(int pos)
Returns a simple (flat) diagram created from the position in the list of current diagrams. |
boolean |
hasFutureDiagrams()
Returns true if there a still diagrams to visit. |
void |
next(Concept zoomedConcept)
Moves forward to the next diagram. |
protected void |
notifyObservers()
Notifies all observers of an update that changes the current diagram. |
void |
removeLastDiagram()
Removes the last diagram from the list. |
void |
removeObserver(ChangeObserver observer)
Implements ChangeObservable.removeObserver(ChangeObserver). |
void |
reset()
Removes all diagrams: past, current and future from the history. |
void |
setNestingLevel(int level)
Sets the number of diagrams used for nesting. |
boolean |
undoIsPossible()
Returns true if an undo step can be made. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DiagramController()
Method Detail |
public static DiagramController getController()
public void setNestingLevel(int level)
public DiagramHistory getDiagramHistory()
public boolean undoIsPossible()
back()
public void addDiagram(Diagram2D diagram)
public void removeLastDiagram()
public void reset()
public boolean hasFutureDiagrams()
public void next(Concept zoomedConcept)
back()
public void back()
next(Concept)
,
undoIsPossible()
public Diagram2D getCurrentDiagram()
protected Diagram2D getSimpleDiagram(int pos)
protected Diagram2D getNestedDiagram(int pos)
public void addObserver(ChangeObserver observer)
addObserver
in interface ChangeObservable
public void removeObserver(ChangeObserver observer)
removeObserver
in interface ChangeObservable
protected void notifyObservers()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |