Package elki.gui.util

Class ParameterTable.FileNameEditor

  • 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.FileNameEditor
    extends javax.swing.AbstractCellEditor
    implements javax.swing.table.TableCellEditor, java.awt.event.ActionListener, java.awt.event.KeyListener
    Editor for selecting input and output file and folders names
    Author:
    Erich Schubert
    • Field Summary

      Fields 
      Modifier and Type Field Description
      (package private) javax.swing.JButton button
      The button to open the file selector
      (package private) java.lang.String defaultpath
      Default path.
      (package private) int mode
      File selector mode.
      (package private) javax.swing.JPanel panel
      We need a panel to put our components on.
      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
      FileNameEditor()
      Constructor.
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void actionPerformed​(java.awt.event.ActionEvent e)
      Button callback to show the file selector
      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
      • mode

        int mode
        File selector mode.
      • defaultpath

        java.lang.String defaultpath
        Default path.
    • Constructor Detail

      • FileNameEditor

        public FileNameEditor()
        Constructor.
    • Method Detail

      • actionPerformed

        public void actionPerformed​(java.awt.event.ActionEvent e)
        Button callback to show the file selector
        Specified by:
        actionPerformed in interface java.awt.event.ActionListener
      • 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
      • getCellEditorValue

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