Package elki.gui.util

Class ParameterTable.DropdownEditor

  • All Implemented Interfaces:
    java.awt.event.KeyListener, java.io.Serializable, java.util.EventListener, javax.swing.CellEditor, javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor
    Enclosing class:
    ParameterTable

    private class ParameterTable.DropdownEditor
    extends javax.swing.DefaultCellEditor
    implements java.awt.event.KeyListener
    Editor using a Dropdown box to offer known values to choose from.
    Author:
    Erich Schubert
    • Nested Class Summary

      • Nested classes/interfaces inherited from class javax.swing.DefaultCellEditor

        javax.swing.DefaultCellEditor.EditorDelegate
    • Field Summary

      Fields 
      Modifier and Type Field Description
      private javax.swing.JComboBox<java.lang.String> comboBox
      Combo box to use
      (package private) javax.swing.JPanel panel
      We need a panel to ensure focusing.
      private static long serialVersionUID
      Serial Version
      • Fields inherited from class javax.swing.DefaultCellEditor

        clickCountToStart, delegate, editorComponent
      • Fields inherited from class javax.swing.AbstractCellEditor

        changeEvent, listenerList
    • Constructor Summary

      Constructors 
      Constructor Description
      DropdownEditor​(javax.swing.JComboBox<java.lang.String> comboBox)
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.awt.Component getTableCellEditorComponent​(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)  
      void keyPressed​(java.awt.event.KeyEvent e)  
      void keyReleased​(java.awt.event.KeyEvent e)  
      void keyTyped​(java.awt.event.KeyEvent e)  
      • Methods inherited from class javax.swing.DefaultCellEditor

        cancelCellEditing, getCellEditorValue, getClickCountToStart, getComponent, getTreeCellEditorComponent, isCellEditable, setClickCountToStart, shouldSelectCell, stopCellEditing
      • Methods inherited from class javax.swing.AbstractCellEditor

        addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener
      • 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, removeCellEditorListener
    • Field Detail

      • serialVersionUID

        private static final long serialVersionUID
        Serial Version
        See Also:
        Constant Field Values
      • panel

        final javax.swing.JPanel panel
        We need a panel to ensure focusing.
      • comboBox

        private final javax.swing.JComboBox<java.lang.String> comboBox
        Combo box to use
    • Constructor Detail

      • DropdownEditor

        public DropdownEditor​(javax.swing.JComboBox<java.lang.String> comboBox)
        Constructor.
        Parameters:
        comboBox - Combo box we're going to use
    • Method Detail

      • keyTyped

        public void keyTyped​(java.awt.event.KeyEvent e)
        Specified by:
        keyTyped in interface java.awt.event.KeyListener
      • keyPressed

        public void keyPressed​(java.awt.event.KeyEvent e)
        Specified by:
        keyPressed in interface java.awt.event.KeyListener
      • keyReleased

        public void keyReleased​(java.awt.event.KeyEvent e)
        Specified by:
        keyReleased in interface java.awt.event.KeyListener
      • getTableCellEditorComponent

        public 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
        Overrides:
        getTableCellEditorComponent in class javax.swing.DefaultCellEditor