|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.sf.sdedit.diagram.FragmentManager
public final class FragmentManager
A FragmentManager is responsible for processing the fragments occurring in a diagram. During the process, the FragmentManager sets a fragment in three states, successively:
| Constructor Summary | |
|---|---|
FragmentManager(Diagram diagram)
Creates a new FragmentManager responsible for the fragments occurring in the given diagram. |
|
| Method Summary | |
|---|---|
void |
addSequenceElement(SequenceElement elem)
Adds the given sequence element to all open and closing fragments. |
void |
clearLabels()
This method should be called when for all fragments corresponding to getFragmentLabels() there has been a Fragment object created. |
void |
clearSectionLabel()
This method should be called when a new section has been just created. |
void |
finishFragments()
Sets all the closing fragments into finished state. |
void |
finishFragmentsNotIncluding(Answer answer)
Sets the closing fragments that do not include the message to which the given answer is the answer into finished state. |
LinkedList<String> |
getFragmentLabels()
Returns the labels for the fragments for which we have already seen an open command (see DiagramDataProvider.openFragment()) but for which we have not yet created a Fragment representation. |
String |
getFragmentSectionLabel()
When we have just seen the beginning of a new fragment section, this method returns its label, otherwise null. |
void |
openFragments()
Creates Fragment objects for all pending fragment labels in getFragmentLabels() and adds them to the list of open fragments. |
boolean |
openFragmentsExist()
Returns a flag indicating if there are fragments for which we have not seen a close command yet (see DiagramDataProvider.closeFragment()). |
boolean |
readFragments()
This method uses the provider of the diagram data (see DiagramDataProvider, Diagram.getDataProvider() and takes some action if the provider says that a fragment is opened or closed, or if the beginning of a new section is specified. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public FragmentManager(Diagram diagram)
diagram - the given diagram| Method Detail |
|---|
public LinkedList<String> getFragmentLabels()
public String getFragmentSectionLabel()
public void clearLabels()
public void clearSectionLabel()
public boolean readFragments()
throws SyntaxError
SyntaxError - if the fragment specification is syntactically wrongpublic void openFragments()
public boolean openFragmentsExist()
public void finishFragments()
public void finishFragmentsNotIncluding(Answer answer)
answer - an answerpublic void addSequenceElement(SequenceElement elem)
elem - a sequence element to be added to all open and closing
fragments
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||