|
Rational Developer for Power Systems Software V7.6 |
|||||||||
| 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.JLabel
com.ibm.etools.iseries.ui.JFormattedLabel
com.ibm.etools.iseries.ui.JFormattedLabelCellRenderer
public class JFormattedLabelCellRenderer
A wrapper class of com.ibm.etools.iseries.ui.JFormattedLabel to implement the interface javax.swing.table.TableCellRenderer. It can be used as a table cell renderer for a JFormattedTableColumn, particular for AS/400 data.
JFormattedLabel,
TableCellRenderer,
Serialized Form| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class javax.swing.JLabel |
|---|
JLabel.AccessibleJLabel |
| Nested classes/interfaces inherited from class javax.swing.JComponent |
|---|
JComponent.AccessibleJComponent |
| Nested classes/interfaces inherited from class java.awt.Container |
|---|
Container.AccessibleAWTContainer |
| Nested classes/interfaces inherited from class java.awt.Component |
|---|
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy |
| Field Summary | |
|---|---|
static String |
Copyright
|
protected Border |
noFocusBorder
|
| Fields inherited from class javax.swing.JLabel |
|---|
labelFor |
| 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.ibm.etools.iseries.ui.JFormattedComponent |
|---|
copyright |
| 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 | |
|---|---|
JFormattedLabelCellRenderer()
Creates a new JFormattedLabelCellRenderer |
|
JFormattedLabelCellRenderer(Attributes dataAttributes,
Formatter formatter,
Validator validator,
Font font)
Creates a new JFormattedLabelCellRenderer with the specified dataAttributes, formatter, validator and font. |
|
JFormattedLabelCellRenderer(FieldModel fm)
Creates a new JFormattedLabelCellRenderer with the specified FieldModel |
|
JFormattedLabelCellRenderer(Icon image)
Creates a new JFormattedLabelCellRenderer with the specified image. |
|
JFormattedLabelCellRenderer(Icon image,
int horizontalAlignment)
Creates a new JFormattedLabelCellRenderer with the specified image and horizontal alignment. |
|
JFormattedLabelCellRenderer(String text)
Creates a new JFormattedLabelCellRenderer with the specified text. |
|
JFormattedLabelCellRenderer(String text,
Icon image,
int horizonalAlignment)
Creates a new JFormattedLabelCellRenderer with the specified text, image and horizontal alignment. |
|
JFormattedLabelCellRenderer(String text,
Icon image,
int horizonalAlignment,
FieldModel fm)
Creates a new JFormattedLabelCellRenderer with the specified text, image, horizontal alignment and FieldModel. |
|
JFormattedLabelCellRenderer(String text,
int horizonalAlignment)
Creates a new JFormattedLabelCellRenderer with the specified text and horizontal alignment. |
|
| Method Summary | |
|---|---|
static String |
Copyright()
Copyright notice. |
Border |
getNoFocusBorder()
Gets the border of cells without focus. |
Component |
getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
Returns the component used for drawing the cell. |
void |
setBackground(Color background)
Overrides JComponent.setBackground to specify
the unselected-background color using the specified color. |
void |
setFieldModel(FieldModel fm)
Sets the field model. |
void |
setForeground(Color foreground)
Overrides JComponent.setForeground to specify
the unselected-foreground color using the specified color. |
void |
setNoFocusBorder(Border aBorder)
Sets the border of cells without focus. |
void |
setText(String text)
Defines the single line of text this component will display. |
| Methods inherited from class com.ibm.etools.iseries.ui.JFormattedLabel |
|---|
convertInternalToUnformatted, convertUnformattedToInternal, getFieldModel, getInternalValue, getUnformattedText, isValueValid, isValueValidForNumeric, setInternalValue, setUnformattedText |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public static final String Copyright
protected Border noFocusBorder
| Constructor Detail |
|---|
public JFormattedLabelCellRenderer()
public JFormattedLabelCellRenderer(Attributes dataAttributes,
Formatter formatter,
Validator validator,
Font font)
dataAttributes - The data attributes such as data type, data length, decimal places, etc.formatter - The formmatting used.validator - The validation used.font - The font in the label.public JFormattedLabelCellRenderer(FieldModel fm)
fm - The field model for formatting and validating.public JFormattedLabelCellRenderer(String text)
text - The text to be displayed by the label.
public JFormattedLabelCellRenderer(String text,
int horizonalAlignment)
text - The text to be displayed by the label.horizonalAlignment - One of the following constants defined in Swing Constants: LEFT, CENTER, or RIGHT.
public JFormattedLabelCellRenderer(String text,
Icon image,
int horizonalAlignment)
text - The text to be displayed by the label.image - The image to be displayed by the label.horizonalAlignment - One of the following constants defined in Swing Constants: LEFT, CENTER, or RIGHT
public JFormattedLabelCellRenderer(String text,
Icon image,
int horizonalAlignment,
FieldModel fm)
text - The text to be displayed by the label.image - The image to be displayed by the label.horizonalAlignment - One of the following constants defined in Swing Constants: LEFT, CENTER, or RIGHTfm - The field model for formatting and validatingpublic JFormattedLabelCellRenderer(Icon image)
image - The image to be displayed by the label.
public JFormattedLabelCellRenderer(Icon image,
int horizontalAlignment)
image - The image to be displayed by the label.horizontalAlignment - One of the following constants defined in Swing Constants: LEFT, CENTER, or RIGHT| Method Detail |
|---|
public static String Copyright()
public Border getNoFocusBorder()
public Component getTableCellRendererComponent(JTable table,
Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
getTableCellRendererComponent in interface TableCellRendererTableCellRenderer.getTableCellRendererComponent(javax.swing.JTable, java.lang.Object, boolean, boolean, int, int)public void setBackground(Color background)
JComponent.setBackground to specify
the unselected-background color using the specified color.
setBackground in class JComponentbackground - The background colorpublic void setFieldModel(FieldModel fm)
setFieldModel in interface JFormattedComponentsetFieldModel in class JFormattedLabelfm - The field model used for formatting.JFormattedLabel.getFieldModel()public void setForeground(Color foreground)
JComponent.setForeground to specify
the unselected-foreground color using the specified color.
setForeground in class JComponentforeground - The foreground colorpublic void setNoFocusBorder(Border aBorder)
aBorder - The border of cells without focus.public void setText(String text)
setText in class JFormattedLabeltext - The text to be drawn.
|
Rational Developer for Power Systems Software V7.6 |
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||