Package elki.gui.util

Class ParameterTable.ClassListEditor

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

    private class ParameterTable.ClassListEditor
    extends javax.swing.AbstractCellEditor
    implements javax.swing.table.TableCellEditor, java.awt.event.ActionListener, java.awt.event.KeyListener
    Editor for choosing classes.
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) javax.swing.JButton button
      The button to open the file selector
      private javax.swing.tree.TreeModel model
      Tree model
      private Parameter<?> option
      Parameter we are currently editing.
      (package private) javax.swing.JPanel panel
      We need a panel to put our components on.
      (package private) TreePopup popup
      The popup menu.
      private static long serialVersionUID
      Serial version number
      (package private) javax.swing.JTextField textfield
      Text field to store the name
      • Fields inherited from class javax.swing.AbstractCellEditor

        changeEvent, listenerList
    • Constructor Summary

      Constructors 
      Constructor Description
      ClassListEditor()
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent e)
      Callback to show the popup menu
      java.lang.Object getCellEditorValue()
      Delegate getCellEditorValue to the text field.
      java.awt.Component getTableCellEditorComponent​(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
      Apply the Editor for a selected option.
      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.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
    • Field Detail

      • serialVersionUID

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

        final javax.swing.JPanel panel
        We need a panel to put our components on.
      • textfield

        final javax.swing.JTextField textfield
        Text field to store the name
      • button

        final javax.swing.JButton button
        The button to open the file selector
      • popup

        final TreePopup popup
        The popup menu.
      • model

        private javax.swing.tree.TreeModel model
        Tree model
      • option

        private Parameter<?> option
        Parameter we are currently editing.
    • Constructor Detail

      • ClassListEditor

        public ClassListEditor()
        Constructor.
    • Method Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent e)
        Callback to show the popup menu
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
      • getCellEditorValue

        public java.lang.Object getCellEditorValue()
        Delegate getCellEditorValue to the text field.
        Specified by:
        getCellEditorValue in interface javax.swing.CellEditor
      • 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)
        Apply the Editor for a selected option.
        Specified by:
        getTableCellEditorComponent in interface javax.swing.table.TableCellEditor