| Package
| Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS
FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD

## Class pointToolbar

    java.lang.Object
      |
      +--java.awt.Component
            |
            +--java.awt.Canvas
                  |
                  +--pointToolbar

All Implemented Interfaces:
  javax.accessibility.Accessible, java.awt.event.AdjustmentListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.awt.event.MouseListener, java.io.Serializable

class pointToolbar
extends java.awt.Canvas
implements java.awt.event.AdjustmentListener, java.awt.event.MouseListener

This class deals with the toolbar that gets substituted to that of ImageJ.

Field Summary
`private static java.awt.Color` | `brighter`
`private int` | `currentMode`
`private int` | `currentTool`
`private static java.awt.Color` | `darker`
`private boolean[]` | `down`
`private static java.awt.Color` | `evenDarker`
`private java.awt.Graphics` | `g`
`private static java.awt.Color` | `gray`
`private ImagePlus` | `imp`
`private pointToolbar` | `instance`
`private long` | `mouseDownTime`
`private static int` | `NUM_TOOLS`
`private static int` | `OFFSET`
`private pointAction` | `pa`
`private pointHandler[]` | `ph`
`private Toolbar` | `previousInstance`
`private java.awt.Scrollbar` | `scrollbar`
`private static int` | `SIZE`
`private int` | `x`
`private int` | `xOffset`
`private int` | `y`
`private int` | `yOffset`

Fields inherited from class java.awt.Canvas
``

Fields inherited from class java.awt.Component
`BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT`

Fields inherited from interface java.awt.image.ImageObserver
`ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH`

Constructor Summary
`pointToolbar(Toolbar previousToolbar)` This constructor substitutes ImageJ's toolbar by that of PointPicker_.

Method Summary
`void` | `adjustmentValueChanged(java.awt.event.AdjustmentEvent e)` Listen to `AdjustmentEvent` events.
`private void` | `cleanUpListeners()`
`private void` | `d(int x, int y)`
`private void` | `drawButton(java.awt.Graphics g, int tool)`
`private void` | `fill3DRect(java.awt.Graphics g, int x, int y, int width, int height, boolean raised)`
`int` | `getCurrentMode()` Return the index of the mode that is currently activated.
`int` | `getCurrentTool()` Return the index of the tool that is currently activated.
`void` | `installListeners(pointAction pa)` Setup the various listeners.
`private void` | `m(int x, int y)`
`void` | `mouseClicked(java.awt.event.MouseEvent e)` Listen to `mouseClicked` events.
`void` | `mouseEntered(java.awt.event.MouseEvent e)` Listen to `mouseEntered` events.
`void` | `mouseExited(java.awt.event.MouseEvent e)` Listen to `mouseExited` events.
`void` | `mousePressed(java.awt.event.MouseEvent e)` Listen to `mousePressed` events.
`void` | `mouseReleased(java.awt.event.MouseEvent e)` Listen to `mouseReleased` events.
`void` | `paint(java.awt.Graphics g)` Draw the tools of the toolbar.
`private void` | `resetButtons()`
`private void` | `restorePreviousToolbar()`
`void` | `setMode(int mode)` Setup the current mode.
`void` | `setTool(int tool)` Setup the current tool.
`void` | `setWindow(pointHandler[] ph, ImagePlus imp)` Setup the point handler.
`private void` | `showMessage(int tool)`

Methods inherited from class java.awt.Canvas
`addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy, update`

Methods inherited from class java.awt.Component
`action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, 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, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait`

Field Detail

### NUM_TOOLS

    private static final int NUM_TOOLS

See Also:
  Constant Field Values

### SIZE

    private static final int SIZE

See Also:
  Constant Field Values

### OFFSET

    private static final int OFFSET

See Also:
  Constant Field Values

### gray

    private static final java.awt.Color gray

### brighter

    private static final java.awt.Color brighter

### darker

    private static final java.awt.Color darker

### evenDarker

    private static final java.awt.Color evenDarker

### down

    private final boolean[] down

### g

    private java.awt.Graphics g

### scrollbar

    private java.awt.Scrollbar scrollbar

### imp

    private ImagePlus imp

### previousInstance

    private Toolbar previousInstance

### pa

    private pointAction pa

### ph

    private pointHandler[] ph

### instance

    private pointToolbar instance

### mouseDownTime

    private long mouseDownTime

### currentTool

    private int currentTool

### currentMode

    private int currentMode

### x

    private int x

### y

    private int y

### xOffset

    private int xOffset

### yOffset

    private int yOffset

Constructor Detail

### pointToolbar

    public pointToolbar(Toolbar previousToolbar)

  This constructor substitutes ImageJ's toolbar by that of PointPicker_.

Parameters:
  `previousToolbar` - ImageJ's toolbar.

Method Detail

### adjustmentValueChanged

    public void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)

  Listen to `AdjustmentEvent` events.

  Specified by:
    `adjustmentValueChanged` in interface `java.awt.event.AdjustmentListener`
  Parameters:
    `e` - Ignored.

### getCurrentMode

    public int getCurrentMode()

  Return the index of the mode that is currently activated.

### getCurrentTool

    public int getCurrentTool()

  Return the index of the tool that is currently activated.

### installListeners

    public void installListeners(pointAction pa)

  Setup the various listeners.

  Parameters:
    `pa` - `pointAction` object.

### mouseClicked

    public void mouseClicked(java.awt.event.MouseEvent e)

  Listen to `mouseClicked` events.

  Specified by:
    `mouseClicked` in interface `java.awt.event.MouseListener`
  Parameters:
    `e` - Ignored.

### mouseEntered

    public void mouseEntered(java.awt.event.MouseEvent e)

  Listen to `mouseEntered` events.

  Specified by:
    `mouseEntered` in interface `java.awt.event.MouseListener`
  Parameters:
    `e` - Ignored.

### mouseExited

    public void mouseExited(java.awt.event.MouseEvent e)

  Listen to `mouseExited` events.

  Specified by:
    `mouseExited` in interface `java.awt.event.MouseListener`
  Parameters:
    `e` - Ignored.

### mousePressed

    public void mousePressed(java.awt.event.MouseEvent e)

  Listen to `mousePressed` events. Test for single or double clicks and perform the relevant action.

  Specified by:
    `mousePressed` in interface `java.awt.event.MouseListener`
  Parameters:
    `e` - Event.

### mouseReleased

    public void mouseReleased(java.awt.event.MouseEvent e)

  Listen to `mouseReleased` events.

  Specified by:
    `mouseReleased` in interface `java.awt.event.MouseListener`
  Parameters:
    `e` - Ignored.

### paint

    public void paint(java.awt.Graphics g)

  Draw the tools of the toolbar.

  Overrides:
    `paint` in class `java.awt.Canvas`
  Parameters:
    `g` - Graphics environment.

### setMode

    public void setMode(int mode)

  Setup the current mode. The selection of non-functional modes is honored but leads to a no-op action.

  Parameters:
    `mode` - Admissible modes belong to [`0`, `NUM_TOOLS - 1`]

### setTool

    public void setTool(int tool)

  Setup the current tool. The selection of non-functional tools is honored but leads to a no-op action.

  Parameters:
    `tool` - Admissible tools belong to [`0`, `NUM_TOOLS - 1`]

### setWindow

    public void setWindow(pointHandler[] ph,
                          ImagePlus imp)

  Setup the point handler.

  Parameters:
    `ph` - `pointHandler` object that handles operations.
    `imp` - `ImagePlus` object where points are being picked.

### cleanUpListeners

    private void cleanUpListeners()

### d

    private void d(int x,
                   int y)

### drawButton

    private void drawButton(java.awt.Graphics g,
                            int tool)

### fill3DRect

    private void fill3DRect(java.awt.Graphics g,
                            int x,
                            int y,
                            int width,
                            int height,
                            boolean raised)

### m

    private void m(int x,
                   int y)

### resetButtons

    private void resetButtons()

### restorePreviousToolbar

    private void restorePreviousToolbar()

### showMessage

    private void showMessage(int tool)

| Package
| Class | Tree | Deprecated | Index | Help

PREV CLASS NEXT CLASS
FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD