    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class ncsa.horizon.viewer.SelectionViewer

    java.lang.Object
       |
       +----java.awt.Component
               |
               +----java.awt.Container
                       |
                       +----java.awt.Panel
                               |
                               +----ncsa.horizon.viewer.Viewer
                                       |
                                       +----ncsa.horizon.viewer.SelectionViewer

public class SelectionViewer
extends Viewer
implements Cloneable

a Viewer Panel (i.e. a Panel for displaying Viewable objects) that allows the user to select pixels and subregions.

##

SelectionViewer()

##

getBoxSelection()
  get the current selected display box.
getLineSelection()
  get the current selected display Line.
getPixelSelection()
  get the current selected display pixel.
getSliceSelection()
  return the current selected Slice, or null if there is no current Viewable;
getVoxelSelection()
  return the current selected Voxel, or null if there is no current Viewable.
setBoxSelection(int, int, int, int)
  set the current selected display box.
setLineSelection(int, int, int, int)
  set the current selected display line.
setPixelSelection(int, int)
  set the current selected display pixel.
setSliceSelection(Volume)
  set the current selected Slice to the given Volume as projected onto the currently displayed Slice, or do nothing if there is no current Viewable.
setVoxelSelection(Voxel)
  set the current selected Voxel to the one given as projected onto the currently displayed Slice, or do nothing if there is no current Viewable.

##

SelectionViewer

      public SelectionViewer()

##

getPixelSelection

      public abstract Point getPixelSelection()

  get the current selected display pixel.

setPixelSelection

      public abstract void setPixelSelection(int x,
                                             int y)

  set the current selected display pixel. The location is measured in real display (i.e. screen) pixels relative to the upper left hand corner.

getBoxSelection

      public abstract Rectangle getBoxSelection()

  get the current selected display box.

setBoxSelection

      public abstract void setBoxSelection(int x1,
                                           int y1,
                                           int x2,
                                           int y2)

  set the current selected display box. The locations are measured in real display (i.e. screen) pixels relative to the upper left hand corner.
  Parameters:
    x1,y1 - the location of one vertex of the selected box
    x2,y2 - the location of the vertex of the selected box opposite to the one given by x1,y1

getLineSelection

      public abstract Rectangle getLineSelection()

  get the current selected display Line.

setLineSelection

      public abstract void setLineSelection(int x1,
                                            int y1,
                                            int x2,
                                            int y2)

  set the current selected display line. The locations are measured in real display (i.e. screen) pixels relative to the upper left hand corner.
  Parameters:
    x1,y1 - the location of the start of the line
    x2,y2 - the location of the end of the line

getVoxelSelection

      public abstract Voxel getVoxelSelection()

  return the current selected Voxel, or null if there is no current Viewable.

setVoxelSelection

      public abstract void setVoxelSelection(Voxel vox)

  set the current selected Voxel to the one given as projected onto the currently displayed Slice, or do nothing if there is no current Viewable.

getSliceSelection

      public abstract Slice getSliceSelection()

  return the current selected Slice, or null if there is no current Viewable;

setSliceSelection

      public abstract void setSliceSelection(Volume vol)

  set the current selected Slice to the given Volume as projected onto the currently displayed Slice, or do nothing if there is no current Viewable.

    All Packages  Class Hierarchy  This Package  Previous  Next  Index