ini.trakem2.display
Class ContrastAdjustmentMode

java.lang.Object
  extended by ini.trakem2.display.GroupingMode
      extended by ini.trakem2.display.ContrastAdjustmentMode
All Implemented Interfaces:
Mode

public class ContrastAdjustmentMode
extends GroupingMode


Nested Class Summary
 
Nested classes/interfaces inherited from class ini.trakem2.display.GroupingMode
GroupingMode.GroupedGraphicsSource, GroupingMode.Painter, GroupingMode.PatchRange, GroupingMode.SimpleThread
 
Field Summary
 
Fields inherited from class ini.trakem2.display.GroupingMode
display, gs, layer, magnification, originalPatches, painter, ranges, screenPatchRanges, srcRect, updater
 
Constructor Summary
ContrastAdjustmentMode(Display display, java.util.List<Displayable> selected)
           
 
Method Summary
 boolean apply()
           
 boolean cancel()
           
protected  GroupingMode.GroupedGraphicsSource createGroupedGraphicSource()
           
protected  ini.trakem2.display.ContrastAdjustmentMode.ScreenPatchRange createScreenPathRange(GroupingMode.PatchRange range, java.awt.Rectangle srcRect, double magnification)
           
protected  void doPainterUpdate(java.awt.Rectangle r, double m)
           
 boolean isDragging()
           
 void mouseDragged(java.awt.event.MouseEvent me, int x_p, int y_p, int x_d, int y_d, int x_d_old, int y_d_old)
           
 void mousePressed(java.awt.event.MouseEvent me, int x_p, int y_p, double magnification)
           
 void mouseReleased(java.awt.event.MouseEvent me, int x_p, int y_p, int x_d, int y_d, int x_r, int y_r)
           
 
Methods inherited from class ini.trakem2.display.GroupingMode
canChangeLayer, canPan, canZoom, getGraphicsSource, getRepaintBounds, initThreads, magnificationUpdated, quitThreads, redoOneStep, srcRectUpdated, undoOneStep
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ContrastAdjustmentMode

public ContrastAdjustmentMode(Display display,
                              java.util.List<Displayable> selected)
                       throws java.lang.Exception
Throws:
java.lang.Exception
Method Detail

doPainterUpdate

protected void doPainterUpdate(java.awt.Rectangle r,
                               double m)
Specified by:
doPainterUpdate in class GroupingMode
Parameters:
r - The srcRect
m - The magnification

createGroupedGraphicSource

protected GroupingMode.GroupedGraphicsSource createGroupedGraphicSource()
Specified by:
createGroupedGraphicSource in class GroupingMode

createScreenPathRange

protected ini.trakem2.display.ContrastAdjustmentMode.ScreenPatchRange createScreenPathRange(GroupingMode.PatchRange range,
                                                                                            java.awt.Rectangle srcRect,
                                                                                            double magnification)
Specified by:
createScreenPathRange in class GroupingMode

mousePressed

public void mousePressed(java.awt.event.MouseEvent me,
                         int x_p,
                         int y_p,
                         double magnification)

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent me,
                         int x_p,
                         int y_p,
                         int x_d,
                         int y_d,
                         int x_d_old,
                         int y_d_old)

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent me,
                          int x_p,
                          int y_p,
                          int x_d,
                          int y_d,
                          int x_r,
                          int y_r)

isDragging

public boolean isDragging()

apply

public boolean apply()

cancel

public boolean cancel()
Specified by:
cancel in interface Mode
Overrides:
cancel in class GroupingMode