ij2x.plugin
Class ThreeColor

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by ij2x.plugin.ThreeColor
All Implemented Interfaces:
PlugIn, java.awt.event.ActionListener, java.awt.event.ItemListener, java.awt.image.ImageObserver, java.awt.MenuContainer, java.io.Serializable, java.util.EventListener

public class ThreeColor
extends javax.swing.JComponent
implements PlugIn, java.awt.event.ItemListener, java.awt.event.ActionListener

Title: ThreeColor

Description:

Copyright: Copyright (c)

Company: rawak.de

See Also:
Serialized Form

Nested Class Summary
 class ThreeColor.ColorIconArea
           
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
protected  javax.swing.border.Border border1
           
protected  java.awt.BorderLayout borderLayout2
           
protected  java.awt.BorderLayout borderLayout3
           
 java.lang.String colorHex
           
protected  javax.swing.JPanel colorPane
           
protected  javax.swing.JPanel colorPanel
           
protected  java.lang.String[] curstringRGB
           
static int DOUBLE_CLICK_THRESHOLD
           
protected  java.awt.GridBagLayout gridBagLayout1
           
protected  java.awt.GridBagLayout gridBagLayout2
           
 ImagePlus imp
           
static boolean isBGChecked
           
static boolean isFGChecked
           
static boolean isRoiChecked
           
 boolean isShowing
           
protected  javax.swing.JPanel[] jPanel
           
protected  int maxColumn
           
protected  java.awt.Color oldsettingColor
           
protected  javax.swing.JPanel palettePanel
           
protected  boolean pressed
           
protected static java.awt.Color settingColor
           
 java.lang.String[] stringRGB
           
static int tempColor
           
 javax.swing.JLabel tempLabel
           
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
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
ThreeColor()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent e)
           
 void createColorArea()
           
 javax.swing.JPanel doGridbagLayout(java.awt.Component[] comp, int column)
           
 java.lang.String getHexColor()
           
static ThreeColor getInstance()
           
 java.awt.Color getSelectedColor()
           
 void itemStateChanged(java.awt.event.ItemEvent e)
           
 void paintComponents(java.awt.Graphics g)
           
 void run(java.lang.String arg)
          This method is called when the plugin is loaded.
 void setHexColor(java.lang.String hexcolor)
           
 void setSelectedColor(java.awt.Color color)
           
 void setSelectedColor(javax.swing.JPanel panel, java.awt.Color color)
           
 void update(java.awt.Graphics g)
           
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

settingColor

protected static java.awt.Color settingColor

oldsettingColor

protected java.awt.Color oldsettingColor

colorPane

protected javax.swing.JPanel colorPane

colorPanel

protected javax.swing.JPanel colorPanel

palettePanel

protected javax.swing.JPanel palettePanel

gridBagLayout1

protected java.awt.GridBagLayout gridBagLayout1

jPanel

protected javax.swing.JPanel[] jPanel

tempLabel

public javax.swing.JLabel tempLabel

colorHex

public java.lang.String colorHex

maxColumn

protected int maxColumn

border1

protected javax.swing.border.Border border1

curstringRGB

protected java.lang.String[] curstringRGB

gridBagLayout2

protected java.awt.GridBagLayout gridBagLayout2

borderLayout2

protected java.awt.BorderLayout borderLayout2

borderLayout3

protected java.awt.BorderLayout borderLayout3

pressed

protected boolean pressed

stringRGB

public java.lang.String[] stringRGB

imp

public ImagePlus imp

tempColor

public static int tempColor

isShowing

public boolean isShowing

isRoiChecked

public static boolean isRoiChecked

isFGChecked

public static boolean isFGChecked

isBGChecked

public static boolean isBGChecked

DOUBLE_CLICK_THRESHOLD

public static final int DOUBLE_CLICK_THRESHOLD
See Also:
Constant Field Values
Constructor Detail

ThreeColor

public ThreeColor()
Method Detail

getInstance

public static ThreeColor getInstance()

run

public void run(java.lang.String arg)
Description copied from interface: PlugIn
This method is called when the plugin is loaded. 'arg', which may be blank, is the argument specified for this plugin in IJ_Props.txt.

Specified by:
run in interface PlugIn

getHexColor

public java.lang.String getHexColor()

setHexColor

public void setHexColor(java.lang.String hexcolor)

getSelectedColor

public java.awt.Color getSelectedColor()

setSelectedColor

public void setSelectedColor(java.awt.Color color)

setSelectedColor

public void setSelectedColor(javax.swing.JPanel panel,
                             java.awt.Color color)

createColorArea

public void createColorArea()

doGridbagLayout

public javax.swing.JPanel doGridbagLayout(java.awt.Component[] comp,
                                          int column)

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
Specified by:
itemStateChanged in interface java.awt.event.ItemListener

actionPerformed

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

update

public void update(java.awt.Graphics g)
Overrides:
update in class javax.swing.JComponent

paintComponents

public void paintComponents(java.awt.Graphics g)
Overrides:
paintComponents in class java.awt.Container