1 /* DefaultCellEditor.java --
2 Copyright (C) 2002, 2004 Free Software Foundation, Inc.
4 This file is part of GNU Classpath.
6 GNU Classpath is free software; you can redistribute it and/or modify
7 it under the terms of the GNU General Public License as published by
8 the Free Software Foundation; either version 2, or (at your option)
11 GNU Classpath is distributed in the hope that it will be useful, but
12 WITHOUT ANY WARRANTY; without even the implied warranty of
13 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14 General Public License for more details.
16 You should have received a copy of the GNU General Public License
17 along with GNU Classpath; see the file COPYING. If not, write to the
18 Free Software Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA
21 Linking this library statically or dynamically with other modules is
22 making a combined work based on this library. Thus, the terms and
23 conditions of the GNU General Public License cover the whole
26 As a special exception, the copyright holders of this library give you
27 permission to link this library with independent modules to produce an
28 executable, regardless of the license terms of these independent
29 modules, and to copy and distribute the resulting executable under
30 terms of your choice, provided that you also meet, for each linked
31 independent module, the terms and conditions of the license of that
32 module. An independent module is a module which is not derived from
33 or based on this library. If you modify this library, you may extend
34 this exception to your version of the library, but you are not
35 obligated to do so. If you do not wish to do so, delete this
36 exception statement from your version. */
41 import java
.awt
.Component
;
42 import java
.awt
.event
.ActionEvent
;
43 import java
.awt
.event
.ActionListener
;
44 import java
.awt
.event
.ItemEvent
;
45 import java
.awt
.event
.ItemListener
;
46 import java
.io
.Serializable
;
47 import java
.util
.EventObject
;
49 import javax
.swing
.table
.TableCellEditor
;
50 import javax
.swing
.tree
.TreeCellEditor
;
54 * @author Andrew Selkirk
57 public class DefaultCellEditor
58 extends AbstractCellEditor
59 implements TableCellEditor
, TreeCellEditor
61 private static final long serialVersionUID
= 3564035141373880027L;
66 protected class EditorDelegate
67 implements ActionListener
, ItemListener
, Serializable
69 private static final long serialVersionUID
= -1420007406015481933L;
74 protected Object value
;
77 * Constructor EditorDelegate
80 protected EditorDelegate()
88 public void setValue(Object event
)
96 public Object
getCellEditorValue() {
98 } // getCellEditorValue()
105 public boolean isCellEditable(EventObject event
) {
106 return false; // TODO
107 } // isCellEditable()
114 public boolean shouldSelectCell(EventObject event
) {
115 return false; // TODO
116 } // shouldSelectCell()
122 public boolean stopCellEditing() {
123 return false; // TODO
124 } // stopCellEditing()
129 public void cancelCellEditing() {
131 } // cancelCellEditing()
138 public boolean startCellEditing(EventObject event
) {
139 return false; // TODO
140 } // startCellEditing()
146 public void actionPerformed(ActionEvent event
) {
148 } // actionPerformed()
154 public void itemStateChanged(ItemEvent event
) {
156 } // itemStateChanged()
164 protected JComponent editorComponent
;
169 protected EditorDelegate delegate
;
174 protected int clickCountToStart
;
177 * Constructor DefaultCellEditor
178 * @param textfield TODO
180 public DefaultCellEditor(JTextField textfield
) {
182 } // DefaultCellEditor()
185 * Constructor DefaultCellEditor
186 * @param checkbox TODO
188 public DefaultCellEditor(JCheckBox checkbox
) {
190 } // DefaultCellEditor()
193 * Constructor DefaultCellEditor
194 * @param combobox TODO
196 public DefaultCellEditor(JComboBox combobox
) {
198 } // DefaultCellEditor()
204 public Component
getComponent() {
209 * getClickCountToStart
212 public int getClickCountToStart() {
214 } // getClickCountToStart()
217 * setClickCountToStart
220 public void setClickCountToStart(int count
) {
222 } // setClickCountToStart()
228 public Object
getCellEditorValue() {
230 } // getCellEditorValue()
237 public boolean isCellEditable(EventObject event
) {
238 return false; // TODO
239 } // isCellEditable()
246 public boolean shouldSelectCell(EventObject event
) {
247 return false; // TODO
248 } // shouldSelectCell()
254 public boolean stopCellEditing() {
255 return false; // TODO
256 } // stopCellEditing()
261 public void cancelCellEditing() {
263 } // cancelCellEditing()
266 * getTreeCellEditorComponent
269 * @param isSelected TODO
270 * @param expanded TODO
275 public Component
getTreeCellEditorComponent(JTree tree
,
276 Object value
, boolean isSelected
, boolean expanded
,
277 boolean leaf
, int row
) {
279 } // getTreeCellEditorComponent()
282 * getTableCellEditorComponent
285 * @param isSelected TODO
290 public Component
getTableCellEditorComponent(JTable tree
,
291 Object value
, boolean isSelected
, int row
, int column
) {
293 } // getTableCellEditorComponent()