Class PopupTableCellEditor

  • All Implemented Interfaces:
    java.io.Serializable, javax.swing.CellEditor, javax.swing.table.TableCellEditor
    Direct Known Subclasses:
    ColorTableCellEditor, PopupListTableCellEditor

    public abstract class PopupTableCellEditor
    extends javax.swing.AbstractCellEditor
    implements javax.swing.table.TableCellEditor
    Abstract base class for a table cell editor that displays a popup window.
    See Also:
    Serialized Form
    • Field Summary

      • Fields inherited from class javax.swing.AbstractCellEditor

        changeEvent, listenerList
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected PopupTableCellEditor()
      Create a PopupTableCellEditor.
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract java.awt.Window createWindow​(java.awt.Window owner)
      Create the popup window.
      protected void fireEditingCanceled()
      Overridden to hide the popup window.
      protected void fireEditingStopped()
      Overridden to hide the popup window.
      protected java.awt.Point getPopupLocation()
      Default implementation returns the top left corner of the table cell.
      java.awt.Component getTableCellEditorComponent​(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)  
      protected java.awt.Dimension getTableCellSize()
      Get the size of the table cell.
      protected void hidePopup()
      Hide the popup window if it is showing.
      protected void showPopup()
      Show the popup window.
      • Methods inherited from class javax.swing.AbstractCellEditor

        addCellEditorListener, cancelCellEditing, 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, getCellEditorValue, isCellEditable, removeCellEditorListener, shouldSelectCell, stopCellEditing
    • Constructor Detail

      • PopupTableCellEditor

        protected PopupTableCellEditor()
        Create a PopupTableCellEditor.
    • Method Detail

      • fireEditingStopped

        protected void fireEditingStopped()
        Overridden to hide the popup window.
        Overrides:
        fireEditingStopped in class javax.swing.AbstractCellEditor
      • fireEditingCanceled

        protected void fireEditingCanceled()
        Overridden to hide the popup window.
        Overrides:
        fireEditingCanceled in class javax.swing.AbstractCellEditor
      • 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
      • getPopupLocation

        protected java.awt.Point getPopupLocation()
        Default implementation returns the top left corner of the table cell.
      • hidePopup

        protected void hidePopup()
        Hide the popup window if it is showing.
      • getTableCellSize

        protected java.awt.Dimension getTableCellSize()
        Get the size of the table cell. May be useful for sizing/placing the popup window.
      • showPopup

        protected void showPopup()
        Show the popup window.
      • createWindow

        protected abstract java.awt.Window createWindow​(java.awt.Window owner)
        Create the popup window.
        Parameters:
        owner - the window containing the table