edu.udo.cs.yale.gui.properties
Class FileValueCellEditor
java.lang.Object
javax.swing.AbstractCellEditor
edu.udo.cs.yale.gui.properties.FileValueCellEditor
- All Implemented Interfaces:
- PropertyValueCellEditor, java.io.Serializable, javax.swing.CellEditor, javax.swing.table.TableCellEditor, javax.swing.table.TableCellRenderer
- Direct Known Subclasses:
- AttributeFileCellEditor, SimpleFileValueCellEditor
public abstract class FileValueCellEditor
- extends javax.swing.AbstractCellEditor
- implements PropertyValueCellEditor
Cell editor consiting of a text field and a small button for opening a file
chooser. Should be used for parameters / properties which are files (but no
special files like attribute description files). If the desired property is a
directory, the button automatically opens a file choser for directories.
- Version:
- $Id: FileValueCellEditor.java,v 1.2 2006/08/03 14:39:33 ingomierswa Exp $
- Author:
- Simon Fischer, Ingo Mierswa
- See Also:
AttributeFileCellEditor
,
Serialized Form
Fields inherited from class javax.swing.AbstractCellEditor |
changeEvent, listenerList |
Method Summary |
protected void |
addButton(javax.swing.JButton button,
int gridwidth)
|
private void |
buttonPressed()
|
protected javax.swing.JButton |
createFileChooserButton()
|
java.lang.Object |
getCellEditorValue()
|
java.awt.Component |
getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int col)
|
java.awt.Component |
getTableCellRendererComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
|
protected void |
setText(java.io.File file)
|
boolean |
useEditorAsRenderer()
Returns true if this editor should also be used as renderer. |
Methods inherited from class javax.swing.AbstractCellEditor |
addCellEditorListener, cancelCellEditing, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface javax.swing.CellEditor |
addCellEditorListener, cancelCellEditing, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing |
panel
private javax.swing.JPanel panel
textField
private javax.swing.JTextField textField
type
private ParameterTypeFile type
gridBagLayout
private java.awt.GridBagLayout gridBagLayout
FileValueCellEditor
public FileValueCellEditor(ParameterTypeFile type)
createFileChooserButton
protected javax.swing.JButton createFileChooserButton()
addButton
protected void addButton(javax.swing.JButton button,
int gridwidth)
buttonPressed
private void buttonPressed()
setText
protected void setText(java.io.File file)
getCellEditorValue
public java.lang.Object getCellEditorValue()
- Specified by:
getCellEditorValue
in interface javax.swing.CellEditor
getTableCellEditorComponent
public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int col)
- Specified by:
getTableCellEditorComponent
in interface javax.swing.table.TableCellEditor
getTableCellRendererComponent
public java.awt.Component getTableCellRendererComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
boolean hasFocus,
int row,
int column)
- Specified by:
getTableCellRendererComponent
in interface javax.swing.table.TableCellRenderer
useEditorAsRenderer
public boolean useEditorAsRenderer()
- Description copied from interface:
PropertyValueCellEditor
- Returns true if this editor should also be used as renderer. Should not be the case
for components with frames around the component like JTextFields.
- Specified by:
useEditorAsRenderer
in interface PropertyValueCellEditor
Copyright © 2001-2006