|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.AbstractButton
javax.swing.JButton
com.tensegrity.gui.swing.control.multiselect.MultiSelectComboBox
com.tensegrity.gui.swing.control.PaintFormatComboBox
This class is the abstract class for all type of
PaintFormat related ComboBox controls. It
already implements the necessary mechanism for creating and updating the
label as well as creating the right ItemEvent on selections. This class
should be used to implement all possible variations of a
PaintFormat, like Gradient,
Pattern, Texture, etc.
PaintFormat,
GradientComboBox,
PatternComboBox,
TextureComboBox,
Serialized Form| Nested Class Summary |
| Nested classes inherited from class javax.swing.JButton |
javax.swing.JButton.AccessibleJButton |
| Nested classes inherited from class javax.swing.AbstractButton |
javax.swing.AbstractButton.AccessibleAbstractButton, javax.swing.AbstractButton.ButtonChangeListener |
| Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Field Summary | |
protected com.tensegrity.gui.swing.control.PaintFormatComboBox.ColorMenu |
backgroundMenuItem
Menu instance for the background of the paint instance. |
protected com.tensegrity.gui.swing.control.PaintFormatComboBox.CustomColorPanel |
backgroundPanel
Panel holding control to launch the ColorChooser and the currently selected custom color. |
protected com.tensegrity.gui.swing.control.PaintFormatComboBox.ColorMenu |
foregroundMenuItem
Menu instance for the foreground of the paint instance. |
protected com.tensegrity.gui.swing.control.PaintFormatComboBox.CustomColorPanel |
foregroundPanel
Panel holding control to launch the ColorChooser and the currently selected custom color. |
protected int |
paintColorback
The background color. |
protected int |
paintColorfore
The foreground color. |
| Fields inherited from class com.tensegrity.gui.swing.control.multiselect.MultiSelectComboBox |
listeners, multiSelect, uiItemEvList, uiManager |
| Fields inherited from class javax.swing.AbstractButton |
actionListener, BORDER_PAINTED_CHANGED_PROPERTY, changeEvent, changeListener, CONTENT_AREA_FILLED_CHANGED_PROPERTY, DISABLED_ICON_CHANGED_PROPERTY, DISABLED_SELECTED_ICON_CHANGED_PROPERTY, FOCUS_PAINTED_CHANGED_PROPERTY, HORIZONTAL_ALIGNMENT_CHANGED_PROPERTY, HORIZONTAL_TEXT_POSITION_CHANGED_PROPERTY, ICON_CHANGED_PROPERTY, itemListener, MARGIN_CHANGED_PROPERTY, MNEMONIC_CHANGED_PROPERTY, model, MODEL_CHANGED_PROPERTY, PRESSED_ICON_CHANGED_PROPERTY, ROLLOVER_ENABLED_CHANGED_PROPERTY, ROLLOVER_ICON_CHANGED_PROPERTY, ROLLOVER_SELECTED_ICON_CHANGED_PROPERTY, SELECTED_ICON_CHANGED_PROPERTY, TEXT_CHANGED_PROPERTY, VERTICAL_ALIGNMENT_CHANGED_PROPERTY, VERTICAL_TEXT_POSITION_CHANGED_PROPERTY |
| 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 javax.swing.SwingConstants |
BOTTOM, CENTER, EAST, HORIZONTAL, LEADING, LEFT, NEXT, NORTH, NORTH_EAST, NORTH_WEST, PREVIOUS, RIGHT, SOUTH, SOUTH_EAST, SOUTH_WEST, TOP, TRAILING, VERTICAL, WEST |
| Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
| Constructor Summary | |
PaintFormatComboBox(UIManager uiManager)
Creates the PaintFormatComboBox. |
|
| Method Summary | |
protected void |
createCombo()
Adds a custom panel to the multiselect. |
protected javax.swing.JLabel |
createLabel()
Returns a new PaintFormatLabel. |
protected java.awt.event.ItemEvent |
getItemEvent(MultiSelectItem item)
Returns a new ItemEvent with this combo as source and a PaintFormat instance as item. |
void |
init(int colorFore,
int colorBack,
int index)
Method init initializes the PaintFormatComboBox with the given forground-, background color and the sets the item with the index in the multiselect as selected. |
void |
setBackgroundColor(int c)
Method setBackgroundColor sets the background color of this ComboBox. |
void |
setForegroundColor(int c)
Method setForegroundColor sets the foreground color of this ComboBox. |
void |
updateCombo(int colorback,
int colorfore)
Updates the label and each item of the internal multiSelect with the given paintformat instance without changing the style. |
protected void |
updateItemLabel(MultiSelectItem item)
Updates the label with the PaintFormat from the given item. |
protected abstract boolean |
usesColorCombos()
Subclasses must specify whether they wish to have two additional entries within their ComboBox, to let users specify a back- and foreground color. |
| Methods inherited from class com.tensegrity.gui.swing.control.multiselect.MultiSelectComboBox |
addItemListener, applyEvList, createMultiSelect, fireEvent, fireEvent, getItemLabel, getMinimumSize, getMultiSelect, getPopup, getPreferredSize, getSelectedIndex, getSelectedObjects, getSelection, indexOf, installEvList, itemStateChanged, paintChildren, removeItemListener, setEnabled, setSelectedIndex, togglePopup |
| Methods inherited from class javax.swing.JButton |
configurePropertiesFromAction, getAccessibleContext, getUIClassID, isDefaultButton, isDefaultCapable, paramString, removeNotify, setDefaultCapable, updateUI |
| Methods inherited from class javax.swing.AbstractButton |
addActionListener, addChangeListener, checkHorizontalKey, checkVerticalKey, createActionListener, createActionPropertyChangeListener, createChangeListener, createItemListener, doClick, doClick, fireActionPerformed, fireItemStateChanged, fireStateChanged, getAction, getActionCommand, getActionListeners, getChangeListeners, getDisabledIcon, getDisabledSelectedIcon, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getItemListeners, getLabel, getMargin, getMnemonic, getModel, getMultiClickThreshhold, getPressedIcon, getRolloverIcon, getRolloverSelectedIcon, getSelectedIcon, getText, getUI, getVerticalAlignment, getVerticalTextPosition, imageUpdate, init, isBorderPainted, isContentAreaFilled, isFocusPainted, isRolloverEnabled, isSelected, paintBorder, removeActionListener, removeChangeListener, setAction, setActionCommand, setBorderPainted, setContentAreaFilled, setDisabledIcon, setDisabledSelectedIcon, setDisplayedMnemonicIndex, setFocusPainted, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabel, setMargin, setMnemonic, setMnemonic, setModel, setMultiClickThreshhold, setPressedIcon, setRolloverEnabled, setRolloverIcon, setRolloverSelectedIcon, setSelected, setSelectedIcon, setText, setUI, setVerticalAlignment, setVerticalTextPosition |
| Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getNextFocusableComponent, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, setForeground, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, 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 |
protected int paintColorback
PaintFormatprotected int paintColorfore
PaintFormatprotected com.tensegrity.gui.swing.control.PaintFormatComboBox.ColorMenu foregroundMenuItem
protected com.tensegrity.gui.swing.control.PaintFormatComboBox.ColorMenu backgroundMenuItem
protected com.tensegrity.gui.swing.control.PaintFormatComboBox.CustomColorPanel foregroundPanel
protected com.tensegrity.gui.swing.control.PaintFormatComboBox.CustomColorPanel backgroundPanel
| Constructor Detail |
public PaintFormatComboBox(UIManager uiManager)
uiManager - the UIManager instance to obtain localized strings from.| Method Detail |
protected abstract boolean usesColorCombos()
true indicates that the createCombo()
method will add two menu entries to the combobox. If no such entries should
be added, return false.
protected void createCombo()
createCombo in class MultiSelectComboBoxMultiSelectComboBox.createCombo()
public void init(int colorFore,
int colorBack,
int index)
colorFore - Foreground color as integer.colorBack - Background color as integer.index - the index of the selected item of the multiselect.public void setForegroundColor(int c)
c - the color as integer.public void setBackgroundColor(int c)
c - the color as integer.protected java.awt.event.ItemEvent getItemEvent(MultiSelectItem item)
getItemEvent in class MultiSelectComboBoxitem - The item which has been selected by user.
MultiSelectComboBox.getItemEvent(MultiSelectItem)protected void updateItemLabel(MultiSelectItem item)
updateItemLabel in class MultiSelectComboBoxitem - the selected item.MultiSelectComboBox.updateItemLabel(MultiSelectItem)protected javax.swing.JLabel createLabel()
createLabel in class MultiSelectComboBoxMultiSelectComboBox.createLabel()
public void updateCombo(int colorback,
int colorfore)
colorback - the background color as rgb int.colorfore - the foreground color as rgb int.
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||