com.ibm.etools.iseries.ui
Class FormattedTextRenderer
java.lang.Object
java.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JLabel
com.ibm.etools.iseries.ui.JFormattedLabel
com.ibm.etools.iseries.ui.FormattedTextRenderer
- All Implemented Interfaces:
- JFormattedComponent, ImageObserver, MenuContainer, Serializable, Accessible, ListCellRenderer, SwingConstants
public class FormattedTextRenderer
- extends JFormattedLabel
- implements ListCellRenderer, Serializable
It extends JFormattedLabel and implements javax.swing.ListCellRenderer.
It makes JFormattedLabel as cells of a comboBox pulldown list.
- See Also:
ListCellRenderer
,
Serialized Form
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 |
Constructor Summary |
FormattedTextRenderer()
Constructs a new FormattedTextRenderer. |
FormattedTextRenderer(Attributes dataAttributes,
Formatter formatter,
Validator validator,
Font font)
Constructs a new FormattedTextRenderer with the specified DataAttributes, Formatter, Validator and Font. |
FormattedTextRenderer(Icon image)
Constructs a new FormattedTextRenderer with the specified Icon. |
FormattedTextRenderer(Icon image,
int horizontalAlignment)
Constructs a new FormattedTextRenderer with the specified Icon and horizontal alignment. |
FormattedTextRenderer(String text)
Constructs a new FormattedTextRenderer with the specified text. |
FormattedTextRenderer(String text,
Icon icon,
int horizontalAlignment)
Constructs a new FormattedTextRenderer with the specified text, icon and horizontal alignment. |
FormattedTextRenderer(String text,
int horizontalAlignment)
Constructs a new FormattedTextRenderer with the specified text and horizontal alignment. |
Methods inherited from class com.ibm.etools.iseries.ui.JFormattedLabel |
convertInternalToUnformatted, convertUnformattedToInternal, getFieldModel, getInternalValue, getUnformattedText, isValueValid, isValueValidForNumeric, setFieldModel, setInternalValue, setText, setUnformattedText |
Methods inherited from class javax.swing.JLabel |
checkHorizontalKey, checkVerticalKey, getAccessibleContext, getDisabledIcon, getDisplayedMnemonic, getDisplayedMnemonicIndex, getHorizontalAlignment, getHorizontalTextPosition, getIcon, getIconTextGap, getLabelFor, getText, getUI, getUIClassID, getVerticalAlignment, getVerticalTextPosition, imageUpdate, paramString, setDisabledIcon, setDisplayedMnemonic, setDisplayedMnemonic, setDisplayedMnemonicIndex, setHorizontalAlignment, setHorizontalTextPosition, setIcon, setIconTextGap, setLabelFor, setUI, setVerticalAlignment, setVerticalTextPosition, updateUI |
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, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, 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 |
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, 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, 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 |
Copyright
public static final String Copyright
- See Also:
- Constant Field Values
FormattedTextRenderer
public FormattedTextRenderer()
- Constructs a new FormattedTextRenderer.
FormattedTextRenderer
public FormattedTextRenderer(Attributes dataAttributes,
Formatter formatter,
Validator validator,
Font font)
- Constructs a new FormattedTextRenderer with the specified DataAttributes, Formatter, Validator and Font.
Please note that the first parameter must be an instance of com.ibm.etools.iseries.ui.DataAttributes;
otherwise java.beans.PropertyVetoException will be thrown at run time.
- Parameters:
dataAttributes
- com.ibm.etools.iseries.ui.Attributesformatter
- com.ibm.etools.iseries.ui.Formattervalidator
- com.ibm.etools.iseries.ui.Validatorfont
- java.awt.Font
FormattedTextRenderer
public FormattedTextRenderer(Icon image)
- Constructs a new FormattedTextRenderer with the specified Icon.
- Parameters:
image
- javax.swing.Icon
FormattedTextRenderer
public FormattedTextRenderer(Icon image,
int horizontalAlignment)
- Constructs a new FormattedTextRenderer with the specified Icon and horizontal alignment.
- Parameters:
image
- javax.swing.IconhorizontalAlignment
- int
FormattedTextRenderer
public FormattedTextRenderer(String text)
- Constructs a new FormattedTextRenderer with the specified text.
- Parameters:
text
- java.lang.String
FormattedTextRenderer
public FormattedTextRenderer(String text,
int horizontalAlignment)
- Constructs a new FormattedTextRenderer with the specified text and horizontal alignment.
- Parameters:
text
- java.lang.StringhorizontalAlignment
- int
FormattedTextRenderer
public FormattedTextRenderer(String text,
Icon icon,
int horizontalAlignment)
- Constructs a new FormattedTextRenderer with the specified text, icon and horizontal alignment.
- Parameters:
text
- java.lang.Stringicon
- javax.swing.IconhorizontalAlignment
- int
Copyright
public static String Copyright()
- This method returns the copyright notice for this class.
- Returns:
- java.lang.String
getListCellRendererComponent
public Component getListCellRendererComponent(JList list,
Object value,
int index,
boolean isSelected,
boolean cellHasFocus)
- Return a component that has been configured to display the specified value.
That component's paint method is then called to "render" the cell.
- Specified by:
getListCellRendererComponent
in interface ListCellRenderer
- Parameters:
list
- The JList we're painting.value
- The value returned by list.getModel().getElementAt(index).index
- The cells index.isSelected
- True if the specified cell was selected.cellHasFocus
- True if the specified cell has the focus.
- Returns:
- A component whose paint() method will render the specified value.
Copyright © 2011 IBM Corp. All Rights Reserved.
Note: This documentation is for part of an interim API that is still under development and expected to change significantly before reaching stability. It is being made available at this early stage to solicit feedback from pioneering adopters on the understanding that any code that uses this API will almost certainly be broken (repeatedly) as the API evolves.