Class ncsa.horizon.viewer.GraphicsSelectionImageCanvas
All Packages  Class Hierarchy  This Package  Previous  Next  Index

Class ncsa.horizon.viewer.GraphicsSelectionImageCanvas

java.lang.Object
   |
   +----java.awt.Component
           |
           +----java.awt.Canvas
                   |
                   +----ncsa.horizon.awt.ImageCanvas
                           |
                           +----ncsa.horizon.viewer.GraphicsSelectionImageCanvas

public class GraphicsSelectionImageCanvas
extends ImageCanvas
implements Guiedable
I function as a SelectionArea which listens to mouse moving and selection events. I keep a reference to SelectionData and update it if new mouse events come. The obervers of the SelectionData will act upon being notified.

I am a decorator of GraphcisSelectionImpl. So, I implement all the methods of GraphcisSelectionImpl. Also, I can share the same SelectionData with other SelectionArea. But, I am not a SelectionData observer. So, my SelectionData is altered by other SelectionArea, some SelectionData observer such as a SelectionViewershould notify me, ie, it should call my setBoxSelection method and etc.


Constructor Index

 o GraphicsSelectionImageCanvas(int, int)

Method Index

 o getBoxSelection()
 o getGui()
 o getLineSelection()
 o getPixelSelection()
 o getSelectionData()
 o isBoxSelectionVisible()
 o isLineSelectionVisible()
 o isPixelSelectionVisible()
 o mouseDown(Event, int, int)
process selection requests
 o mouseDrag(Event, int, int)
process a box selection request
 o mouseMove(Event, int, int)
 o mouseUp(Event, int, int)
mouse position changed.
 o setBoxSelection(int, int, int, int)
 o setBoxSelection(Rectangle)
 o setLineSelection(int, int, int, int)
 o setLineSelection(Line)
 o setPixelSelection(int, int)
 o setPixelSelection(Point)
 o setSliceSelection(Slice, ImageDisplayMap)
 o setVoxelSelection(Voxel, ImageDisplayMap)
 o showBoxSelection(boolean)
 o showLineSelection(boolean)
 o showPixelSelection(boolean)
 o toggleBoxSelection()
 o toggleLineSelection()
 o togglePixelSelection()
 o tryPaint(Graphics)
Redraw.

Constructors

 o GraphicsSelectionImageCanvas
  public GraphicsSelectionImageCanvas(int width,
                                      int height)

Methods

 o getGui
  public Component[] getGui()
 o getSelectionData
  public SelectionData getSelectionData()
 o getBoxSelection
  public Rectangle getBoxSelection()
 o getLineSelection
  public Line getLineSelection()
 o getPixelSelection
  public Point getPixelSelection()
 o isBoxSelectionVisible
  public boolean isBoxSelectionVisible()
 o isLineSelectionVisible
  public boolean isLineSelectionVisible()
 o isPixelSelectionVisible
  public boolean isPixelSelectionVisible()
 o mouseDown
  public boolean mouseDown(Event evt,
                           int x,
                           int y)
process selection requests
Overrides:
mouseDown in class Component
 o mouseDrag
  public boolean mouseDrag(Event evt,
                           int x,
                           int y)
process a box selection request
Overrides:
mouseDrag in class Component
 o mouseMove
  public boolean mouseMove(Event event,
                           int x,
                           int y)
Overrides:
mouseMove in class Component
 o mouseUp
  public boolean mouseUp(Event event,
                         int x,
                         int y)
mouse position changed.
Overrides:
mouseUp in class Component
 o setBoxSelection
  public void setBoxSelection(int x1,
                              int y1,
                              int x2,
                              int y2)
 o setBoxSelection
  public void setBoxSelection(Rectangle box)
 o setLineSelection
  public void setLineSelection(int x1,
                               int y1,
                               int x2,
                               int y2)
 o setLineSelection
  public void setLineSelection(Line line)
 o setPixelSelection
  public void setPixelSelection(int x,
                                int y)
 o setPixelSelection
  public void setPixelSelection(Point pixel)
 o setSliceSelection
  public void setSliceSelection(Slice slice,
                                ImageDisplayMap pixelMap)
 o setVoxelSelection
  public synchronized void setVoxelSelection(Voxel voxel,
                                             ImageDisplayMap pixelMap)
 o showBoxSelection
  public void showBoxSelection(boolean b)
 o showLineSelection
  public void showLineSelection(boolean b)
 o showPixelSelection
  public void showPixelSelection(boolean b)
 o toggleBoxSelection
  public void toggleBoxSelection()
 o toggleLineSelection
  public void toggleLineSelection()
 o togglePixelSelection
  public void togglePixelSelection()
 o tryPaint
  protected boolean tryPaint(Graphics g)
Redraw.
Overrides:
tryPaint in class ImageCanvas

All Packages  Class Hierarchy  This Package  Previous  Next  Index