public class PersistableSwatchChooserPanel extends AbstractColorChooserPanel implements PropertyChangeListener
Modifier and Type | Class and Description |
---|---|
static class |
PersistableSwatchChooserPanel.ColorTracker
This class is used to save and restore the recent color choices..
|
(package private) static class |
PersistableSwatchChooserPanel.MainPanelLayout
This is the layout manager for the main panel.
|
private class |
PersistableSwatchChooserPanel.MainSwatchKeyListener
This class handles the user "selecting" a color using the
space key.
|
(package private) static class |
PersistableSwatchChooserPanel.MainSwatchPanel
This is the main swatch panel.
|
(package private) class |
PersistableSwatchChooserPanel.MouseHandler
This class handles mouse events for the two swatch panels.
|
(package private) static class |
PersistableSwatchChooserPanel.RecentPanelLayout
This is the layout manager for the recent swatch panel.
|
private class |
PersistableSwatchChooserPanel.RecentSwatchKeyListener
This class handles the user "selecting" a recently used
color using the space key.
|
(package private) static class |
PersistableSwatchChooserPanel.RecentSwatchPanel
This class is the recent swatch panel.
|
(package private) static class |
PersistableSwatchChooserPanel.SwatchPanel
This the base class for all swatch panels.
|
JPanel.AccessibleJPanel
JComponent.AccessibleJComponent
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
(package private) PersistableSwatchChooserPanel.MainSwatchPanel |
mainPalette
The main panel that holds the set of choosable colors.
|
(package private) KeyListener |
mainSwatchKeyListener
Main Palette
KeyListener . |
(package private) MouseListener |
mouseHandler
The mouse handlers for the panels.
|
(package private) PersistableSwatchChooserPanel.RecentSwatchPanel |
recentPalette
A panel that holds the recent colors.
|
(package private) KeyListener |
recentSwatchKeyListener
Recent palette
KeyListener . |
(package private) PersistableSwatchChooserPanel.ColorTracker |
tracker |
listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
accessibleContext, BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
PersistableSwatchChooserPanel()
Creates a new DefaultSwatchChooserPanel object.
|
Modifier and Type | Method and Description |
---|---|
protected void |
buildChooser()
This method builds the chooser panel.
|
String |
getDisplayName()
This method returns the JTabbedPane displayed name.
|
Icon |
getLargeDisplayIcon()
This method returns the large display icon.
|
Icon |
getSmallDisplayIcon()
This method returns the small display icon.
|
String |
getToolTipText(MouseEvent e)
This method returns the tooltip text for the given MouseEvent.
|
void |
paint(Graphics g)
This method paints the chooser panel with the given Graphics object.
|
void |
propertyChange(PropertyChangeEvent evt) |
void |
setColorTracker(PersistableSwatchChooserPanel.ColorTracker tracker)
Set the color tracking object.
|
void |
uninstallChooserPanel(JColorChooser chooser)
This method removes the chooser panel from the JColorChooser.
|
void |
updateChooser()
This method updates the chooser panel with the new value from the
JColorChooser.
|
protected void |
updateRecentSwatchPanel()
A method updating the recent colors in the swatchPanel
This is called whenever necessary, specifically after building the panel,
on changes of the tracker, from the mouseListener
|
getColorFromModel, getColorSelectionModel, getDisplayedMnemonicIndex, getMnemonic, installChooserPanel
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, 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, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, hide, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingOrigin, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, 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, update
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, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusDownCycle, validate, validateTree
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, 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, transferFocusBackward, transferFocusUpCycle
PersistableSwatchChooserPanel.MainSwatchPanel mainPalette
PersistableSwatchChooserPanel.RecentSwatchPanel recentPalette
MouseListener mouseHandler
KeyListener mainSwatchKeyListener
KeyListener
.KeyListener recentSwatchKeyListener
KeyListener
.PersistableSwatchChooserPanel()
public void updateChooser()
updateChooser
in class AbstractColorChooserPanel
protected void buildChooser()
buildChooser
in class AbstractColorChooserPanel
public void uninstallChooserPanel(JColorChooser chooser)
uninstallChooserPanel
in class AbstractColorChooserPanel
chooser
- The JColorChooser this panel is being removed from.public String getDisplayName()
getDisplayName
in class AbstractColorChooserPanel
public Icon getSmallDisplayIcon()
getSmallDisplayIcon
in class AbstractColorChooserPanel
public Icon getLargeDisplayIcon()
getLargeDisplayIcon
in class AbstractColorChooserPanel
public void paint(Graphics g)
paint
in class AbstractColorChooserPanel
g
- The Graphics object to paint with.public String getToolTipText(MouseEvent e)
getToolTipText
in class JComponent
e
- The MouseEvent.public void setColorTracker(PersistableSwatchChooserPanel.ColorTracker tracker)
tracker
- public void propertyChange(PropertyChangeEvent evt)
propertyChange
in interface PropertyChangeListener
protected void updateRecentSwatchPanel()