|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectapollo.editor.ChangeList
public class ChangeList
TransactionManager does the real coalescing for saving transactions.
This is more like the place where events are stored before firing now.
Renamed ChangeList (used to be AnnotationChangeCoalescer)
The AnnotationChangeCoalescer holds all the AnnotationChangeEvents for
the current edit along with a representation of the
feature tree before the edit began.
NOTE: THIS CLASS IS NOT FULLY IMPLEMENTED.
As edits are added to the AnnotationChangeCoalescer it checks to see
if they can be coalesced - for example if you delete all the
exons in a transcript and then delete the transcript the edit
can be coalesced into a delete transcript - all the delete
exon AnnotationChangeEvents can be removed from the changes
vector.
A new AnnotationChangeCoalescer should be created at the start of each
edit in the AnnotationEditor because it is important that
the tree representing the underlying features (the origTree)
is current. After that it is simply a matter of adding changes
using addChanges. At the end of the edit executeChanges is
called to send the AnnotationChangeEvents to all the listeners.
Remember that the Drawable tree will be in tht origTree state
until executeChanges is called. This is VERY important for
deciding which edits are necessary.
delete exon
Check if its in the add list
Look to see if any of the current parents of the exon have
been deleted.
delete transcript
Check if its in the add list
Look to see if any of the current parents of the transcript
have been deleted.
Look to see if any of the previous children of the
transcript have been deleted - remove those.
delete gene
Check if its in the add list
Look to see if any of the previous children of the
gene have been deleted - remove those.
I dont think any of the add checks are currently happening, just the
delete checks.
add exon
Add to add list
Look to see if any of the current parents of the exon have
already been added.
Could do error check if add to parents which have already
been deleted.
add transcript
Add to add list
add gene
Add to add list
other exon
other transcript
other gene
The only reason i can see that this implements ControlledObjectI is so
SyntenyLinkPanel can avoid firing at its controller - but ACC is not even
the event source - so actually I dont think being a ControlledObjectI serves any
purpose as getControllerWindow is null.
Not sure about this but this could eventually just be a list of transactions(?)
and convert to change events at firing time.
| Constructor Summary | |
|---|---|
ChangeList(Controller c)
for gene edit panel |
|
| Method Summary | |
|---|---|
void |
addChange(AnnotationChangeEvent evt)
Add change to end of changes list |
void |
addChangeList(ChangeList changeList)
|
void |
executeChanges()
calls coalesceChanges which seems to be broken. |
Controller |
getController()
Gets the Controller for the object |
java.lang.Object |
getControllerWindow()
Shouldnt this return Window - would we ever want a non-window? |
boolean |
needsAutoRemoval()
Since getControllerWindow is null, needsAutoRemoval is meaningless |
void |
setController(Controller c)
Sets the Controller for the object |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ChangeList(Controller c)
| Method Detail |
|---|
public Controller getController()
ControlledObjectI
getController in interface ControlledObjectIpublic void setController(Controller c)
ControlledObjectI
setController in interface ControlledObjectIpublic java.lang.Object getControllerWindow()
ControlledObjectI
getControllerWindow in interface ControlledObjectIpublic boolean needsAutoRemoval()
needsAutoRemoval in interface ControlledObjectIpublic void addChange(AnnotationChangeEvent evt)
public void addChangeList(ChangeList changeList)
public void executeChanges()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||