edu.washington.biostr.sig.brainj3d.shwing.swing
Class AutoCompleteEditor

java.lang.Object
  extended by edu.washington.biostr.sig.brainj3d.shwing.swing.AutoCompleteEditor
All Implemented Interfaces:
ActionListener, EventListener, CellEditor, TableCellEditor, TreeCellEditor

public class AutoCompleteEditor
extends Object
implements CellEditor, TableCellEditor, ActionListener, TreeCellEditor

This is the editor to use for text that should have an autocomplete similiar to the autocomplete in web browsers.

Author:
eider

Constructor Summary
AutoCompleteEditor(String autocompleteDomain)
          The autocompleteDomain is a shared domain for the autocomplete.
 
Method Summary
 void actionPerformed(ActionEvent e)
           
 void addCellEditorListener(CellEditorListener l)
           
 void cancelCellEditing()
           
protected  void commitEdit()
           
protected  void fireEditCancelled()
           
protected  void fireEditStop()
           
 Object getCellEditorValue()
           
 Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int column)
           
 Component getTreeCellEditorComponent(JTree tree, Object value, boolean isSelected, boolean expanded, boolean leaf, int row)
           
 boolean isCellEditable(EventObject anEvent)
           
 void removeCellEditorListener(CellEditorListener l)
           
 boolean shouldSelectCell(EventObject anEvent)
           
 boolean stopCellEditing()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AutoCompleteEditor

public AutoCompleteEditor(String autocompleteDomain)
The autocompleteDomain is a shared domain for the autocomplete. All autocompletes from the same domain will have the same list.

Throws:
IllegalArgumentException - if autocompleteDomain == ""
Method Detail

getCellEditorValue

public Object getCellEditorValue()
Specified by:
getCellEditorValue in interface CellEditor

isCellEditable

public boolean isCellEditable(EventObject anEvent)
Specified by:
isCellEditable in interface CellEditor

shouldSelectCell

public boolean shouldSelectCell(EventObject anEvent)
Specified by:
shouldSelectCell in interface CellEditor

stopCellEditing

public boolean stopCellEditing()
Specified by:
stopCellEditing in interface CellEditor

cancelCellEditing

public void cancelCellEditing()
Specified by:
cancelCellEditing in interface CellEditor

fireEditStop

protected void fireEditStop()

fireEditCancelled

protected void fireEditCancelled()

getTableCellEditorComponent

public Component getTableCellEditorComponent(JTable table,
                                             Object value,
                                             boolean isSelected,
                                             int row,
                                             int column)
Specified by:
getTableCellEditorComponent in interface TableCellEditor

commitEdit

protected void commitEdit()

addCellEditorListener

public void addCellEditorListener(CellEditorListener l)
Specified by:
addCellEditorListener in interface CellEditor

removeCellEditorListener

public void removeCellEditorListener(CellEditorListener l)
Specified by:
removeCellEditorListener in interface CellEditor

actionPerformed

public void actionPerformed(ActionEvent e)
Specified by:
actionPerformed in interface ActionListener

getTreeCellEditorComponent

public Component getTreeCellEditorComponent(JTree tree,
                                            Object value,
                                            boolean isSelected,
                                            boolean expanded,
                                            boolean leaf,
                                            int row)
Specified by:
getTreeCellEditorComponent in interface TreeCellEditor


Copyright © 2006 University of Washington. All Rights Reserved.