jview
Class LutIcon

java.lang.Object
  extended by jview.LutIcon
All Implemented Interfaces:
Icon

public class LutIcon
extends Object
implements Icon

An icon that uses a look-up table for false-color images to show itself


Nested Class Summary
static class LutIcon.Show
          Test class for display.
 
Field Summary
static String ACTIONCOMMAND
          The action-event command for continuous-exposure button.
private  int[] buffer
          The data buffer that is modified when a new LUT is assigned.
static int DEFHEIGHT
          The default icon size height.
static int DEFWIDTH
          The default icon width.
private  MemoryImageSource mis
          Our color model is 3-byte RGB.
private  Dimension size
          This icon is customizable in size, but fix sized once constructed.
 
Constructor Summary
LutIcon()
          Constructs a new brightness icon with the default size.
LutIcon(int width, int height)
          Constructs a new brightness icon with the given, quadratic size.
 
Method Summary
 void applyLookupTable(LookupTable lut)
          Applies a new lookup-table.
 int getIconHeight()
          The height of the icon equals the size specified on construct.
 int getIconWidth()
          The width of the icon equals the size specified on construct.
 void paintIcon(Component button, Graphics g, int x, int y)
          Paints the icon.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ACTIONCOMMAND

public static final String ACTIONCOMMAND
The action-event command for continuous-exposure button.

See Also:
Constant Field Values

DEFHEIGHT

public static final int DEFHEIGHT
The default icon size height.

See Also:
Constant Field Values

DEFWIDTH

public static final int DEFWIDTH
The default icon width.

See Also:
Constant Field Values

size

private Dimension size
This icon is customizable in size, but fix sized once constructed.


buffer

private int[] buffer
The data buffer that is modified when a new LUT is assigned.


mis

private MemoryImageSource mis
Our color model is 3-byte RGB.

Constructor Detail

LutIcon

public LutIcon()
Constructs a new brightness icon with the default size.


LutIcon

public LutIcon(int width,
               int height)
Constructs a new brightness icon with the given, quadratic size.

Method Detail

getIconWidth

public int getIconWidth()
The width of the icon equals the size specified on construct.

Specified by:
getIconWidth in interface Icon

getIconHeight

public int getIconHeight()
The height of the icon equals the size specified on construct.

Specified by:
getIconHeight in interface Icon

paintIcon

public void paintIcon(Component button,
                      Graphics g,
                      int x,
                      int y)
Paints the icon.

Specified by:
paintIcon in interface Icon

applyLookupTable

public void applyLookupTable(LookupTable lut)
Applies a new lookup-table. We convert our grays to new integers using the lookup table and update our display.