|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Canvas
|
+--pointToolbar
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 |
private static final int NUM_TOOLS
private static final int SIZE
private static final int OFFSET
private static final java.awt.Color gray
private static final java.awt.Color brighter
private static final java.awt.Color darker
private static final java.awt.Color evenDarker
private final boolean[] down
private java.awt.Graphics g
private java.awt.Scrollbar scrollbar
private ImagePlus imp
private Toolbar previousInstance
private pointAction pa
private pointHandler[] ph
private pointToolbar instance
private long mouseDownTime
private int currentTool
private int currentMode
private int x
private int y
private int xOffset
private int yOffset
| Constructor Detail |
public pointToolbar(Toolbar previousToolbar)
previousToolbar - ImageJ's toolbar.| Method Detail |
public void adjustmentValueChanged(java.awt.event.AdjustmentEvent e)
AdjustmentEvent events.
adjustmentValueChanged in interface java.awt.event.AdjustmentListenere - Ignored.public int getCurrentMode()
public int getCurrentTool()
public void installListeners(pointAction pa)
pa - pointAction object.public void mouseClicked(java.awt.event.MouseEvent e)
mouseClicked events.
mouseClicked in interface java.awt.event.MouseListenere - Ignored.public void mouseEntered(java.awt.event.MouseEvent e)
mouseEntered events.
mouseEntered in interface java.awt.event.MouseListenere - Ignored.public void mouseExited(java.awt.event.MouseEvent e)
mouseExited events.
mouseExited in interface java.awt.event.MouseListenere - Ignored.public void mousePressed(java.awt.event.MouseEvent e)
mousePressed events. Test for single or double
clicks and perform the relevant action.
mousePressed in interface java.awt.event.MouseListenere - Event.public void mouseReleased(java.awt.event.MouseEvent e)
mouseReleased events.
mouseReleased in interface java.awt.event.MouseListenere - Ignored.public void paint(java.awt.Graphics g)
paint in class java.awt.Canvasg - Graphics environment.public void setMode(int mode)
mode - Admissible modes belong to [0,
NUM_TOOLS - 1]public void setTool(int tool)
tool - Admissible tools belong to [0,
NUM_TOOLS - 1]
public void setWindow(pointHandler[] ph,
ImagePlus imp)
ph - pointHandler object that handles operations.imp - ImagePlus object where points are being picked.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)
private void m(int x,
int y)
private void resetButtons()
private void restorePreviousToolbar()
private void showMessage(int tool)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||