com.sibvisions.rad.ui.swing.ext.celleditor
Class JVxLinkedCellEditor

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.AbstractComboCellEditor
              extended by com.sibvisions.rad.ui.celleditor.AbstractLinkedCellEditor
                  extended by com.sibvisions.rad.ui.swing.ext.celleditor.JVxLinkedCellEditor
All Implemented Interfaces:
ICellEditor, ICellRenderer<javax.swing.JComponent>, IComboCellEditor, IInplaceCellEditor, ILinkedCellEditor, IStyledCellEditor, IAlignmentConstants

public class JVxLinkedCellEditor
extends AbstractLinkedCellEditor
implements ICellRenderer<javax.swing.JComponent>

The JVxLinkedCellEditor provides the generation of the physical linked editor component, handles correct all events, and gives standard access to edited values.


Nested Class Summary
static class JVxLinkedCellEditor.CellEditorHandler
          Sets the internal changed Flag, and informs the CellEditorListener if editing is completed.
 
Field Summary
 
Fields inherited from class com.sibvisions.rad.ui.celleditor.AbstractLinkedCellEditor
additionalCondition, autoTableHeaderVisibility, columnView, displayReferencedColumnName, linkReference, popupSize, searchColumnMapping, searchTextAnywhere, sortByColumnName, tableHeaderVisible, tableReadOnly, validationEnabled
 
Fields inherited from class com.sibvisions.rad.ui.celleditor.AbstractComboCellEditor
autoOpenPopup
 
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.celleditor.IInplaceCellEditor
DOUBLE_CLICK, SINGLE_CLICK
 
Fields inherited from interface javax.rad.ui.IAlignmentConstants
ALIGN_BOTTOM, ALIGN_CENTER, ALIGN_DEFAULT, ALIGN_LEFT, ALIGN_RIGHT, ALIGN_STRETCH, ALIGN_TOP
 
Constructor Summary
JVxLinkedCellEditor()
          Constructs a new JVxLinkedCellEditor.
JVxLinkedCellEditor(ReferenceDefinition pLinkReference)
          Constructs a new JVxLinkedCellEditor with the given link reference.
 
Method Summary
 ICellEditorHandler<javax.swing.JComponent> createCellEditorHandler(ICellEditorListener pCellEditorListener, IDataRow pDataRow, java.lang.String pColumnName)
          creates an ICellEditorHandler library dependent component.
 javax.swing.JComponent getCellRendererComponent(javax.swing.JComponent pParentComponent, IDataPage pDataPage, int pRowNumber, IDataRow pDataRow, java.lang.String pColumnName, boolean pIsSelected, boolean hasFocus)
          Configures a IComponent for rendering.
 int getDefaultHorizontalAlignment(IDataRow pDataRow, java.lang.String pColumnName)
          Gets the default horizontal alignment based on data type.
 
Methods inherited from class com.sibvisions.rad.ui.celleditor.AbstractLinkedCellEditor
getAdditionalCondition, getColumnView, getDisplayReferencedColumnName, getDisplayValue, getLinkReference, getPopupSize, getSearchColumnMapping, isDirectCellEditor, isSearchTextAnywhere, isSortByColumnName, isTableHeaderVisible, isTableReadonly, isValidationEnabled, setAdditionalCondition, setColumnView, setDisplayReferencedColumnName, setLinkReference, setPopupSize, setSearchColumnMapping, setSearchTextAnywhere, setSortByColumnName, setTableHeaderVisible, setTableReadonly, setValidationEnabled
 
Methods inherited from class com.sibvisions.rad.ui.celleditor.AbstractComboCellEditor
isAutoOpenPopup, setAutoOpenPopup
 
Methods inherited from class com.sibvisions.rad.ui.celleditor.AbstractInplaceCellEditor
getPreferredEditorMode, setPreferredEditorMode
 
Methods inherited from class com.sibvisions.rad.ui.celleditor.AbstractStyledCellEditor
getHorizontalAlignment, getVerticalAlignment, 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.ui.celleditor.IComboCellEditor
isAutoOpenPopup, setAutoOpenPopup
 
Methods inherited from interface javax.rad.ui.celleditor.IInplaceCellEditor
getPreferredEditorMode, setPreferredEditorMode
 
Methods inherited from interface javax.rad.ui.IAlignmentConstants
getHorizontalAlignment, getVerticalAlignment, setHorizontalAlignment, setVerticalAlignment
 

Constructor Detail

JVxLinkedCellEditor

public JVxLinkedCellEditor()
Constructs a new JVxLinkedCellEditor.


JVxLinkedCellEditor

public JVxLinkedCellEditor(ReferenceDefinition pLinkReference)
Constructs a new JVxLinkedCellEditor with the given link reference.

Parameters:
pLinkReference - the link reference.
Method Detail

createCellEditorHandler

public ICellEditorHandler<javax.swing.JComponent> createCellEditorHandler(ICellEditorListener pCellEditorListener,
                                                                          IDataRow pDataRow,
                                                                          java.lang.String pColumnName)
creates an ICellEditorHandler library dependent component.

Specified by:
createCellEditorHandler in interface ICellEditor
Parameters:
pCellEditorListener - the ICellEditorListener
pDataRow - the IDataRow
pColumnName - the column name
Returns:
the ICellEditorHandler.

getCellRendererComponent

public javax.swing.JComponent getCellRendererComponent(javax.swing.JComponent pParentComponent,
                                                       IDataPage pDataPage,
                                                       int pRowNumber,
                                                       IDataRow pDataRow,
                                                       java.lang.String pColumnName,
                                                       boolean pIsSelected,
                                                       boolean hasFocus)
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<javax.swing.JComponent>
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).
hasFocus - 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.

getDefaultHorizontalAlignment

public int getDefaultHorizontalAlignment(IDataRow pDataRow,
                                         java.lang.String pColumnName)
Gets the default horizontal alignment based on data type. If default alignment is unknown, ALIGN_LEFT is returned.

Parameters:
pDataRow - the data row
pColumnName - the column name
Returns:
the default horizontal alignment


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.