com.sibvisions.rad.ui.swing.ext.celleditor
Class JVxChoiceCellEditor
java.lang.Object
com.sibvisions.rad.ui.celleditor.AbstractStyledCellEditor
com.sibvisions.rad.ui.celleditor.AbstractInplaceCellEditor
com.sibvisions.rad.ui.celleditor.AbstractChoiceCellEditor<java.awt.Component>
com.sibvisions.rad.ui.swing.ext.celleditor.JVxChoiceCellEditor
- All Implemented Interfaces:
- ICellEditor, ICellRenderer<java.awt.Component>, IChoiceCellEditor<java.awt.Component>, IInplaceCellEditor, IStyledCellEditor, IAlignmentConstants
public class JVxChoiceCellEditor
- extends AbstractChoiceCellEditor<java.awt.Component>
The JVxChoiceCellEditor
provides the generation of the physical
choice editor component, handles correct all events, and gives standard
access to edited values.
Constructor Summary |
JVxChoiceCellEditor()
Constructs a new JVxChoiceCellEditor. |
JVxChoiceCellEditor(java.lang.Object[] pAllowedValues,
java.lang.String[] pImageNames)
Constructs a new JVxChoiceCellEditor with the given allowed values and
image names. |
Method Summary |
ICellEditorHandler<javax.swing.JComponent> |
createCellEditorHandler(ICellEditorListener pCellEditorListener,
IDataRow pDataRow,
java.lang.String pColumnName)
creates an ICellEditorHandler library dependent component. |
java.awt.Component |
getCellRendererComponent(java.awt.Component pParentComponent,
IDataPage pDataPage,
int pRowNumber,
IDataRow pDataRow,
java.lang.String pColumnName,
boolean pIsSelected,
boolean pHasFocus)
Configures a IComponent for rendering. |
void |
setAllowedValues(java.lang.Object[] pAllowedValues)
Sets all allowed values. |
void |
setDefaultImageName(java.lang.String pDefaultImageName)
Sets the default image name that is shown if selectedIndex is -1. |
void |
setImageNames(java.lang.String[] pImageNames)
Sets the image names that are used for displaying the corresponding values. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
JVxChoiceCellEditor
public JVxChoiceCellEditor()
- Constructs a new JVxChoiceCellEditor.
JVxChoiceCellEditor
public JVxChoiceCellEditor(java.lang.Object[] pAllowedValues,
java.lang.String[] pImageNames)
- Constructs a new JVxChoiceCellEditor with the given allowed values and
image names.
- Parameters:
pAllowedValues
- the allowed values.pImageNames
- the image names.
createCellEditorHandler
public ICellEditorHandler<javax.swing.JComponent> createCellEditorHandler(ICellEditorListener pCellEditorListener,
IDataRow pDataRow,
java.lang.String pColumnName)
- creates an
ICellEditorHandler
library dependent component.
- Parameters:
pCellEditorListener
- the ICellEditorListener
pDataRow
- the IDataRow
pColumnName
- the column name
- Returns:
- the
ICellEditorHandler
.
getCellRendererComponent
public java.awt.Component getCellRendererComponent(java.awt.Component pParentComponent,
IDataPage pDataPage,
int pRowNumber,
IDataRow pDataRow,
java.lang.String pColumnName,
boolean pIsSelected,
boolean pHasFocus)
- Configures a IComponent for rendering. The IComponent can be reused for performance reasons.
After a new call of getCellRendererComponent, the previous IComponent can't be used for rendering
anymore.
- Parameters:
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).
- Returns:
- the renderer Component. It can only be used until the next call of this function.
setAllowedValues
public void setAllowedValues(java.lang.Object[] pAllowedValues)
- Sets all allowed values.
- Specified by:
setAllowedValues
in interface IChoiceCellEditor<java.awt.Component>
- Overrides:
setAllowedValues
in class AbstractChoiceCellEditor<java.awt.Component>
- Parameters:
pAllowedValues
- all allowed values.
setDefaultImageName
public void setDefaultImageName(java.lang.String pDefaultImageName)
- Sets the default image name that is shown if selectedIndex is -1.
- Specified by:
setDefaultImageName
in interface IChoiceCellEditor<java.awt.Component>
- Overrides:
setDefaultImageName
in class AbstractChoiceCellEditor<java.awt.Component>
- Parameters:
pDefaultImageName
- the default image name.
setImageNames
public void setImageNames(java.lang.String[] pImageNames)
- Sets the image names that are used for displaying the corresponding values.
- Specified by:
setImageNames
in interface IChoiceCellEditor<java.awt.Component>
- Overrides:
setImageNames
in class AbstractChoiceCellEditor<java.awt.Component>
- Parameters:
pImageNames
- the image names.
Copyright © 2009 SIB Visions GmbH. All Rights Reserved.