com.xinapse.multisliceimage
Class PreviewIcon

java.lang.Object
  extended by com.xinapse.multisliceimage.PreviewIcon
All Implemented Interfaces:
javax.swing.Icon

public class PreviewIcon
extends java.lang.Object
implements javax.swing.Icon

An Icon that is used to preview a LoadableImage (UNC, Analyze, NIFTI, DICOM).


Constructor Summary
PreviewIcon(java.lang.String imageTypeString, int nCols, int nRows, int nSlices, int nFrames)
          Create a PreviewIcon.
 
Method Summary
 int getIconHeight()
          Returns the icon's width.
 int getIconWidth()
          Returns the icon's height.
 void paintIcon(java.awt.Component c, java.awt.Graphics g, int x, int y)
          Draw the icon at the specified location.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

PreviewIcon

public PreviewIcon(java.lang.String imageTypeString,
                   int nCols,
                   int nRows,
                   int nSlices,
                   int nFrames)
Create a PreviewIcon.

Parameters:
imageTypeString - a String describing the image type (e.g., "UNC").
nCols - the number of image columns.
nRows - the number of image rows.
nSlices - the number of image slice.
nFrames - the number of image frames.
Method Detail

getIconWidth

public int getIconWidth()
Returns the icon's height.

Specified by:
getIconWidth in interface javax.swing.Icon

getIconHeight

public int getIconHeight()
Returns the icon's width.

Specified by:
getIconHeight in interface javax.swing.Icon

paintIcon

public void paintIcon(java.awt.Component c,
                      java.awt.Graphics g,
                      int x,
                      int y)
Draw the icon at the specified location. Icon implementations may use the Component argument to get properties useful for painting, e.g. the foreground or background color.

Specified by:
paintIcon in interface javax.swing.Icon


Copyright 2006-2011 Xinapse Systems Limited. All Rights Reserved.