    All Packages  Class Hierarchy  This Package  Previous  Next  Index

# Class ncsa.horizon.viewer.Viewer

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

public class Viewer
extends Panel
implements Cloneable

Abstract Panel class to display Viewable objects. Such a Panel usually contains a display area (often a Canvas object) to which Image objects extracted from Viewables are painted. The Viewer methods assume a single Viewable as being the "current" one; however, it is concievabe that many viewable objects might be visualized in the display area of the panel.

##

Viewer()

##

addViewable(Viewable)
  This method adds a reference to a viewable object.
clone()
  create a clone of this Viewer Panel
displaySlice()
  display a default slice of the current Viewable
displaySlice(Slice)
  display a slice from the current Viewable data, or do nothing if the current Viewable is not set.
getDisplaySize()
  This method returns the size of the region that displays a Viewable
getViewable()
  Return a reference to the current Viewable object, or null if none are attached to this Viewer.
getViewSlice()
  return a Slice object describing the data currently being viewed, or null if there is no Viewable currently being viewed.

##

Viewer

      public Viewer()

##

addViewable

      public abstract void addViewable(Viewable image)

  This method adds a reference to a viewable object.
  Parameters:
    image - the Viewable object to be added

getViewable

      public abstract Viewable getViewable()

  Return a reference to the current Viewable object, or null if none are attached to this Viewer.

displaySlice

      public abstract void displaySlice(Slice sl)

  display a slice from the current Viewable data, or do nothing if the current Viewable is not set. A null slice means display the default slice (equivalent to displayViewable());

displaySlice

      public void displaySlice()

  display a default slice of the current Viewable

getViewSlice

      public abstract Slice getViewSlice()

  return a Slice object describing the data currently being viewed, or null if there is no Viewable currently being viewed.

getDisplaySize

      public abstract Dimension getDisplaySize()

  This method returns the size of the region that displays a Viewable
  Returns:
    Dimension of the compoonent
  See Also:
    Dimension, size()

clone

      public Object clone() throws CloneNotSupportedException

  create a clone of this Viewer Panel
  Overrides:
    clone in class Object

    All Packages  Class Hierarchy  This Package  Previous  Next  Index