JComponentPack 1.5.0

com.zfqjava.swing.cell
Class BooleanCellRenderer

java.lang.Object
  extended by com.zfqjava.swing.cell.AbstractCellRenderer
      extended by com.zfqjava.swing.cell.ObjectCellRenderer
          extended by com.zfqjava.swing.cell.BooleanCellRenderer
All Implemented Interfaces:
ListCellRenderer, Renderer, TableCellRenderer, TreeCellRenderer

public class BooleanCellRenderer
extends ObjectCellRenderer

BooleanCellRenderer provides a boolean cell renderer, can renderer JList, JTable, JTree.


Field Summary
static int CHECK_BOX
          Identifies the checkbox component type.
static int LABEL
          Identifies the label component type.
 
Fields inherited from class com.zfqjava.swing.cell.ObjectCellRenderer
defaultHorizontalAlignment, defaultVerticalAlignment, label
 
Fields inherited from class com.zfqjava.swing.cell.AbstractCellRenderer
noFocusBorder, useFocusColor
 
Constructor Summary
BooleanCellRenderer()
           
 
Method Summary
 Component getComponent()
          Returns the component for this renderer.
 int getComponentType()
          Returns the component type for this renderer.
 void setComponentType(int componentType)
          Sets the component type for this renderer.
 void setOpaque(boolean opaque)
          Sets the opaque property.
protected  void setValue(Object value)
          Sets the value for current renderer.
 void updateUI()
          Updates UI.
 
Methods inherited from class com.zfqjava.swing.cell.ObjectCellRenderer
createLabel, getDefaultHorizontalAlignment, getDefaultVerticalAlignment, setDefaultHorizontalAlignment, setDefaultVerticalAlignment
 
Methods inherited from class com.zfqjava.swing.cell.AbstractCellRenderer
getCellProvider, getCellRendererComponent, getCellRendererComponentType, getListCellRendererComponent, getTableCellRendererComponent, getTreeCellRendererComponent, isOpaque, setCellProvider, setCellRendererComponentType, setValue
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LABEL

public static final int LABEL
Identifies the label component type.

Since:
JDataGrid 1.6.1
See Also:
Constant Field Values

CHECK_BOX

public static final int CHECK_BOX
Identifies the checkbox component type.

Since:
JDataGrid 1.6.1
See Also:
Constant Field Values
Constructor Detail

BooleanCellRenderer

public BooleanCellRenderer()
Method Detail

setComponentType

public void setComponentType(int componentType)
Sets the component type for this renderer.

Parameters:
componentType - the component type

getComponentType

public int getComponentType()
Returns the component type for this renderer.

Returns:
the component type

getComponent

public Component getComponent()
Description copied from class: AbstractCellRenderer
Returns the component for this renderer.

Specified by:
getComponent in interface Renderer
Overrides:
getComponent in class ObjectCellRenderer
Returns:
the component for this renderer

setValue

protected void setValue(Object value)
Description copied from class: AbstractCellRenderer
Sets the value for current renderer. This method aims to format the object in subclass.

Overrides:
setValue in class ObjectCellRenderer
Parameters:
value - the value to renderer

updateUI

public void updateUI()
Description copied from class: AbstractCellRenderer
Updates UI.

Overrides:
updateUI in class ObjectCellRenderer

setOpaque

public void setOpaque(boolean opaque)
Description copied from class: AbstractCellRenderer
Sets the opaque property.

Overrides:
setOpaque in class ObjectCellRenderer
Parameters:
opaque - the opaque property

JComponentPack 1.5.0

Send your Feedback
JComponentPack 1.5.0
Copyright © 2001-2007 Extreme Component, Inc. All rights reserved.