com.sibvisions.rad.ui.celleditor
Class AbstractChoiceCellEditor<C>

java.lang.Object
  extended by com.sibvisions.rad.ui.celleditor.AbstractStyledCellEditor
      extended by com.sibvisions.rad.ui.celleditor.AbstractInplaceCellEditor
          extended by com.sibvisions.rad.ui.celleditor.AbstractChoiceCellEditor<C>
Type Parameters:
C - the type of the content.
All Implemented Interfaces:
ICellEditor, ICellRenderer<C>, IChoiceCellEditor<C>, IInplaceCellEditor, IStyledCellEditor, IAlignmentConstants
Direct Known Subclasses:
JVxChoiceCellEditor

public abstract class AbstractChoiceCellEditor<C>
extends AbstractInplaceCellEditor
implements IChoiceCellEditor<C>

The AbstractChoiceCellEditor is an IChoiceCellEditor implementation, which provides a base implementation.


Field Summary
protected  java.lang.Object[] allowedValues
          The allowed values.
protected  java.lang.String defaultImageName
          The name of the default image.
protected  java.lang.String[] imageNames
          The name of the images to represent the values.
 
Fields inherited from class com.sibvisions.rad.ui.celleditor.AbstractInplaceCellEditor
preferredEditorMode
 
Fields inherited from class com.sibvisions.rad.ui.celleditor.AbstractStyledCellEditor
horizontalAlignment, verticalAlignment
 
Fields inherited from interface javax.rad.ui.IAlignmentConstants
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_DEFAULT, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_STRETCH, ALIGN_TOP
 
Fields inherited from interface javax.rad.ui.celleditor.IInplaceCellEditor
DOUBLE_CLICK, SINGLE_CLICK
 
Constructor Summary
protected AbstractChoiceCellEditor()
          Creates a new instance of AbstractChoiceCellEditor.
protected AbstractChoiceCellEditor(java.lang.Object[] pAllowedValues, java.lang.String[] pImageNames)
          Creates a new instance of AbstractChoiceCellEditor.
 
Method Summary
 java.lang.Object[] getAllowedValues()
          Gets all allowed values.
 java.lang.String getDefaultImageName()
          Gets the default image that is shown if selectedIndex is -1.
 java.lang.String[] getImageNames()
          Gets the image names that are used for displaying the corresponding values.
 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 com.sibvisions.rad.ui.celleditor.AbstractInplaceCellEditor
getPreferredEditorMode, setPreferredEditorMode
 
Methods inherited from class com.sibvisions.rad.ui.celleditor.AbstractStyledCellEditor
getHorizontalAlignment, getVerticalAlignment, isDirectCellEditor, 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
 
Methods inherited from interface javax.rad.model.ui.ICellRenderer
getCellRendererComponent
 

Field Detail

allowedValues

protected java.lang.Object[] allowedValues
The allowed values.


defaultImageName

protected java.lang.String defaultImageName
The name of the default image.


imageNames

protected java.lang.String[] imageNames
The name of the images to represent the values.

Constructor Detail

AbstractChoiceCellEditor

protected AbstractChoiceCellEditor()
Creates a new instance of AbstractChoiceCellEditor.


AbstractChoiceCellEditor

protected AbstractChoiceCellEditor(java.lang.Object[] pAllowedValues,
                                   java.lang.String[] pImageNames)
Creates a new instance of AbstractChoiceCellEditor.

Parameters:
pAllowedValues - the allowed values.
pImageNames - the image names.
Method Detail

getAllowedValues

public java.lang.Object[] getAllowedValues()
Gets all allowed values.

Specified by:
getAllowedValues in interface IChoiceCellEditor<C>
Returns:
all allowed values.

getDefaultImageName

public java.lang.String getDefaultImageName()
Gets the default image that is shown if selectedIndex is -1.

Specified by:
getDefaultImageName in interface IChoiceCellEditor<C>
Returns:
the default image.

getImageNames

public java.lang.String[] getImageNames()
Gets the image names that are used for displaying the corresponding values.

Specified by:
getImageNames in interface IChoiceCellEditor<C>
Returns:
the image names.

setAllowedValues

public void setAllowedValues(java.lang.Object[] pAllowedValues)
Sets all allowed values.

Specified by:
setAllowedValues in interface IChoiceCellEditor<C>
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<C>
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<C>
Parameters:
pImageNames - the image names.


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.