|
Oracle JEWT API Reference Release 4.2.24.0.0 B12199-01 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Container | +--javax.swing.JComponent | +--oracle.bali.ewt.painter.PaintContextComponent | +--oracle.bali.ewt.LWComponent | +--oracle.bali.ewt.chooser.color.ColorChooserPane
This class implements a Color Chooser Pane. The component contains an area that allows the users to pick a color with the mouse, as well as optional areas to pick a color by RGB, HSL, HSB, and HTML hex.
Clients can also add their own ColorEditor components to the ColorChooserPane using addColorEditor(). These components will be added below all other existing components.
Inner classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
Inner classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Field Summary | |
static int |
BUTTON_CANCEL
Constant indicating that the cancel button was pressed. |
static int |
BUTTON_OK
Constant indicating that the OK button was pressed. |
static int |
COLOR_PICKER_CMY
The constant used to determine if the CMY color picker is displayed. |
static int |
COLOR_PICKER_CMYK
Deprecated. CMY is now supported instead of CMYK, thus the constant COLOR_PICKER_CMY is more appropriately named. |
static int |
COLOR_PICKER_HSB
The constant used to determine if the HSB color picker is displayed. |
static int |
COLOR_PICKER_HSL
The constant used to determine if the HSL color picker is displayed. |
static int |
COLOR_PICKER_HTMLHEX
The constant used to determine if the HTML Hex color picker is displayed. |
static int |
COLOR_PICKER_RGB
The constant used to determine if the RGB color picker is displayed. |
static java.lang.String |
PROPERTY_COLOR
The PropertyName to listen for when the user changes the color. |
static java.lang.String |
PROPERTY_COLOR_NAME
The PropertyName to listen for when the user changes the selected color's name. |
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 | |
ColorChooserPane()
Create a ColorChooserPane with the selected color set to black and the RGB, HSB, and HTML HEX color pickers displayed. |
|
ColorChooserPane(java.awt.Color selectedColor,
int pickerMask)
Create a ColorChooserPane with the given selected color set to black and the given bit mask of color pickers to displayed. |
Method Summary | |
void |
addCustomColorEditor(ColorEditor editor)
Add a custom ColorEditor to the ColorChooserPane. |
void |
addNotify()
Override to set strings. |
void |
dispose()
Free any memory associated with this ColorChooserPane. |
javax.accessibility.AccessibleContext |
getAccessibleContext()
Get the AccessibleContext associated with this JComponent |
java.awt.Color |
getColor()
Returns the color that is currently displayed, or null if there is no color. |
java.lang.String |
getColorName()
Get the name of the currently selected color. |
int |
getColorPickerMask()
Get the OR mask representing the currently visible set of color picker components. |
ColorEditor[] |
getCustomColorEditors()
Get a list of all custom ColorEditors that have been added to the ColorChooserPane. |
java.awt.Color |
getOriginalColor()
Get the "original" color of the ColorChooserPane. |
boolean |
isColorNameVisible()
Get if the color name text field is visible. |
void |
removeCustomColorEditor(ColorEditor editor)
Remove a custom ColorEditor to the ColorChooserPane. |
void |
setColor(java.awt.Color c)
Sets the color displayed in the pane. |
void |
setColorName(java.lang.String name)
Set the name of the currently selected color. |
void |
setColorNameVisible(boolean visible)
Set if the color name text field is visible. |
void |
setColorPickerMask(int colorPickerMask)
Set the OR mask that represents the set of visible color picker. |
void |
setEnabled(boolean enabled)
Override to pass onto children. |
void |
setLocale(java.util.Locale newLocale)
Override to set strings when locale changes. |
void |
setOriginalColor(java.awt.Color color)
Set the "original" color of the ColorChooserPane. |
static int |
showDialog(java.awt.Component parent,
ColorChooserPane pane)
Show the given ColorChooserPane in a modal, non resiable Dialog with the default title, centered over the given parent component. |
static int |
showDialog(java.awt.Component parent,
ColorChooserPane pane,
java.lang.String dialogTitle,
boolean resizable)
Show the given ColorChooserPane in a modal Dialog with the given resizablity, with the given title, centered over the given parent component. |
Methods inherited from class oracle.bali.ewt.LWComponent |
clipToParents, freezeRepaints, getActualAlignment, getActualReadingDirection, getAlignment, getBorderInsets, getDocumentSize, getFill, getPageBounds, getPrintPaintContext, isFocusTraversable, paintChildren, paintComponent, paintImmediateInterior, paintImmediateInterior, paintImmediately, paintOverChildren, printPage, processEvent, processEventImpl, repaint, repaintInterior, repaintInterior, setAlignment, setFill, unfreezeRepaints, updateUI |
Methods inherited from class oracle.bali.ewt.painter.PaintContextComponent |
getBorderContext, getPaintContext, getPaintData, getPaintState, getUIDefaults, setUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getUIClassID, getVerifyInputWhenFocusTarget, getVisibleRect, getWidth, getX, getY, grabFocus, hasFocus, hide, isDoubleBuffered, isFocusCycleRoot, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processFocusEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, requestDefaultFocus, requestFocus, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getLayout, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, remove, remove, removeAll, removeContainerListener, setLayout, validate, validateTree |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, getBackground, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getInputContext, getInputMethodRequests, getLocale, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, imageUpdate, inside, isDisplayable, isEnabled, isLightweight, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String PROPERTY_COLOR
public static final java.lang.String PROPERTY_COLOR_NAME
public static final int COLOR_PICKER_RGB
public static final int COLOR_PICKER_HSB
public static final int COLOR_PICKER_HSL
public static final int COLOR_PICKER_HTMLHEX
public static final int COLOR_PICKER_CMYK
public static final int COLOR_PICKER_CMY
public static final int BUTTON_OK
showDialog(java.awt.Component, oracle.bali.ewt.chooser.color.ColorChooserPane)
public static final int BUTTON_CANCEL
showDialog(java.awt.Component, oracle.bali.ewt.chooser.color.ColorChooserPane)
Constructor Detail |
public ColorChooserPane()
public ColorChooserPane(java.awt.Color selectedColor, int pickerMask)
Method Detail |
public static int showDialog(java.awt.Component parent, ColorChooserPane pane)
parent
- The parent component to center the dialog over.pane
- The ColorChooserPane to show in the dialogpublic static int showDialog(java.awt.Component parent, ColorChooserPane pane, java.lang.String dialogTitle, boolean resizable)
parent
- The parent component to center the dialog over.pane
- The ColorChooserPane to show in the dialogdialogTitle
- The title of the dialogresizable
- True if the dialog containing the ColorChooserPane
is resizablepublic void setColor(java.awt.Color c)
public java.awt.Color getColor()
public void setOriginalColor(java.awt.Color color)
getOriginalColor()
public java.awt.Color getOriginalColor()
setOriginalColor(java.awt.Color)
public void setColorName(java.lang.String name)
getColorName()
,
isColorNameVisible()
public java.lang.String getColorName()
setColorName(java.lang.String)
,
isColorNameVisible()
public void setColorNameVisible(boolean visible)
getColorName()
,
isColorNameVisible()
public boolean isColorNameVisible()
getColorName()
,
setColorNameVisible(boolean)
public void setColorPickerMask(int colorPickerMask)
getColorPickerMask()
public int getColorPickerMask()
setColorPickerMask(int)
public void addCustomColorEditor(ColorEditor editor)
removeCustomColorEditor(oracle.bali.ewt.chooser.color.ColorEditor)
,
getCustomColorEditors()
public void removeCustomColorEditor(ColorEditor editor)
addCustomColorEditor(oracle.bali.ewt.chooser.color.ColorEditor)
,
getCustomColorEditors()
public ColorEditor[] getCustomColorEditors()
addCustomColorEditor(oracle.bali.ewt.chooser.color.ColorEditor)
,
removeCustomColorEditor(oracle.bali.ewt.chooser.color.ColorEditor)
public void dispose()
public void setEnabled(boolean enabled)
setEnabled
in class javax.swing.JComponent
public javax.accessibility.AccessibleContext getAccessibleContext()
getAccessibleContext
in interface javax.accessibility.Accessible
getAccessibleContext
in class javax.swing.JComponent
public void addNotify()
addNotify
in class javax.swing.JComponent
public void setLocale(java.util.Locale newLocale)
setLocale
in class java.awt.Component
|
Oracle JEWT 4.2.24 | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |