Package io.github.jonestimd.swing.table
Class PopupTableCellEditor
- java.lang.Object
-
- javax.swing.AbstractCellEditor
-
- io.github.jonestimd.swing.table.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
-
-
Constructor Summary
Constructors Modifier Constructor Description protected
PopupTableCellEditor()
Create aPopupTableCellEditor
.
-
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
-
-
-
-
Method Detail
-
fireEditingStopped
protected void fireEditingStopped()
Overridden to hide the popup window.- Overrides:
fireEditingStopped
in classjavax.swing.AbstractCellEditor
-
fireEditingCanceled
protected void fireEditingCanceled()
Overridden to hide the popup window.- Overrides:
fireEditingCanceled
in classjavax.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 interfacejavax.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
-
-