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.TableCellEditorAbstract base class for a table cell editor that displays a popup window.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Modifier Constructor Description protectedPopupTableCellEditor()Create aPopupTableCellEditor.
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description protected abstract java.awt.WindowcreateWindow(java.awt.Window owner)Create the popup window.protected voidfireEditingCanceled()Overridden to hide the popup window.protected voidfireEditingStopped()Overridden to hide the popup window.protected java.awt.PointgetPopupLocation()Default implementation returns the top left corner of the table cell.java.awt.ComponentgetTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)protected java.awt.DimensiongetTableCellSize()Get the size of the table cell.protected voidhidePopup()Hide the popup window if it is showing.protected voidshowPopup()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:
fireEditingStoppedin classjavax.swing.AbstractCellEditor
-
fireEditingCanceled
protected void fireEditingCanceled()
Overridden to hide the popup window.- Overrides:
fireEditingCanceledin 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:
getTableCellEditorComponentin 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
-
-