|
||||||||||
| 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.text.JTextComponent
javax.swing.JTextField
com.sibvisions.rad.ui.swing.ext.JVxChoice
public class JVxChoice
A Choice editor can display and switch several values as Image. This is more flexible than JRadioButton or JCheckBox, because it can be configured which items should be returned and which images should be displayed instead.
| Nested Class Summary | |
|---|---|
static class |
JVxChoice.NullCaret
Null Caret is a invisible non functional Caret to prevent null pointer exceptions in swing. |
static class |
JVxChoice.NullDocumentFilter
Null Document Filter. |
| Nested classes/interfaces inherited from class javax.swing.JTextField |
|---|
javax.swing.JTextField.AccessibleJTextField |
| Nested classes/interfaces inherited from class javax.swing.text.JTextComponent |
|---|
javax.swing.text.JTextComponent.AccessibleJTextComponent, javax.swing.text.JTextComponent.DropLocation, javax.swing.text.JTextComponent.KeyBinding |
| 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 |
|---|
| Fields inherited from class javax.swing.JTextField |
|---|
notifyAction |
| Fields inherited from class javax.swing.text.JTextComponent |
|---|
DEFAULT_KEYMAP, FOCUS_ACCELERATOR_KEY |
| 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 com.sibvisions.rad.ui.swing.ext.JVxConstants |
|---|
STRETCH |
| 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 | |
|---|---|
JVxChoice()
Constructs a new JVxChoice component. |
|
JVxChoice(java.lang.Object[] pAllowedValues,
java.awt.Image[] pImages)
Constructs a new JVxChoice with the given allowed values and image names. |
|
| Method Summary | |
|---|---|
void |
addActionListener(java.awt.event.ActionListener pActionListener)
Adds an ActionListener. |
void |
addItemListener(java.awt.event.ItemListener pItemListener)
|
protected void |
fireActionEvent()
Notifies all listeners that have registered interest for notification on this event type. |
protected void |
fireItemStateChanged(java.awt.event.ItemEvent pItemEvent)
Notifies all listeners that have registered interest for notification on this event type. |
java.lang.String |
getActionCommand()
Returns the action command that is included in the event sent to action listeners. |
java.awt.event.ActionListener[] |
getActionListeners()
Returns an array of all the ActionListeners added
to this JComboBox with addActionListener(). |
java.lang.Object[] |
getAllowedValues()
Gets all allowed values. |
java.awt.Color |
getBackground()
|
java.awt.Rectangle |
getBounds()
|
java.awt.Image |
getDefaultImage()
Gets the default image that is shown if selectedIndex is -1. |
int |
getHeight()
|
int |
getHorizontalAlignment()
Gets the horizontal alignment of the icon. |
java.awt.Image[] |
getImages()
Gets the images that are used for displaying the values. |
java.awt.Dimension |
getImageSize()
Returns the image size. |
java.awt.Color |
getInnerBackground()
Gets the inner background. |
javax.swing.border.Border |
getInnerBorder()
Gets the inner border. |
java.awt.Rectangle |
getInnerBounds()
Returns the inner bounds of the choice component. |
java.awt.Insets |
getInnerInsets()
Returns the inner insets. |
java.awt.event.ItemListener[] |
getItemListeners()
Returns an array of all the ItemListeners added
to this JVxChoice with addItemListener(). |
java.awt.Dimension |
getPreferredSize()
Gets the preferred size of the icon dependent of the configured alignments. |
int |
getSelectedIndex()
Gets the selected index, or -1 if no value is selected. |
java.lang.Object |
getSelectedItem()
Gets the current selected value, or null, if no one is selected. |
java.lang.Object[] |
getSelectedObjects()
|
java.awt.Dimension |
getSize()
|
int |
getVerticalAlignment()
Gets the vertical alignment of the icon. |
int |
getWidth()
|
boolean |
isImageBorderVisible()
Gets the visibility of the image border. |
void |
paintComponent(java.awt.Graphics pGraphics)
|
protected void |
processKeyEvent(java.awt.event.KeyEvent pKeyEvent)
|
protected void |
processMouseEvent(java.awt.event.MouseEvent pMouseEvent)
|
void |
removeActionListener(java.awt.event.ActionListener pActionListener)
Removes an ActionListener. |
void |
removeItemListener(java.awt.event.ItemListener pItemListener)
|
void |
selectNextIndex()
Selects the next index. |
void |
setActionCommand(java.lang.String pActionCommand)
Sets the action command that should be included in the event sent to action listeners. |
void |
setAllowedValues(java.lang.Object[] pAllowedValues)
Sets all allowed values. |
void |
setCursor(java.awt.Cursor pCursor)
|
void |
setDefaultImage(java.awt.Image pDefaultImage)
Sets the default image that is shown if selectedIndex is -1. |
void |
setEditable(boolean pEditable)
|
void |
setHorizontalAlignment(int pHorizontalAlignment)
Sets the horizontal alignment of the icon. |
void |
setImageBorderVisible(boolean pImageBorderVisible)
sets the visibility of the image border. |
void |
setImages(java.awt.Image[] pImages)
Sets the images that are used for displaying the values. |
void |
setImageSize(java.awt.Dimension pImageSize)
Returns the image size. |
void |
setInnerBackground(java.awt.Color pInnerBackground)
sets the inner background. |
void |
setInnerBorder(javax.swing.border.Border pInnerBorder)
sets the inner border. |
void |
setSelectedIndex(int pSelectedIndex)
Sets the selected index. |
void |
setSelectedItem(java.lang.Object pSelectedItem)
Sets the value that should be selected. |
void |
setUI(javax.swing.plaf.TextUI pTextUI)
|
void |
setVerticalAlignment(int pVerticalAlignment)
Sets the vertical alignment of the icon. |
| Methods inherited from class javax.swing.JTextField |
|---|
actionPropertyChanged, configurePropertiesFromAction, createActionPropertyChangeListener, createDefaultModel, fireActionPerformed, getAccessibleContext, getAction, getActions, getColumns, getColumnWidth, getHorizontalVisibility, getScrollOffset, getUIClassID, isValidateRoot, paramString, postActionEvent, scrollRectToVisible, setAction, setColumns, setDocument, setFont, setScrollOffset |
| Methods inherited from class javax.swing.text.JTextComponent |
|---|
addCaretListener, addInputMethodListener, addKeymap, copy, cut, fireCaretUpdate, getCaret, getCaretColor, getCaretListeners, getCaretPosition, getDisabledTextColor, getDocument, getDragEnabled, getDropLocation, getDropMode, getFocusAccelerator, getHighlighter, getInputMethodRequests, getKeymap, getKeymap, getMargin, getNavigationFilter, getPreferredScrollableViewportSize, getPrintable, getScrollableBlockIncrement, getScrollableTracksViewportHeight, getScrollableTracksViewportWidth, getScrollableUnitIncrement, getSelectedText, getSelectedTextColor, getSelectionColor, getSelectionEnd, getSelectionStart, getText, getText, getToolTipText, getUI, isEditable, loadKeymap, modelToView, moveCaretPosition, paste, print, print, print, processInputMethodEvent, read, removeCaretListener, removeKeymap, removeNotify, replaceSelection, select, selectAll, setCaret, setCaretColor, setCaretPosition, setComponentOrientation, setDisabledTextColor, setDragEnabled, setDropMode, setFocusAccelerator, setHighlighter, setKeymap, setMargin, setNavigationFilter, setSelectedTextColor, setSelectionColor, setSelectionEnd, setSelectionStart, setText, updateUI, viewToModel, write |
| Methods inherited from class javax.swing.JComponent |
|---|
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, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, paint, paintBorder, paintChildren, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setForeground, setInheritsPopupMenu, 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, 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, transferFocusBackward, transferFocusDownCycle, validate, validateTree |
| Methods inherited from class java.awt.Component |
|---|
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, 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, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, 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 |
| Constructor Detail |
|---|
public JVxChoice()
public JVxChoice(java.lang.Object[] pAllowedValues,
java.awt.Image[] pImages)
pAllowedValues - the allowed values.pImages - the images.| Method Detail |
|---|
public void setUI(javax.swing.plaf.TextUI pTextUI)
setUI in class javax.swing.text.JTextComponentpublic void setCursor(java.awt.Cursor pCursor)
setCursor in class java.awt.Componentpublic void setEditable(boolean pEditable)
setEditable in class javax.swing.text.JTextComponentpublic java.awt.Color getBackground()
getBackground in class java.awt.Componentpublic int getWidth()
getWidth in class javax.swing.JComponentpublic int getHeight()
getHeight in class javax.swing.JComponentpublic java.awt.Dimension getSize()
getSize in class java.awt.Componentpublic java.awt.Rectangle getBounds()
getBounds in class java.awt.Componentpublic void paintComponent(java.awt.Graphics pGraphics)
paintComponent in class javax.swing.JComponentpublic java.awt.Dimension getPreferredSize()
JVxConstants.STRETCH then the
size of the component will be used. Otherwise the size
of the image will be used.
getPreferredSize in class javax.swing.JTextFieldpublic int getHorizontalAlignment()
getHorizontalAlignment in class javax.swing.JTextFieldJVxConstantspublic void setHorizontalAlignment(int pHorizontalAlignment)
setHorizontalAlignment in class javax.swing.JTextFieldpHorizontalAlignment - the alignmentJVxConstantsprotected void processMouseEvent(java.awt.event.MouseEvent pMouseEvent)
processMouseEvent in class javax.swing.JComponentprotected void processKeyEvent(java.awt.event.KeyEvent pKeyEvent)
processKeyEvent in class javax.swing.JComponentpublic java.lang.Object[] getSelectedObjects()
getSelectedObjects in interface java.awt.ItemSelectablepublic void addItemListener(java.awt.event.ItemListener pItemListener)
addItemListener in interface java.awt.ItemSelectablepublic void removeItemListener(java.awt.event.ItemListener pItemListener)
removeItemListener in interface java.awt.ItemSelectablepublic java.awt.Color getInnerBackground()
public void setInnerBackground(java.awt.Color pInnerBackground)
pInnerBackground - the inner background.public javax.swing.border.Border getInnerBorder()
public void setInnerBorder(javax.swing.border.Border pInnerBorder)
pInnerBorder - the inner border.public boolean isImageBorderVisible()
public void setImageBorderVisible(boolean pImageBorderVisible)
pImageBorderVisible - the visibility of the image border.public java.lang.Object[] getAllowedValues()
public void setAllowedValues(java.lang.Object[] pAllowedValues)
pAllowedValues - all allowed values.public java.awt.Image[] getImages()
public void setImages(java.awt.Image[] pImages)
pImages - the images.public java.awt.Dimension getImageSize()
public void setImageSize(java.awt.Dimension pImageSize)
pImageSize - the size the images should have.public java.awt.Insets getInnerInsets()
public java.awt.Rectangle getInnerBounds()
public java.awt.Image getDefaultImage()
public void setDefaultImage(java.awt.Image pDefaultImage)
pDefaultImage - the default image.public int getVerticalAlignment()
JVxConstantspublic void setVerticalAlignment(int pVerticalAlignment)
pVerticalAlignment - the alignmentJVxConstantspublic int getSelectedIndex()
public void setSelectedIndex(int pSelectedIndex)
pSelectedIndex - the index to select.public void selectNextIndex()
public java.lang.Object getSelectedItem()
public void setSelectedItem(java.lang.Object pSelectedItem)
pSelectedItem - the value to select.public java.lang.String getActionCommand()
public void setActionCommand(java.lang.String pActionCommand)
setActionCommand in class javax.swing.JTextFieldpActionCommand - a string containing the "command" that is sent
to action listeners; the same listener can then
do different things depending on the command it
receivespublic java.awt.event.ItemListener[] getItemListeners()
ItemListeners added
to this JVxChoice with addItemListener().
ItemListeners added or an empty
array if no listeners have been addedpublic void addActionListener(java.awt.event.ActionListener pActionListener)
ActionListener.
The ActionListener will receive an ActionEvent
when a selection has been made.
addActionListener in class javax.swing.JTextFieldpActionListener - the ActionListener that is to be notifiedsetSelectedItem(java.lang.Object)public void removeActionListener(java.awt.event.ActionListener pActionListener)
ActionListener.
removeActionListener in class javax.swing.JTextFieldpActionListener - the ActionListener to removepublic java.awt.event.ActionListener[] getActionListeners()
ActionListeners added
to this JComboBox with addActionListener().
getActionListeners in class javax.swing.JTextFieldActionListeners added or an empty
array if no listeners have been addedprotected void fireItemStateChanged(java.awt.event.ItemEvent pItemEvent)
pItemEvent - the event of interestItemListenerprotected void fireActionEvent()
ActionListener
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||