javax.rad.genui.celleditor
Class UICheckBoxCellEditor

java.lang.Object
  extended by javax.rad.genui.celleditor.UICellEditor<ICheckBoxCellEditor>
      extended by javax.rad.genui.celleditor.UICheckBoxCellEditor
All Implemented Interfaces:
ICellEditor, ICellRenderer, ICheckBoxCellEditor, IStyledCellEditor, IAlignmentConstants, IResource

public class UICheckBoxCellEditor
extends UICellEditor<ICheckBoxCellEditor>
implements ICheckBoxCellEditor

Platform and technology independent check box 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
  UICheckBoxCellEditor()
          Creates a new instance of UICheckBoxCellEditor.
protected UICheckBoxCellEditor(ICheckBoxCellEditor pEditor)
          Creates a new instance of UICheckBoxCellEditor with the given choice cell editor.
  UICheckBoxCellEditor(Object pSelectedValue, Object pDeselectedValue)
          Creates a new instance of UICheckBoxCellEditor with the given selected and deselected values.
  UICheckBoxCellEditor(Object pSelectedValue, Object pDeselectedValue, String pText)
          Creates a new instance of UICheckBoxCellEditor with the given selected and deselected values.
 
Method Summary
 Object getCellRendererComponent(Object pParentComponent, IDataPage pDataPage, int pRowNumber, IDataRow pDataRow, String pColumnName, boolean pIsSelected, boolean pHasFocus)
          Configures a IComponent for rendering.
 Object getDeselectedValue()
          Gets the value for deselected state.
 Object getSelectedValue()
          Gets the value for selected state.
 String getText()
          Gets the text of the checkbox button.
 void setDeselectedValue(Object pDeselectedValue)
          Sets the value for deselected state.
 void setSelectedValue(Object pSelectedValue)
          Sets the value for selected state.
 void setText(String pText)
          Sets the text of the checkbox button.
 
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

UICheckBoxCellEditor

public UICheckBoxCellEditor()
Creates a new instance of UICheckBoxCellEditor.

See Also:
ICheckBoxCellEditor

UICheckBoxCellEditor

protected UICheckBoxCellEditor(ICheckBoxCellEditor pEditor)
Creates a new instance of UICheckBoxCellEditor with the given choice cell editor.

Parameters:
pEditor - the choice cell editor
See Also:
ICheckBoxCellEditor

UICheckBoxCellEditor

public UICheckBoxCellEditor(Object pSelectedValue,
                            Object pDeselectedValue)
Creates a new instance of UICheckBoxCellEditor with the given selected and deselected values.

Parameters:
pSelectedValue - the selected value.
pDeselectedValue - the deselected value.

UICheckBoxCellEditor

public UICheckBoxCellEditor(Object pSelectedValue,
                            Object pDeselectedValue,
                            String pText)
Creates a new instance of UICheckBoxCellEditor with the given selected and deselected values.

Parameters:
pSelectedValue - the selected value.
pDeselectedValue - the deselected value.
pText - the text.
Method Detail

getSelectedValue

public Object getSelectedValue()
Gets the value for selected state.

Specified by:
getSelectedValue in interface ICheckBoxCellEditor
Returns:
all allowed values.

setSelectedValue

public void setSelectedValue(Object pSelectedValue)
Sets the value for selected state.

Specified by:
setSelectedValue in interface ICheckBoxCellEditor
Parameters:
pSelectedValue - the value for selected state.

getDeselectedValue

public Object getDeselectedValue()
Gets the value for deselected state.

Specified by:
getDeselectedValue in interface ICheckBoxCellEditor
Returns:
the value for deselected state.

setDeselectedValue

public void setDeselectedValue(Object pDeselectedValue)
Sets the value for deselected state.

Specified by:
setDeselectedValue in interface ICheckBoxCellEditor
Parameters:
pDeselectedValue - the value for deselected state.

getText

public String getText()
Gets the text of the checkbox button. If no text is set, the column label is used.

Specified by:
getText in interface ICheckBoxCellEditor
Returns:
the text of the checkbox button.

setText

public void setText(String pText)
Sets the text of the checkbox button. If no text is set, the column label is used.

Specified by:
setText in interface ICheckBoxCellEditor
Parameters:
pText - the text of the checkbox button.

getCellRendererComponent

public Object getCellRendererComponent(Object pParentComponent,
                                       IDataPage pDataPage,
                                       int pRowNumber,
                                       IDataRow pDataRow,
                                       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.

Specified by:
getCellRendererComponent in interface ICellRenderer
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.


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.