public class TrackScheme extends AbstractTrackMateModelView
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_COLOR |
static String |
INFO_TEXT |
static String |
KEY |
displaySettings, model, selectionModel
Constructor and Description |
---|
TrackScheme(Model model,
SelectionModel selectionModel,
DisplaySettings displaySettings) |
Modifier and Type | Method and Description |
---|---|
protected void |
addEdgeManually(com.mxgraph.model.mxCell cell)
This method is called when the user has created manually an edge in the
graph, by dragging a link between two spot cells.
|
void |
captureDecorated() |
void |
captureUndecorated() |
void |
centerViewOn(Spot spot)
Centers the view on the given spot.
|
void |
clear()
Removes any overlay (for spots or tracks) from this displayer.
|
void |
doTrackLayout() |
void |
doTrackStyle() |
JGraphXAdapter |
getGraph()
Returns the
JGraphXAdapter that serves as a model for the graph
displayed in this frame. |
TrackSchemeGraphLayout |
getGraphLayout()
Returns the graph layout in charge of arranging the cells on the graph.
|
TrackSchemeFrame |
getGUI()
Returns the GUI frame controlled by this class.
|
String |
getKey()
Returns the unique key that identifies this view.
|
Model |
getModel()
Returns the model displayed in this view.
|
int |
getNextFreeColumn(int frame) |
SelectionModel |
getSelectionModel() |
int |
getUnlaidSpotColumn() |
void |
linkSpots()
Create links between all the spots currently in the
Model
selection. |
void |
modelChanged(ModelChangeEvent event)
Used to catch spot creation events that occurred elsewhere, for instance
by manual editing in the
AbstractTrackMateModelView . |
void |
refresh()
Refreshes the displayer display with current model.
|
void |
removeSelectedCells()
Removes the cell selected by the user in the GUI.
|
void |
render()
Initializes this displayer and render it according to its concrete
implementation.
|
void |
resetZoom() |
void |
selectionChanged(SelectionChangeEvent event)
This needs to be overridden for concrete implementation to display
selection.
|
void |
selectTrack(Collection<com.mxgraph.model.mxCell> vertices,
Collection<com.mxgraph.model.mxCell> edges,
int direction) |
void |
setSpotImageUpdater(SpotImageUpdater spotImageUpdater) |
void |
toggleDisplayDecoration() |
boolean |
toggleLinking()
Toggles whether drag-&-drop linking is allowed.
|
boolean |
toggleThumbnail()
Toggles whether thumbnail capture is enabled.
|
void |
zoomIn() |
void |
zoomOut() |
public static final String INFO_TEXT
public static final String DEFAULT_COLOR
public static final String KEY
public TrackScheme(Model model, SelectionModel selectionModel, DisplaySettings displaySettings)
public void setSpotImageUpdater(SpotImageUpdater spotImageUpdater)
public SelectionModel getSelectionModel()
public int getUnlaidSpotColumn()
public int getNextFreeColumn(int frame)
public TrackSchemeFrame getGUI()
public JGraphXAdapter getGraph()
JGraphXAdapter
that serves as a model for the graph
displayed in this frame.public TrackSchemeGraphLayout getGraphLayout()
protected void addEdgeManually(com.mxgraph.model.mxCell cell)
cell
- the mxCell of the edge that has been manually created.public void selectionChanged(SelectionChangeEvent event)
AbstractTrackMateModelView
selectionChanged
in interface SelectionChangeListener
selectionChanged
in class AbstractTrackMateModelView
event
- the event that characterizes the change.public void centerViewOn(Spot spot)
TrackMateModelView
public void modelChanged(ModelChangeEvent event)
AbstractTrackMateModelView
.
We have to deal with the graph modification ourselves here, because the
Model
model holds a non-listenable JGraphT instance. A
modification made to the model would not be reflected on the graph here.
event
- the ModelChangeEvent
.public void render()
TrackMateModelView
public void refresh()
TrackMateModelView
public void clear()
TrackMateModelView
public Model getModel()
TrackMateModelView
getModel
in interface TrackMateModelView
getModel
in class AbstractTrackMateModelView
public boolean toggleLinking()
public boolean toggleThumbnail()
public void zoomIn()
public void zoomOut()
public void resetZoom()
public void doTrackStyle()
public void doTrackLayout()
public void captureUndecorated()
public void captureDecorated()
public void toggleDisplayDecoration()
public void linkSpots()
Model
selection. We update simultaneously the Model
and the
JGraphXAdapter
.public void removeSelectedCells()
public void selectTrack(Collection<com.mxgraph.model.mxCell> vertices, Collection<com.mxgraph.model.mxCell> edges, int direction)
public String getKey()
TrackMateModelView
Careful: this key must be the same that for the
ViewFactory
that can instantiates this view. This is to
facilitate saving/loading.
Copyright © 2015–2021 Fiji. All rights reserved.