|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Objectcom.tensegrity.gui.component.AttributeEditorUtil
com.tensegrity.gui.swing.control.attributeeditor.SwingAttributeEditorUtil
Swing dependent utilities for use with attribute editors.
| Nested Class Summary | |
static class |
SwingAttributeEditorUtil.InitTextFieldRunnable
Runnable to use with SwingUtilities.invokeLater() to
prepare a text cell for editing. |
| Field Summary | |
static boolean |
USE_TEXT_INPUT_POPUP
Defines whether to use the text popup (=true) or the dialog (=false) |
| Constructor Summary | |
protected |
SwingAttributeEditorUtil()
Constructor (should not be called) |
| Method Summary | |
static void |
configureComponent(javax.swing.JTable table,
javax.swing.JComponent comp,
boolean isCategory,
boolean selected,
boolean enabled)
Sets the color and font of a component that is used for rendering or editing a attribute tree cell depending on the selection state and value type of the cell. |
static SwingAttributeEditorComponents.ValueComponent |
getComponentForEditing(Attribute attribute,
javax.swing.JTable table,
int row,
int column,
UIManager uiManager,
java.awt.event.ActionListener al,
boolean undefined)
Returns the component that can be used for editing a value or name of an attribute in a JTable cell. |
static java.awt.Component |
getComponentForRendering(Attribute attribute,
javax.swing.JTable table,
int row,
int column,
boolean isSelected,
boolean hasFocus,
javax.swing.table.TableCellRenderer fallback,
boolean undefined)
Returns the component that can be used for rendering a value or name of an attribute in a JTable cell. |
static java.awt.Color |
getTableCategoryBackColor()
Returns the color to use for the background of the table categories |
static java.awt.Color |
getTableCategoryBackColor(boolean forceUpdate)
Returns the color to use for the background of the table categories |
static java.lang.String |
getTextForRendering(java.lang.String value)
Returns a shortened string for multiline strings |
static void |
setDisabledColor(java.awt.Component comp)
Sets the disabled foreground color to the given component |
| Methods inherited from class com.tensegrity.gui.component.AttributeEditorUtil |
isCustomAttribute, isCustomAttribute, isEditorAvailable, isUndefinedEditable, renameCustomAttribute |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static boolean USE_TEXT_INPUT_POPUP
| Constructor Detail |
protected SwingAttributeEditorUtil()
| Method Detail |
public static java.awt.Component getComponentForRendering(Attribute attribute,
javax.swing.JTable table,
int row,
int column,
boolean isSelected,
boolean hasFocus,
javax.swing.table.TableCellRenderer fallback,
boolean undefined)
JTable cell.
attribute - The attribute to displaytable - The table the cell belongs torow - The row of the cellcolumn - The column of the cellisSelected - True, if the cell is currently selectedhasFocus - True, if the cell currently has the focusfallback - A TableCellRenderer to use, if this attribute doesn't belong
to the group of types for use with special renderersundefined - True, if the component should be rendered in undefined state
public static SwingAttributeEditorComponents.ValueComponent getComponentForEditing(Attribute attribute,
javax.swing.JTable table,
int row,
int column,
UIManager uiManager,
java.awt.event.ActionListener al,
boolean undefined)
JTable cell.
attribute - The attribute to edittable - The table the cell belongs torow - The row of the cellcolumn - The column of the celluiManager - The UIManager used to read text resources fromal - An ActionListener to add to the created editor,
usually used for stopping the editing whenever an action occurs.undefined - True, if the component should be in undefined state
public static void configureComponent(javax.swing.JTable table,
javax.swing.JComponent comp,
boolean isCategory,
boolean selected,
boolean enabled)
table - The table the component is part of as a cellcomp - The component to configureisCategory - True, if the cell represents a category rowselected - The selection status of the cellenabled - True, if the cell component should be enabledpublic static java.awt.Color getTableCategoryBackColor()
public static java.awt.Color getTableCategoryBackColor(boolean forceUpdate)
forceUpdate - true, to enforce the creation of a new color
instance
public static java.lang.String getTextForRendering(java.lang.String value)
value - The string to check
public static void setDisabledColor(java.awt.Component comp)
comp - The component to modify
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||