| 1 | /* DefaultCellEditor.java --
|
|---|
| 2 | Copyright (C) 2002 Free Software Foundation, Inc.
|
|---|
| 3 |
|
|---|
| 4 | This file is part of GNU Classpath.
|
|---|
| 5 |
|
|---|
| 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)
|
|---|
| 9 | any later version.
|
|---|
| 10 |
|
|---|
| 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.
|
|---|
| 15 |
|
|---|
| 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
|
|---|
| 19 | 02111-1307 USA.
|
|---|
| 20 |
|
|---|
| 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
|
|---|
| 24 | combination.
|
|---|
| 25 |
|
|---|
| 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. */
|
|---|
| 37 |
|
|---|
| 38 | package javax.swing;
|
|---|
| 39 |
|
|---|
| 40 | // Imports
|
|---|
| 41 | import java.awt.*;
|
|---|
| 42 | import java.awt.event.*;
|
|---|
| 43 | import java.io.*;
|
|---|
| 44 | import java.util.*;
|
|---|
| 45 | import javax.swing.table.*;
|
|---|
| 46 | import javax.swing.tree.*;
|
|---|
| 47 |
|
|---|
| 48 | /**
|
|---|
| 49 | * DefaultCellEditor
|
|---|
| 50 | * @author Andrew Selkirk
|
|---|
| 51 | * @version 1.0
|
|---|
| 52 | */
|
|---|
| 53 | public class DefaultCellEditor extends AbstractCellEditor implements TableCellEditor, TreeCellEditor {
|
|---|
| 54 |
|
|---|
| 55 | //-------------------------------------------------------------
|
|---|
| 56 | // Classes ----------------------------------------------------
|
|---|
| 57 | //-------------------------------------------------------------
|
|---|
| 58 |
|
|---|
| 59 | /**
|
|---|
| 60 | * EditorDelegate
|
|---|
| 61 | */
|
|---|
| 62 | protected class EditorDelegate implements ActionListener,
|
|---|
| 63 | ItemListener, Serializable {
|
|---|
| 64 |
|
|---|
| 65 | //-------------------------------------------------------------
|
|---|
| 66 | // Variables --------------------------------------------------
|
|---|
| 67 | //-------------------------------------------------------------
|
|---|
| 68 |
|
|---|
| 69 | /**
|
|---|
| 70 | * value
|
|---|
| 71 | */
|
|---|
| 72 | protected Object value;
|
|---|
| 73 |
|
|---|
| 74 |
|
|---|
| 75 | //-------------------------------------------------------------
|
|---|
| 76 | // Initialization ---------------------------------------------
|
|---|
| 77 | //-------------------------------------------------------------
|
|---|
| 78 |
|
|---|
| 79 | /**
|
|---|
| 80 | * Constructor EditorDelegate
|
|---|
| 81 | * @param value0 TODO
|
|---|
| 82 | */
|
|---|
| 83 | protected EditorDelegate(DefaultCellEditor editor) {
|
|---|
| 84 | // TODO
|
|---|
| 85 | } // EditorDelegate()
|
|---|
| 86 |
|
|---|
| 87 |
|
|---|
| 88 | //-------------------------------------------------------------
|
|---|
| 89 | // Methods ----------------------------------------------------
|
|---|
| 90 | //-------------------------------------------------------------
|
|---|
| 91 |
|
|---|
| 92 | /**
|
|---|
| 93 | * setValue
|
|---|
| 94 | * @param event TODO
|
|---|
| 95 | */
|
|---|
| 96 | public void setValue(Object event) {
|
|---|
| 97 | // TODO
|
|---|
| 98 | } // setValue()
|
|---|
| 99 |
|
|---|
| 100 | /**
|
|---|
| 101 | * getCellEditorValue
|
|---|
| 102 | * @returns Object
|
|---|
| 103 | */
|
|---|
| 104 | public Object getCellEditorValue() {
|
|---|
| 105 | return null; // TODO
|
|---|
| 106 | } // getCellEditorValue()
|
|---|
| 107 |
|
|---|
| 108 | /**
|
|---|
| 109 | * isCellEditable
|
|---|
| 110 | * @param event TODO
|
|---|
| 111 | * @returns boolean
|
|---|
| 112 | */
|
|---|
| 113 | public boolean isCellEditable(EventObject event) {
|
|---|
| 114 | return false; // TODO
|
|---|
| 115 | } // isCellEditable()
|
|---|
| 116 |
|
|---|
| 117 | /**
|
|---|
| 118 | * shouldSelectCell
|
|---|
| 119 | * @param event TODO
|
|---|
| 120 | * @returns boolean
|
|---|
| 121 | */
|
|---|
| 122 | public boolean shouldSelectCell(EventObject event) {
|
|---|
| 123 | return false; // TODO
|
|---|
| 124 | } // shouldSelectCell()
|
|---|
| 125 |
|
|---|
| 126 | /**
|
|---|
| 127 | * stopCellEditing
|
|---|
| 128 | * @returns boolean
|
|---|
| 129 | */
|
|---|
| 130 | public boolean stopCellEditing() {
|
|---|
| 131 | return false; // TODO
|
|---|
| 132 | } // stopCellEditing()
|
|---|
| 133 |
|
|---|
| 134 | /**
|
|---|
| 135 | * cancelCellEditing
|
|---|
| 136 | */
|
|---|
| 137 | public void cancelCellEditing() {
|
|---|
| 138 | // TODO
|
|---|
| 139 | } // cancelCellEditing()
|
|---|
| 140 |
|
|---|
| 141 | /**
|
|---|
| 142 | * startCellEditing
|
|---|
| 143 | * @param event TODO
|
|---|
| 144 | * @returns boolean
|
|---|
| 145 | */
|
|---|
| 146 | public boolean startCellEditing(EventObject event) {
|
|---|
| 147 | return false; // TODO
|
|---|
| 148 | } // startCellEditing()
|
|---|
| 149 |
|
|---|
| 150 | /**
|
|---|
| 151 | * actionPerformed
|
|---|
| 152 | * @param event TODO
|
|---|
| 153 | */
|
|---|
| 154 | public void actionPerformed(ActionEvent event) {
|
|---|
| 155 | // TODO
|
|---|
| 156 | } // actionPerformed()
|
|---|
| 157 |
|
|---|
| 158 | /**
|
|---|
| 159 | * itemStateChanged
|
|---|
| 160 | * @param event TODO
|
|---|
| 161 | */
|
|---|
| 162 | public void itemStateChanged(ItemEvent event) {
|
|---|
| 163 | // TODO
|
|---|
| 164 | } // itemStateChanged()
|
|---|
| 165 |
|
|---|
| 166 |
|
|---|
| 167 | } // EditorDelegate
|
|---|
| 168 |
|
|---|
| 169 |
|
|---|
| 170 | //-------------------------------------------------------------
|
|---|
| 171 | // Variables --------------------------------------------------
|
|---|
| 172 | //-------------------------------------------------------------
|
|---|
| 173 |
|
|---|
| 174 | /**
|
|---|
| 175 | * editorComponent
|
|---|
| 176 | */
|
|---|
| 177 | protected JComponent editorComponent;
|
|---|
| 178 |
|
|---|
| 179 | /**
|
|---|
| 180 | * delegate
|
|---|
| 181 | */
|
|---|
| 182 | protected EditorDelegate delegate;
|
|---|
| 183 |
|
|---|
| 184 | /**
|
|---|
| 185 | * clickCountToStart
|
|---|
| 186 | */
|
|---|
| 187 | protected int clickCountToStart;
|
|---|
| 188 |
|
|---|
| 189 |
|
|---|
| 190 | //-------------------------------------------------------------
|
|---|
| 191 | // Initialization ---------------------------------------------
|
|---|
| 192 | //-------------------------------------------------------------
|
|---|
| 193 |
|
|---|
| 194 | /**
|
|---|
| 195 | * Constructor DefaultCellEditor
|
|---|
| 196 | * @param textfield TODO
|
|---|
| 197 | */
|
|---|
| 198 | public DefaultCellEditor(JTextField textfield) {
|
|---|
| 199 | // TODO
|
|---|
| 200 | } // DefaultCellEditor()
|
|---|
| 201 |
|
|---|
| 202 | /**
|
|---|
| 203 | * Constructor DefaultCellEditor
|
|---|
| 204 | * @param checkbox TODO
|
|---|
| 205 | */
|
|---|
| 206 | public DefaultCellEditor(JCheckBox checkbox) {
|
|---|
| 207 | // TODO
|
|---|
| 208 | } // DefaultCellEditor()
|
|---|
| 209 |
|
|---|
| 210 | /**
|
|---|
| 211 | * Constructor DefaultCellEditor
|
|---|
| 212 | * @param combobox TODO
|
|---|
| 213 | */
|
|---|
| 214 | public DefaultCellEditor(JComboBox combobox) {
|
|---|
| 215 | // TODO
|
|---|
| 216 | } // DefaultCellEditor()
|
|---|
| 217 |
|
|---|
| 218 |
|
|---|
| 219 | //-------------------------------------------------------------
|
|---|
| 220 | // Methods ----------------------------------------------------
|
|---|
| 221 | //-------------------------------------------------------------
|
|---|
| 222 |
|
|---|
| 223 | /**
|
|---|
| 224 | * getComponent
|
|---|
| 225 | * @returns Component
|
|---|
| 226 | */
|
|---|
| 227 | public Component getComponent() {
|
|---|
| 228 | return null; // TODO
|
|---|
| 229 | } // getComponent()
|
|---|
| 230 |
|
|---|
| 231 | /**
|
|---|
| 232 | * getClickCountToStart
|
|---|
| 233 | * @returns int
|
|---|
| 234 | */
|
|---|
| 235 | public int getClickCountToStart() {
|
|---|
| 236 | return 0; // TODO
|
|---|
| 237 | } // getClickCountToStart()
|
|---|
| 238 |
|
|---|
| 239 | /**
|
|---|
| 240 | * setClickCountToStart
|
|---|
| 241 | * @param count TODO
|
|---|
| 242 | */
|
|---|
| 243 | public void setClickCountToStart(int count) {
|
|---|
| 244 | // TODO
|
|---|
| 245 | } // setClickCountToStart()
|
|---|
| 246 |
|
|---|
| 247 | /**
|
|---|
| 248 | * getCellEditorValue
|
|---|
| 249 | * @returns Object
|
|---|
| 250 | */
|
|---|
| 251 | public Object getCellEditorValue() {
|
|---|
| 252 | return null; // TODO
|
|---|
| 253 | } // getCellEditorValue()
|
|---|
| 254 |
|
|---|
| 255 | /**
|
|---|
| 256 | * isCellEditable
|
|---|
| 257 | * @param event TODO
|
|---|
| 258 | * @returns boolean
|
|---|
| 259 | */
|
|---|
| 260 | public boolean isCellEditable(EventObject event) {
|
|---|
| 261 | return false; // TODO
|
|---|
| 262 | } // isCellEditable()
|
|---|
| 263 |
|
|---|
| 264 | /**
|
|---|
| 265 | * shouldSelectCell
|
|---|
| 266 | * @param event TODO
|
|---|
| 267 | * @returns boolean
|
|---|
| 268 | */
|
|---|
| 269 | public boolean shouldSelectCell(EventObject event) {
|
|---|
| 270 | return false; // TODO
|
|---|
| 271 | } // shouldSelectCell()
|
|---|
| 272 |
|
|---|
| 273 | /**
|
|---|
| 274 | * stopCellEditing
|
|---|
| 275 | * @returns boolean
|
|---|
| 276 | */
|
|---|
| 277 | public boolean stopCellEditing() {
|
|---|
| 278 | return false; // TODO
|
|---|
| 279 | } // stopCellEditing()
|
|---|
| 280 |
|
|---|
| 281 | /**
|
|---|
| 282 | * cancelCellEditing
|
|---|
| 283 | */
|
|---|
| 284 | public void cancelCellEditing() {
|
|---|
| 285 | // TODO
|
|---|
| 286 | } // cancelCellEditing()
|
|---|
| 287 |
|
|---|
| 288 | /**
|
|---|
| 289 | * getTreeCellEditorComponent
|
|---|
| 290 | * @param tree TODO
|
|---|
| 291 | * @param value TODO
|
|---|
| 292 | * @param isSelected TODO
|
|---|
| 293 | * @param expanded TODO
|
|---|
| 294 | * @param leaf TODO
|
|---|
| 295 | * @param row TODO
|
|---|
| 296 | * @returns Component
|
|---|
| 297 | */
|
|---|
| 298 | public Component getTreeCellEditorComponent(JTree tree,
|
|---|
| 299 | Object value, boolean isSelected, boolean expanded,
|
|---|
| 300 | boolean leaf, int row) {
|
|---|
| 301 | return null; // TODO
|
|---|
| 302 | } // getTreeCellEditorComponent()
|
|---|
| 303 |
|
|---|
| 304 | /**
|
|---|
| 305 | * getTableCellEditorComponent
|
|---|
| 306 | * @param tree TODO
|
|---|
| 307 | * @param value TODO
|
|---|
| 308 | * @param isSelected TODO
|
|---|
| 309 | * @param row TODO
|
|---|
| 310 | * @param column TODO
|
|---|
| 311 | * @returns Component
|
|---|
| 312 | */
|
|---|
| 313 | public Component getTableCellEditorComponent(JTable tree,
|
|---|
| 314 | Object value, boolean isSelected, int row, int column) {
|
|---|
| 315 | return null; // TODO
|
|---|
| 316 | } // getTableCellEditorComponent()
|
|---|
| 317 |
|
|---|
| 318 |
|
|---|
| 319 | } // DefaultCellEditor
|
|---|