org.wings.table
Class SDefaultTableRowSelectionRenderer

java.lang.Object
  extended by org.wings.SComponent
      extended by org.wings.SLabel
          extended by org.wings.table.SDefaultTableRowSelectionRenderer
All Implemented Interfaces:
Serializable, Cloneable, Renderable, STableCellRenderer

public class SDefaultTableRowSelectionRenderer
extends SLabel
implements STableCellRenderer

Renderer responsible for the row selection column in cases where the table cannot distinguish clicks on cells as selection clicks or editing clicks.

Author:
Benjamin Schmid
See Also:
Serialized Form

Field Summary
static SResourceIcon DEFAULT_MULTI_NOT_SELECTION_ICON
           
static SResourceIcon DEFAULT_MULTI_SELECTION_ICON
           
static SResourceIcon DEFAULT_SINGLE_NOT_SELECTION_ICON
           
static SResourceIcon DEFAULT_SINGLE_SELECTION_ICON
           
protected  SResourceIcon multiNonSelectionIcon
           
protected  SResourceIcon multiSelectionIcon
           
protected  String nonSelectionStyle
          Style to use for the foreground for non-selected nodes.
protected  String selectionStyle
          Style to use for the foreground for non-selected nodes.
protected  SResourceIcon singleNonSelectionIcon
           
protected  SResourceIcon singleSelectionIcon
           
protected  boolean useIcons
          If set to true render the row selection colum with icons, otherwise simple text.
 
Fields inherited from class org.wings.SLabel
disabledIcon, horizontalTextPosition, icon, iconTextGap, text, verticalTextPosition, wordWrap
 
Fields inherited from class org.wings.SComponent
DONE_RENDERING, dynamicStyles, enabled, propertyChangeSupport, SELECTOR_ALL, START_RENDERING, visible, WHEN_FOCUSED_OR_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_IN_FOCUSED_FRAME
 
Constructor Summary
SDefaultTableRowSelectionRenderer()
           
 
Method Summary
 SResourceIcon getMultiNonSelectionIcon()
           
 SResourceIcon getMultiSelectionIcon()
           
 String getNonSelectionStyle()
          Returns the style the cell is drawn with when the cell isn't selected.
 String getSelectionStyle()
          Returns the style the cell is drawn with when the cell isn't selected.
 SResourceIcon getSingleNonSelectionIcon()
           
 SResourceIcon getSingleSelectionIcon()
           
 SComponent getTableCellRendererComponent(STable table, Object value, boolean selected, int row, int col)
           
 boolean isUseIcons()
          Returns if set to true render the row selection colum with icons, otherwise simple text.
 void setMultiNonSelectionIcon(SResourceIcon multiNonSelectionIcon)
           
 void setMultiSelectionIcon(SResourceIcon multiSelectionIcon)
           
 void setNonSelectionStyle(String newStyle)
          Sets the style the cell is drawn with when the cell isn't selected.
 void setSelectionStyle(String newStyle)
          Sets the style the cell is drawn with when the cell isn't selected.
 void setSingleNonSelectionIcon(SResourceIcon singleNonSelectionIcon)
           
 void setSingleSelectionIcon(SResourceIcon singleSelectionIcon)
           
 void setUseIcons(boolean useIcons)
          Sets if set to true render the row selection colum with icons, otherwise simple text.
 
Methods inherited from class org.wings.SLabel
getDisabledIcon, getHorizontalTextPosition, getIcon, getIconTextGap, getText, getVerticalTextPosition, isWordWrap, setCG, setDisabledIcon, setHorizontalTextPosition, setIcon, setIconTextGap, setText, setVerticalTextPosition, setWordWrap
 
Methods inherited from class org.wings.SComponent
addComponentListener, addDynamicStyle, addEventListener, addNotify, addParentFrameListener, addPropertyChangeListener, addPropertyChangeListener, addRenderListener, addScriptListener, addStyle, clone, fireComponentChangeEvent, fireFinalEvents, fireKeyEvents, fireRenderEvent, getActionMap, getBackground, getBorder, getCG, getClientProperty, getComponentPopupMenu, getDynamicStyle, getDynamicStyles, getFocusTraversalIndex, getFont, getForeground, getHorizontalAlignment, getInputMap, getInputMap, getListenerCount, getListenerList, getListeners, getLowLevelEventId, getName, getParent, getParentFrame, getPreferredSize, getRequestURL, getResidesInForm, getScriptListenerList, getScriptListeners, getSession, getShowAsFormComponent, getStyle, getToolTipText, getVerticalAlignment, invite, isDifferent, isEnabled, isFocusOwner, isRecursivelyVisible, isReloadForced, isUpdatePossible, isVisible, paramString, processComponentEvent, processKeyEvents, processLowLevelEvent, putClientProperty, reload, reloadIfChange, reloadIfChange, reloadIfChange, reloadIfChange, reloadIfChange, reloadIfChange, reloadIfChange, reloadIfChange, reloadIfChange, removeComponentListener, removeDynamicStyle, removeEventListener, removeNotify, removeParentFrameListener, removePropertyChangeListener, removePropertyChangeListener, removeRenderListener, removeScriptListener, removeStyle, requestFocus, scrollRectToVisible, setActionMap, setAttribute, setAttribute, setAttribute, setAttribute, setAttribute, setAttributes, setBackground, setBorder, setCG, setComponentPopupMenu, setDynamicStyles, setEnabled, setFocusTraversalIndex, setFont, setForeground, setHorizontalAlignment, setInputMap, setInputMap, setName, setNameRaw, setParent, setParentFrame, setPreferredSize, setReloadForced, setShowAsFormComponent, setStyle, setToolTipText, setVerticalAlignment, setVisible, toString, update, updateCG, write
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

DEFAULT_MULTI_SELECTION_ICON

public static final SResourceIcon DEFAULT_MULTI_SELECTION_ICON

DEFAULT_MULTI_NOT_SELECTION_ICON

public static final SResourceIcon DEFAULT_MULTI_NOT_SELECTION_ICON

DEFAULT_SINGLE_SELECTION_ICON

public static final SResourceIcon DEFAULT_SINGLE_SELECTION_ICON

DEFAULT_SINGLE_NOT_SELECTION_ICON

public static final SResourceIcon DEFAULT_SINGLE_NOT_SELECTION_ICON

nonSelectionStyle

protected String nonSelectionStyle
Style to use for the foreground for non-selected nodes.


selectionStyle

protected String selectionStyle
Style to use for the foreground for non-selected nodes.


multiSelectionIcon

protected SResourceIcon multiSelectionIcon

multiNonSelectionIcon

protected SResourceIcon multiNonSelectionIcon

singleSelectionIcon

protected SResourceIcon singleSelectionIcon

singleNonSelectionIcon

protected SResourceIcon singleNonSelectionIcon

useIcons

protected boolean useIcons
If set to true render the row selection colum with icons, otherwise simple text.

Constructor Detail

SDefaultTableRowSelectionRenderer

public SDefaultTableRowSelectionRenderer()
Method Detail

getTableCellRendererComponent

public SComponent getTableCellRendererComponent(STable table,
                                                Object value,
                                                boolean selected,
                                                int row,
                                                int col)
Specified by:
getTableCellRendererComponent in interface STableCellRenderer

setNonSelectionStyle

public void setNonSelectionStyle(String newStyle)
Sets the style the cell is drawn with when the cell isn't selected.


getNonSelectionStyle

public String getNonSelectionStyle()
Returns the style the cell is drawn with when the cell isn't selected.


setSelectionStyle

public void setSelectionStyle(String newStyle)
Sets the style the cell is drawn with when the cell isn't selected.


getSelectionStyle

public String getSelectionStyle()
Returns the style the cell is drawn with when the cell isn't selected.


getMultiSelectionIcon

public SResourceIcon getMultiSelectionIcon()
Returns:
Icon used for selected rows in multi-selection mode for selected lines

setMultiSelectionIcon

public void setMultiSelectionIcon(SResourceIcon multiSelectionIcon)
Parameters:
multiSelectionIcon - Icon used for selected rows in multi-selection mode for selected lines

getMultiNonSelectionIcon

public SResourceIcon getMultiNonSelectionIcon()
Returns:
Icon used for selected rows in multi-selection mode for unselected lines

setMultiNonSelectionIcon

public void setMultiNonSelectionIcon(SResourceIcon multiNonSelectionIcon)
Parameters:
multiNonSelectionIcon - Icon used for selected rows in multi-selection mode for unselected lines

getSingleSelectionIcon

public SResourceIcon getSingleSelectionIcon()
Returns:
Icon used for selected rows in single-selection mode tables for selected lines

setSingleSelectionIcon

public void setSingleSelectionIcon(SResourceIcon singleSelectionIcon)
Parameters:
singleSelectionIcon - Icon used for selected rows in single-selection mode tables for selected lines

getSingleNonSelectionIcon

public SResourceIcon getSingleNonSelectionIcon()
Returns:
Icon used for selected rows in single-selection mode tables for unselected lines

setSingleNonSelectionIcon

public void setSingleNonSelectionIcon(SResourceIcon singleNonSelectionIcon)
Parameters:
singleNonSelectionIcon - Icon used for selected rows in single-selection mode tables for unselected lines

isUseIcons

public boolean isUseIcons()
Returns if set to true render the row selection colum with icons, otherwise simple text.

Returns:
if set to true render the row selection colum with icons, otherwise simple text.

setUseIcons

public void setUseIcons(boolean useIcons)
Sets if set to true render the row selection colum with icons, otherwise simple text.

Parameters:
useIcons - if set to true render the row selection colum with icons, otherwise simple text.


wingS Swings ;-)