|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjavax.rad.genui.celleditor.UICellEditor<IChoiceCellEditor>
javax.rad.genui.celleditor.UIChoiceCellEditor
public class UIChoiceCellEditor
Platform and technology independent choice editor. It is designed for use with AWT, Swing, SWT, JSP, JSF, ... .
Field Summary |
---|
Fields inherited from interface javax.rad.ui.IAlignmentConstants |
---|
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_STRETCH, ALIGN_TOP |
Constructor Summary | |
---|---|
|
UIChoiceCellEditor()
Creates a new instance of UIChoiceCellEditor . |
protected |
UIChoiceCellEditor(IChoiceCellEditor pEditor)
Creates a new instance of UIChoiceCellEditor with the given
choice cell editor. |
|
UIChoiceCellEditor(Object[] pAllowedValues,
String[] pImageNames)
Creates a new instance of UIChoiceCellEditor with the given allowed values and image names. |
|
UIChoiceCellEditor(Object[] pAllowedValues,
String[] pImageNames,
String pDefaultImage)
Creates a new instance of UIChoiceCellEditor with the given allowed values and image names. |
Method Summary | |
---|---|
static boolean |
addDefaultChoiceCellEditor(IChoiceCellEditor pEditor)
Adds a choice cell editor to the list of default choice cell editors. |
Object[] |
getAllowedValues()
Gets all allowed values. |
Object |
getCellRendererComponent(Object pParentComponent,
IDataPage pDataPage,
int pRowNumber,
IDataRow pDataRow,
String pColumnName,
boolean pIsSelected,
boolean pHasFocus)
Configures a IComponent for rendering. |
static IChoiceCellEditor |
getDefaultChoiceCellEditor(Object[] pValues)
Gets a choice cell editor from the defaults list, if an editor is available for specific values. |
static IChoiceCellEditor[] |
getDefaultChoiceCellEditors()
Gets all currently available default choice cell editors as array. |
String |
getDefaultImageName()
Gets the default image that is shown if selectedIndex is -1. |
String[] |
getImageNames()
Gets the image names that are used for displaying the corresponding values. |
static void |
removeAllDefaultChoiceCellEditors()
Removes all default choice cell editors. |
static void |
removeDefaultChoiceCellEditor(IChoiceCellEditor pEditor)
Removes a choice cell editor from the list of default choice cell editors. |
void |
setAllowedValues(Object[] pAllowedValues)
Sets all allowed values. |
void |
setDefaultImageName(String pDefaultImage)
Sets the default image name that is shown if selectedIndex is -1. |
void |
setImageNames(String[] pImageNames)
Sets the image names that are used for displaying the corresponding values. |
Methods inherited from class javax.rad.genui.celleditor.UICellEditor |
---|
createCellEditorHandler, getDefaultCellEditor, getHorizontalAlignment, getResource, getVerticalAlignment, isDirectCellEditor, setDefaultCellEditor, setHorizontalAlignment, setVerticalAlignment |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.rad.model.ui.ICellEditor |
---|
createCellEditorHandler, isDirectCellEditor |
Methods inherited from interface javax.rad.ui.IAlignmentConstants |
---|
getHorizontalAlignment, getVerticalAlignment, setHorizontalAlignment, setVerticalAlignment |
Constructor Detail |
---|
public UIChoiceCellEditor()
UIChoiceCellEditor
.
IChoiceCellEditor
protected UIChoiceCellEditor(IChoiceCellEditor pEditor)
UIChoiceCellEditor
with the given
choice cell editor.
pEditor
- the choice cell editorIChoiceCellEditor
public UIChoiceCellEditor(Object[] pAllowedValues, String[] pImageNames)
UIChoiceCellEditor
with the given allowed values and image names.
pAllowedValues
- the allowed values.pImageNames
- the image names.IChoiceCellEditor
public UIChoiceCellEditor(Object[] pAllowedValues, String[] pImageNames, String pDefaultImage)
UIChoiceCellEditor
with the given allowed values and image names.
pAllowedValues
- the allowed values.pImageNames
- the image names.pDefaultImage
- the default image name.IChoiceCellEditor
Method Detail |
---|
public Object[] getAllowedValues()
getAllowedValues
in interface IChoiceCellEditor
public void setAllowedValues(Object[] pAllowedValues)
setAllowedValues
in interface IChoiceCellEditor
pAllowedValues
- all allowed values.public String[] getImageNames()
getImageNames
in interface IChoiceCellEditor
public void setImageNames(String[] pImageNames)
setImageNames
in interface IChoiceCellEditor
pImageNames
- the image names.public String getDefaultImageName()
getDefaultImageName
in interface IChoiceCellEditor
public void setDefaultImageName(String pDefaultImage)
setDefaultImageName
in interface IChoiceCellEditor
pDefaultImage
- the default image name.public Object getCellRendererComponent(Object pParentComponent, IDataPage pDataPage, int pRowNumber, IDataRow pDataRow, String pColumnName, boolean pIsSelected, boolean pHasFocus)
getCellRendererComponent
in interface ICellRenderer
pParentComponent
- the Parent Component from which.pDataPage
- the DataPage of the row to be rendered.pRowNumber
- the row number of the row to be rendered.pDataRow
- the row to be rendered (is the same as pDataPage.getRow(pRowNumber)).pColumnName
- the column name to be rendered.pIsSelected
- true, if the cell is selected (shown with selected background).pHasFocus
- true, if the cell has the focus (cell is the current editing cell).
public static IChoiceCellEditor getDefaultChoiceCellEditor(Object[] pValues)
pValues
- a list of values for which a choice cell editor should be found. All values must
match to the allowed values of a registered editor.
pValue
or null
if no matching editor
was found.public static IChoiceCellEditor[] getDefaultChoiceCellEditors()
!= null
public static boolean addDefaultChoiceCellEditor(IChoiceCellEditor pEditor)
pEditor
- the choice cell editor
true
if the editor was added, false
if an editor with the same
allowed values was already addedpublic static void removeDefaultChoiceCellEditor(IChoiceCellEditor pEditor)
pEditor
- the choice cell editorpublic static void removeAllDefaultChoiceCellEditors()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |