ElegantJ Data Tables Java API Specification v1.1

com.elegantj.awt.table
Class ChoiceTableCellEditor

java.lang.Object
  extended byjava.awt.Component
      extended byjava.awt.Choice
          extended bycom.elegantj.awt.table.ChoiceTableCellEditor
All Implemented Interfaces:
javax.accessibility.Accessible, java.util.EventListener, java.awt.image.ImageObserver, java.awt.event.ItemListener, java.awt.ItemSelectable, java.awt.event.KeyListener, java.awt.MenuContainer, java.io.Serializable, TableCellEditor

public class ChoiceTableCellEditor
extends java.awt.Choice
implements TableCellEditor, java.awt.event.KeyListener, java.awt.event.ItemListener

ChoiceTableCellEditor Class which provides the awt checkbox as the cell editor for the AWTTable

See Also:
Serialized Form

Nested Class Summary
 
Nested classes inherited from class java.awt.Choice
java.awt.Choice.AccessibleAWTChoice
 
Nested classes inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
ChoiceTableCellEditor()
          Constructs the ChoiceTableCellEditor
 
Method Summary
 java.util.Vector convertToVector(java.lang.Object[] anArray)
          Method which converts the array to the vector
 java.lang.Object getCellEditorValue()
          Method which returns the cell editor value
 java.awt.Component getTableCellEditorComponent(AWTTable table, java.lang.Object value, boolean isSelected, int row, int column)
          Sets an initial value for the editor.
 void itemStateChanged(java.awt.event.ItemEvent e)
          Implementation of the ItemListener
 void keyPressed(java.awt.event.KeyEvent e)
          Implementation of the KeyListener
 void keyReleased(java.awt.event.KeyEvent e)
          Implementation of the KeyListener
 void keyTyped(java.awt.event.KeyEvent e)
          Implementation of the KeyListener
 void setChoiceItems(java.util.Vector choiceVector)
          Method which sets the choice items for the ChoiceTableCellEditor
 void setValue(java.lang.Object choiceObject)
          Method which sets the value for the cell editor
 
Methods inherited from class java.awt.Choice
add, addItem, addItemListener, addNotify, countItems, getAccessibleContext, getItem, getItemCount, getItemListeners, getListeners, getSelectedIndex, getSelectedItem, getSelectedObjects, insert, paramString, processEvent, processItemEvent, remove, remove, removeAll, removeItemListener, select, select
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paint, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, update, validate
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ChoiceTableCellEditor

public ChoiceTableCellEditor()
Constructs the ChoiceTableCellEditor

Method Detail

getTableCellEditorComponent

public java.awt.Component getTableCellEditorComponent(AWTTable table,
                                                      java.lang.Object value,
                                                      boolean isSelected,
                                                      int row,
                                                      int column)
Sets an initial value for the editor. This will cause the editor to stopEditing and lose any partially edited value if the editor is editing when this method is called.

Returns the component that should be added to the client's Component hierarchy. Once installed in the client's hierarchy this component will then be able to draw and receive user input.

Specified by:
getTableCellEditorComponent in interface TableCellEditor
Parameters:
table - the AWTTable that is asking the editor to edit; can be null
value - the value of the cell to be edited; it is up to the specific editor to interpret and draw the value. For example, if value is the string "true", it could be rendered as a string or it could be rendered as a check box that is checked. null is a valid value
isSelected - true if the cell is to be rendered with highlighting
row - the row of the cell being edited
column - the column of the cell being edited
Returns:
the component for editing

setValue

public void setValue(java.lang.Object choiceObject)
Method which sets the value for the cell editor


setChoiceItems

public void setChoiceItems(java.util.Vector choiceVector)
Method which sets the choice items for the ChoiceTableCellEditor

Parameters:
choiceVector - The vector containing the string values

getCellEditorValue

public java.lang.Object getCellEditorValue()
Method which returns the cell editor value

Specified by:
getCellEditorValue in interface TableCellEditor
Returns:
The The cell editor value

convertToVector

public java.util.Vector convertToVector(java.lang.Object[] anArray)
Method which converts the array to the vector

Parameters:
anArray - The array
Returns:
The vector

keyPressed

public void keyPressed(java.awt.event.KeyEvent e)
Implementation of the KeyListener

Specified by:
keyPressed in interface java.awt.event.KeyListener

keyTyped

public void keyTyped(java.awt.event.KeyEvent e)
Implementation of the KeyListener

Specified by:
keyTyped in interface java.awt.event.KeyListener

keyReleased

public void keyReleased(java.awt.event.KeyEvent e)
Implementation of the KeyListener

Specified by:
keyReleased in interface java.awt.event.KeyListener

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent e)
Implementation of the ItemListener

Specified by:
itemStateChanged in interface java.awt.event.ItemListener

ElegantJ Data Tables Java API Specification v1.1

Submit a bug or feature

Copyright(c)
Elegant Microweb Technologies Pvt. Ltd.
www.elegantmicroweb.com
www.elegantjbeans.com
All Rights Reserved.