|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectapollo.gui.SelectionManager
public class SelectionManager
Controller for selection. This is only partially implemented at this point. The idea would be that this would be the controller for selection, replacing Controller for just selection (not everything else it controls. SelectionManager deals with selection and deselection where Controller only passes along selects and does not deal with deselecting when new selects come in. When SelectionManager gets a new select it does the appropriate deselecting to accompnay this. note from cvs notes that i thought would be clariflying to put here: Fixed slowness of selection in the views. When i changed selection to be model based the views were just sending out the model selected and then receiving that model and having to refind the associated view which was obviously inefficient. I managed to solve this issue and keep selection model based (rather than having drawables as the data in the SelectionItems) by attaching the drawables as selectionListeners to the SelectionItems which hold the model(SeqFeatureI) of the drawable. So the SelectionItems are told to select and deselect (by the SelectionManager via Selection) and the SelectionItems tell their drawable selection listeners to select and deselect, thus avoiding having to refind them at handleFeatureSelectionEvent. At the moment only the ApolloPanel(and its views) participate in putting selectionListeners on the SelectionItems, but clearly any other selection source could do the same, but they probably dont need to since they dont have the intense selection needs that ApolloPanel has. ApolloPanel.handleFeatureSelectionEvent doesnt search for drawables if the event source is itself. Im thinking this should be in a apollo.controller package.
| Constructor Summary | |
|---|---|
SelectionManager()
|
|
| Method Summary | |
|---|---|
void |
addToCurrentSelection(Selection newSelection)
Just adds newSelection to the current selection. |
void |
clearSelections()
clear() is called on the currently selected Selection. |
Controller |
getController()
Part of ControlledObjectI interface |
java.lang.Object |
getControllerWindow()
Part of ControlledObjectI interface. |
Selection |
getSelection()
|
boolean |
needsAutoRemoval()
Part of ControlledObjectI interface |
void |
select(FeatureList feats,
boolean exclusiveSelection,
boolean selectParents,
java.lang.Object source)
|
void |
select(Selection newSelection,
boolean exclusiveSelection,
java.lang.Object source)
Process selection of Selection |
void |
select(SeqFeatureI feat,
java.lang.Object source)
|
void |
select(java.util.Vector features,
java.lang.Object source)
|
void |
setController(Controller c)
Part of ControlledObjectI interface |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public SelectionManager()
| Method Detail |
|---|
public void select(FeatureList feats,
boolean exclusiveSelection,
boolean selectParents,
java.lang.Object source)
public void select(Selection newSelection,
boolean exclusiveSelection,
java.lang.Object source)
newSelection - Selection to add to or replace old selectionexclusiveSelection - whether to add or replace old selectionsource - source(view) of the selection, gets put in sel event
public void select(SeqFeatureI feat,
java.lang.Object source)
public void select(java.util.Vector features,
java.lang.Object source)
public void addToCurrentSelection(Selection newSelection)
public Selection getSelection()
public void clearSelections()
public void setController(Controller c)
setController in interface ControlledObjectIpublic Controller getController()
getController in interface ControlledObjectIpublic java.lang.Object getControllerWindow()
getControllerWindow in interface ControlledObjectIpublic boolean needsAutoRemoval()
needsAutoRemoval in interface ControlledObjectI
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||