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

java.lang.Object
  extended by com.sibvisions.rad.ui.celleditor.AbstractStyledCellEditor
      extended by com.sibvisions.rad.ui.celleditor.AbstractImageViewer<java.awt.Component>
          extended by com.sibvisions.rad.ui.swing.ext.celleditor.JVxImageViewer
All Implemented Interfaces:
ICellEditor, ICellRenderer<java.awt.Component>, IImageViewer<java.awt.Component>, IStyledCellEditor, IAlignmentConstants

public class JVxImageViewer
extends AbstractImageViewer<java.awt.Component>

The JVxImageViewer provides the generation of the physical image viewer component, handles correct all events, and gives standard access to values.


Field Summary
 
Fields inherited from class com.sibvisions.rad.ui.celleditor.AbstractImageViewer
bPreserveAspectRatio, sDefaultImageName
 
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
 
Constructor Summary
JVxImageViewer()
          Constructs a new JVxChoiceCellEditor.
 
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.
 
Methods inherited from class com.sibvisions.rad.ui.celleditor.AbstractImageViewer
getDefaultImageName, isPreserveAspectRatio, setDefaultImageName, setPreserveAspectRatio
 
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
isDirectCellEditor
 
Methods inherited from interface javax.rad.ui.IAlignmentConstants
getHorizontalAlignment, getVerticalAlignment, setHorizontalAlignment, setVerticalAlignment
 

Constructor Detail

JVxImageViewer

public JVxImageViewer()
Constructs a new JVxChoiceCellEditor.

Method Detail

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.


Copyright © 2009 SIB Visions GmbH. All Rights Reserved.