jsky.util.gui
Class SexagesimalTableCellEditor
java.lang.Object
javax.swing.AbstractCellEditor
javax.swing.DefaultCellEditor
jsky.util.gui.SexagesimalTableCellEditor
- All Implemented Interfaces:
- java.io.Serializable, javax.swing.CellEditor, javax.swing.table.TableCellEditor, javax.swing.tree.TreeCellEditor
public class SexagesimalTableCellEditor
- extends javax.swing.DefaultCellEditor
Used to reformat RA,DEC coordinates in a JTable in sexagesimal notation
for display.
- See Also:
- Serialized Form
Nested classes/interfaces inherited from class javax.swing.DefaultCellEditor |
javax.swing.DefaultCellEditor.EditorDelegate |
Fields inherited from class javax.swing.DefaultCellEditor |
clickCountToStart, delegate, editorComponent |
Fields inherited from class javax.swing.AbstractCellEditor |
changeEvent, listenerList |
Method Summary |
java.lang.Object |
getCellEditorValue()
Returns the value contained in the editor |
java.awt.Component |
getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int column)
This method is sent to the editor by the drawing table to
configure the editor appropriately before drawing. |
Methods inherited from class javax.swing.DefaultCellEditor |
cancelCellEditing, getClickCountToStart, getComponent, getTreeCellEditorComponent, isCellEditable, setClickCountToStart, shouldSelectCell, stopCellEditing |
Methods inherited from class javax.swing.AbstractCellEditor |
addCellEditorListener, fireEditingCanceled, fireEditingStopped, getCellEditorListeners, removeCellEditorListener |
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, removeCellEditorListener |
Methods inherited from interface javax.swing.CellEditor |
addCellEditorListener, removeCellEditorListener |
SexagesimalTableCellEditor
public SexagesimalTableCellEditor(boolean hoursFlag)
- Constructor.
- Parameters:
hoursFlag
- if true, divide the cell value by 15 and display hours : min : sec,
otherwise display deg : min : sec.
getTableCellEditorComponent
public java.awt.Component getTableCellEditorComponent(javax.swing.JTable table,
java.lang.Object value,
boolean isSelected,
int row,
int column)
- This method is sent to the editor by the drawing table to
configure the editor appropriately before drawing. Return
the Component used for drawing.
- Specified by:
getTableCellEditorComponent
in interface javax.swing.table.TableCellEditor
- Overrides:
getTableCellEditorComponent
in class javax.swing.DefaultCellEditor
- Parameters:
table
- the JTable that is asking the editor to draw.
This parameter can be null.value
- the value of the cell to be rendered. It is
up to the specific editor to interpret
and draw the value. eg. if value is the
String "true", it could be rendered as a
string or it could be rendered as a check
box that is checked. null is a valid value.isSelected
- true is the cell is to be editor with
selection highlightingrow
- the row index of the cell being drawn. When
drawing the header the rowIndex is -1.column
- the column index of the cell being drawn
getCellEditorValue
public java.lang.Object getCellEditorValue()
- Returns the value contained in the editor
- Specified by:
getCellEditorValue
in interface javax.swing.CellEditor
- Overrides:
getCellEditorValue
in class javax.swing.DefaultCellEditor