ini.trakem2.display
Class GroupingMode

java.lang.Object
  extended by ini.trakem2.display.GroupingMode
All Implemented Interfaces:
Mode
Direct Known Subclasses:
ContrastAdjustmentMode, NonLinearTransformMode

public abstract class GroupingMode
extends java.lang.Object
implements Mode


Nested Class Summary
protected  class GroupingMode.GroupedGraphicsSource
           
protected  class GroupingMode.Painter
           
protected static class GroupingMode.PatchRange
           
protected static class GroupingMode.ScreenPatchRange<T>
           
protected  class GroupingMode.SimpleThread
           
 
Field Summary
protected  Display display
           
protected  GroupingMode.GroupedGraphicsSource gs
           
protected  Layer layer
           
protected  double magnification
           
protected  java.util.List<Patch> originalPatches
           
protected  GroupingMode.Painter painter
           
protected  java.util.List<GroupingMode.PatchRange> ranges
           
protected  java.util.HashMap<Paintable,GroupingMode.ScreenPatchRange<?>> screenPatchRanges
           
protected  java.awt.Rectangle srcRect
           
protected  ini.trakem2.display.GroupingMode.Updater updater
           
 
Constructor Summary
GroupingMode(Display display, java.util.List<Displayable> selected)
           
 
Method Summary
 boolean cancel()
           
 boolean canChangeLayer()
           
 boolean canPan()
           
 boolean canZoom()
           
protected abstract  GroupingMode.GroupedGraphicsSource createGroupedGraphicSource()
           
protected abstract  GroupingMode.ScreenPatchRange<?> createScreenPathRange(GroupingMode.PatchRange range, java.awt.Rectangle srcRect, double magnification)
           
protected abstract  void doPainterUpdate(java.awt.Rectangle r, double m)
           
 GraphicsSource getGraphicsSource()
           
 java.awt.Rectangle getRepaintBounds()
           
protected  void initThreads()
           
 void magnificationUpdated(java.awt.Rectangle srcRect, double magnification)
           
protected  void quitThreads()
           
 void redoOneStep()
           
 void srcRectUpdated(java.awt.Rectangle srcRect, double magnification)
           
 void undoOneStep()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface ini.trakem2.display.Mode
apply, isDragging, mouseDragged, mousePressed, mouseReleased
 

Field Detail

display

protected final Display display

layer

protected final Layer layer

updater

protected final ini.trakem2.display.GroupingMode.Updater updater

painter

protected final GroupingMode.Painter painter

srcRect

protected java.awt.Rectangle srcRect

magnification

protected double magnification

gs

protected final GroupingMode.GroupedGraphicsSource gs

originalPatches

protected final java.util.List<Patch> originalPatches

ranges

protected final java.util.List<GroupingMode.PatchRange> ranges

screenPatchRanges

protected java.util.HashMap<Paintable,GroupingMode.ScreenPatchRange<?>> screenPatchRanges
Constructor Detail

GroupingMode

public GroupingMode(Display display,
                    java.util.List<Displayable> selected)
Method Detail

initThreads

protected final void initThreads()

quitThreads

protected final void quitThreads()

createGroupedGraphicSource

protected abstract GroupingMode.GroupedGraphicsSource createGroupedGraphicSource()

createScreenPathRange

protected abstract GroupingMode.ScreenPatchRange<?> createScreenPathRange(GroupingMode.PatchRange range,
                                                                          java.awt.Rectangle srcRect,
                                                                          double magnification)

doPainterUpdate

protected abstract void doPainterUpdate(java.awt.Rectangle r,
                                        double m)
Parameters:
r - The srcRect
m - The magnification

canChangeLayer

public boolean canChangeLayer()
Specified by:
canChangeLayer in interface Mode

canZoom

public boolean canZoom()
Specified by:
canZoom in interface Mode

canPan

public boolean canPan()
Specified by:
canPan in interface Mode

srcRectUpdated

public void srcRectUpdated(java.awt.Rectangle srcRect,
                           double magnification)
Specified by:
srcRectUpdated in interface Mode

magnificationUpdated

public void magnificationUpdated(java.awt.Rectangle srcRect,
                                 double magnification)
Specified by:
magnificationUpdated in interface Mode

redoOneStep

public void redoOneStep()
Specified by:
redoOneStep in interface Mode

undoOneStep

public void undoOneStep()
Specified by:
undoOneStep in interface Mode

cancel

public boolean cancel()
Specified by:
cancel in interface Mode

getRepaintBounds

public java.awt.Rectangle getRepaintBounds()
Specified by:
getRepaintBounds in interface Mode

getGraphicsSource

public GraphicsSource getGraphicsSource()
Specified by:
getGraphicsSource in interface Mode