org.openswing.swing.table.editors.client
Class DateCellEditor

java.lang.Object
  extended byorg.openswing.swing.table.editors.client.AbstractCellEditor
      extended byorg.openswing.swing.table.editors.client.DateCellEditor
All Implemented Interfaces:
javax.swing.CellEditor, javax.swing.table.TableCellEditor

public class DateCellEditor
extends AbstractCellEditor
implements javax.swing.table.TableCellEditor

Title: OpenSwing Framework

Description: Column editor used to edit a date/date+time/time type cell.

Copyright: Copyright (C) 2006 Mauro Carniel

This file is part of OpenSwing Framework. This library is free software; you can redistribute it and/or modify it under the terms of the (LGPL) Lesser General Public License as published by the Free Software Foundation; GNU LESSER GENERAL PUBLIC LICENSE Version 2.1, February 1999 This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Library General Public License for more details. You should have received a copy of the GNU Library General Public License along with this library; if not, write to the Free Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. The author may be contacted at: maurocarniel@tin.it


Constructor Summary
DateCellEditor(boolean required, int columnType, int format, java.lang.String timeFormat, java.util.ArrayList dateListeners, java.util.Calendar defaultDate, boolean strictUsage)
          Constructor.
 
Method Summary
 void finalize()
           
 java.lang.Object getCellEditorValue()
          This method should be overrided.
 java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
           
 java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree, java.lang.Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
           
 boolean stopCellEditing()
          Stop cell editing.
 
Methods inherited from class org.openswing.swing.table.editors.client.AbstractCellEditor
addCellEditorListener, cancelCellEditing, isCellEditable, removeCellEditorListener, shouldSelectCell
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface javax.swing.CellEditor
addCellEditorListener, cancelCellEditing, isCellEditable, removeCellEditorListener, shouldSelectCell
 

Constructor Detail

DateCellEditor

public DateCellEditor(boolean required,
                      int columnType,
                      int format,
                      java.lang.String timeFormat,
                      java.util.ArrayList dateListeners,
                      java.util.Calendar defaultDate,
                      boolean strictUsage)
Constructor.

Parameters:
required - flag used to set mandatory property of the cell
columnType - column type; possible values: Column.TYPE_DATE, Column.TYPE_TIME, Column.TYPE_DATE_TIME
defaultDate - optional default date to set in calendar when opening it and no date has been still set
Method Detail

stopCellEditing

public final boolean stopCellEditing()
Stop cell editing. This method stops cell editing (effectively committing the edit) only if the data entered is validated successfully.

Specified by:
stopCellEditing in interface javax.swing.CellEditor
Overrides:
stopCellEditing in class AbstractCellEditor
Returns:
true if cell editing may stop, and false otherwise.

getCellEditorValue

public final java.lang.Object getCellEditorValue()
Description copied from class: AbstractCellEditor
This method should be overrided.

Specified by:
getCellEditorValue in interface javax.swing.CellEditor
Overrides:
getCellEditorValue in class AbstractCellEditor
Returns:
null

getTableCellEditorComponent

public final java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
                                                            java.lang.Object value,
                                                            boolean isSelected,
                                                            int row,
                                                            int column)
Specified by:
getTableCellEditorComponent in interface javax.swing.table.TableCellEditor

getTreeCellEditorComponent

public java.awt.Component getTreeCellEditorComponent(javax.swing.JTree tree,
                                                     java.lang.Object value,
                                                     boolean isSelected,
                                                     boolean expanded,
                                                     boolean leaf,
                                                     int row)

finalize

public final void finalize()