Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD

Class ncsa.horizon.awt.color.CurveEditPanel

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Panel
                    |
                    +--ncsa.horizon.awt.color.CurveEditPanel

public class CurveEditPanel
extends java.awt.Panel
implements java.awt.event.ActionListener
a panel that supports a CurveEditCanvas and multiple editing modes

New editing modes can be added dynamically. With each new mode added with addMode(), one also supplies either a String, Image, or other component that will be wrapped in a button to be used to engage the mode.

See Also:
Serialized Form

Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Constructor Summary
CurveEditPanel(java.lang.String label)
          create a CurveEditPanel with a given label
CurveEditPanel(java.lang.String label, CurveEditMode defMode, java.lang.String modeLabel, int grwidth, int grheight)
          create a CurveEditPanel with a preferred size of the canvas containing the plot of the data.
CurveEditPanel(java.lang.String label, int[] curvedata, int start, int len, int min, int max, CurveEditMode[] modes, java.lang.String[] mlabs)
           
CurveEditPanel(java.lang.String label, int[] curvedata, int start, int len, int min, int max, int grwd, int grht)
           
CurveEditPanel(java.lang.String label, int[] curvedata, int max)
           
CurveEditPanel(java.lang.String label, int[] curvedata, int max, CurveEditMode defmode, java.lang.String modeLabel)
           
 
Method Summary
void actionPerformed(java.awt.event.ActionEvent e)
           
void addActionListener(java.awt.event.ActionListener l)
           
void addMode(CurveEditMode cem, java.lang.String name)
           
void addMode(CurveEditMode cem, java.awt.Image img)
           
void addMode(CurveEditMode cem, java.awt.Component c)
          add a editing mode
int[] getData()
          return the curve array currently being edited.
static void main(java.lang.String[] args)
           
void removeActionListener(java.awt.event.ActionListener l)
           
void repaintCurve()
          request that the curve be repainted
void setData(int[] curve, int start, int len, int min, int max)
          the curve data that will be edited by this panel
void setData(int[] curve, int max)
          the curve data that will be edited by this panel.
void setData(int[] curve)
          the curve data that will be edited by this panel.
 
Methods inherited from class java.awt.Panel
addNotify
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addNotify, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponentAt, getComponentAt, getComponent, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, paint, paramString, preferredSize, printComponents, print, processContainerEvent, processEvent, removeAll, remove, remove, removeContainerListener, removeNotify, setLayout, update, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getName, getParent, getPeer, getPreferredSize, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paint, paramString, postEvent, preferredSize, prepareImage, prepareImage, printAll, print, processComponentEvent, processEvent, processFocusEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, remove, removeComponentListener, removeFocusListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notifyAll, notify, toString, wait, wait, wait
 

Constructor Detail

CurveEditPanel

public CurveEditPanel(java.lang.String label)
create a CurveEditPanel with a given label

CurveEditPanel

public CurveEditPanel(java.lang.String label,
                      CurveEditMode defMode,
                      java.lang.String modeLabel,
                      int grwidth,
                      int grheight)
create a CurveEditPanel with a preferred size of the canvas containing the plot of the data. The panel will be larger as it contains the label and any mode buttons.
Parameters:
label - the label to identify the curve
defMode - the default (non-null) editing mode to use.
modeLabel - the mode name for the default mode
grwidth - the width of the plotting canvas. A non-positive value means use the default.
grheight - the height of the plotting canvas. A non-positive value means use the default.

CurveEditPanel

public CurveEditPanel(java.lang.String label,
                      int[] curvedata,
                      int start,
                      int len,
                      int min,
                      int max,
                      CurveEditMode[] modes,
                      java.lang.String[] mlabs)

CurveEditPanel

public CurveEditPanel(java.lang.String label,
                      int[] curvedata,
                      int start,
                      int len,
                      int min,
                      int max,
                      int grwd,
                      int grht)

CurveEditPanel

public CurveEditPanel(java.lang.String label,
                      int[] curvedata,
                      int max)

CurveEditPanel

public CurveEditPanel(java.lang.String label,
                      int[] curvedata,
                      int max,
                      CurveEditMode defmode,
                      java.lang.String modeLabel)
Method Detail

getData

public int[] getData()
return the curve array currently being edited.

setData

public void setData(int[] curve,
                    int start,
                    int len,
                    int min,
                    int max)
the curve data that will be edited by this panel
Parameters:
curve - the data array to be edited
start - the first index of the range within the curve that should be edited
len - the number of values within the curve that should be edited
min - the minimum value a curve element can have
max - the maximum value a curve element can have

setData

public void setData(int[] curve,
                    int max)
the curve data that will be edited by this panel. The entire array will be editable.
Parameters:
curve - the data array to be edited
max - the maximum value a curve element can have

setData

public void setData(int[] curve)
the curve data that will be edited by this panel. The portion of the array that can be edited will be the as the previously set array.
Parameters:
curve - the data array to be edited

addMode

public void addMode(CurveEditMode cem,
                    java.lang.String name)

addMode

public void addMode(CurveEditMode cem,
                    java.awt.Image img)

addMode

public void addMode(CurveEditMode cem,
                    java.awt.Component c)
add a editing mode

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent e)
Description copied from interface:
 
Specified by:
actionPerformed(java.awt.event.ActionEvent) in interface java.awt.event.ActionListener

addActionListener

public void addActionListener(java.awt.event.ActionListener l)

removeActionListener

public void removeActionListener(java.awt.event.ActionListener l)

repaintCurve

public void repaintCurve()
request that the curve be repainted

main

public static void main(java.lang.String[] args)

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS | NEXT CLASS FRAMES  | NO FRAMES
SUMMARY:  INNER | FIELD | CONSTR | METHOD DETAIL:  FIELD | CONSTR | METHOD