org.das2.components
Class DatumRangeEditor

java.lang.Object
  extended by java.awt.Component
      extended by java.awt.Container
          extended by javax.swing.JComponent
              extended by org.das2.components.DatumRangeEditor
All Implemented Interfaces:
java.awt.image.ImageObserver, java.awt.MenuContainer, java.beans.PropertyEditor, java.io.Serializable, javax.swing.CellEditor, javax.swing.table.TableCellEditor

public class DatumRangeEditor
extends javax.swing.JComponent
implements java.beans.PropertyEditor, javax.swing.table.TableCellEditor

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class javax.swing.JComponent
javax.swing.JComponent.AccessibleJComponent
 
Nested classes/interfaces inherited from class java.awt.Container
java.awt.Container.AccessibleAWTContainer
 
Nested classes/interfaces inherited from class java.awt.Component
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BaselineResizeBehavior, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy
 
Field Summary
 
Fields inherited from class javax.swing.JComponent
accessibleContext, listenerList, TOOL_TIP_TEXT_KEY, ui, UNDEFINED_CONDITION, WHEN_ANCESTOR_OF_FOCUSED_COMPONENT, WHEN_FOCUSED, WHEN_IN_FOCUSED_WINDOW
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
DatumRangeEditor()
          Creates a new instance of DatumEditor
 
Method Summary
 void addActionListener(java.awt.event.ActionListener al)
           
 void addCellEditorListener(javax.swing.event.CellEditorListener l)
           
 void cancelCellEditing()
           
 java.lang.String getAsText()
           
 java.lang.Object getCellEditorValue()
          Returns the value stored in this editor.
 java.awt.Component getCustomEditor()
           
 DatumRange getDatumRange()
           
 java.lang.String getJavaInitializationString()
          This PropertyEditor implementation does not support generating java code.
 java.awt.Component getTableCellEditorComponent(javax.swing.JTable table, java.lang.Object value, boolean isSelected, int row, int column)
           
 java.lang.String[] getTags()
          This PropertyEditor implementation does not support enumerated values.
 java.lang.String getToolTipText(java.awt.event.MouseEvent event)
           
 Units getUnits()
           
 java.lang.Object getValue()
           
 boolean isCellEditable(java.util.EventObject anEvent)
           
 boolean isPaintable()
           
 void paintValue(java.awt.Graphics g, java.awt.Rectangle r)
          Does nothing.
 void removeActionListener(java.awt.event.ActionListener al)
           
 void removeCellEditorListener(javax.swing.event.CellEditorListener l)
           
 void setAsText(java.lang.String text)
           
 void setColumns(int columns)
           
 void setUnits(Units units)
           
 void setValue(java.lang.Object value)
           
 boolean shouldSelectCell(java.util.EventObject anEvent)
           
 boolean stopCellEditing()
           
 boolean supportsCustomEditor()
           
 
Methods inherited from class javax.swing.JComponent
addAncestorListener, addNotify, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getAccessibleContext, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBaseline, getBaselineResizeBehavior, getBorder, getBounds, getClientProperty, getComponentGraphics, getComponentPopupMenu, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getFontMetrics, getGraphics, getHeight, getInheritsPopupMenu, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPopupLocation, getPreferredSize, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getTopLevelAncestor, getTransferHandler, getUIClassID, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isOpaque, isOptimizedDrawingEnabled, isPaintingForPrint, isPaintingTile, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, paramString, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setComponentPopupMenu, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFocusTraversalKeys, setFont, setForeground, setInheritsPopupMenu, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update, updateUI
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getMousePosition, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusCycleRoot, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, setLayout, transferFocusBackward, transferFocusDownCycle, validate, validateTree
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, bounds, checkImage, checkImage, coalesceEvents, contains, createImage, createImage, createVolatileImage, createVolatileImage, disableEvents, dispatchEvent, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusUpCycle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface java.beans.PropertyEditor
addPropertyChangeListener, removePropertyChangeListener
 

Constructor Detail

DatumRangeEditor

public DatumRangeEditor()
Creates a new instance of DatumEditor

Method Detail

setColumns

public void setColumns(int columns)

setValue

public void setValue(java.lang.Object value)
Specified by:
setValue in interface java.beans.PropertyEditor
Parameters:
value - the DatumRange to be editted.
Throws:
java.lang.IllegalArgumentException - if value is not a Datum

setAsText

public void setAsText(java.lang.String text)
               throws java.lang.IllegalArgumentException
Specified by:
setAsText in interface java.beans.PropertyEditor
Throws:
java.lang.IllegalArgumentException

getValue

public java.lang.Object getValue()
Specified by:
getValue in interface java.beans.PropertyEditor

getDatumRange

public DatumRange getDatumRange()

getAsText

public java.lang.String getAsText()
Specified by:
getAsText in interface java.beans.PropertyEditor

setUnits

public void setUnits(Units units)

getUnits

public Units getUnits()

addActionListener

public void addActionListener(java.awt.event.ActionListener al)

removeActionListener

public void removeActionListener(java.awt.event.ActionListener al)

getToolTipText

public java.lang.String getToolTipText(java.awt.event.MouseEvent event)
Overrides:
getToolTipText in class javax.swing.JComponent

supportsCustomEditor

public boolean supportsCustomEditor()
Specified by:
supportsCustomEditor in interface java.beans.PropertyEditor
Returns:
true
See Also:
PropertyEditor.supportsCustomEditor()

getCustomEditor

public java.awt.Component getCustomEditor()
Specified by:
getCustomEditor in interface java.beans.PropertyEditor
Returns:
this
See Also:
PropertyEditor.getCustomEditor()

getJavaInitializationString

public java.lang.String getJavaInitializationString()
This PropertyEditor implementation does not support generating java code.

Specified by:
getJavaInitializationString in interface java.beans.PropertyEditor
Returns:
The string "???"

getTags

public java.lang.String[] getTags()
This PropertyEditor implementation does not support enumerated values.

Specified by:
getTags in interface java.beans.PropertyEditor
Returns:
null

isPaintable

public boolean isPaintable()
Specified by:
isPaintable in interface java.beans.PropertyEditor
Returns:
false
See Also:
PropertyEditor.isPaintable()

paintValue

public void paintValue(java.awt.Graphics g,
                       java.awt.Rectangle r)
Does nothing.

Specified by:
paintValue in interface java.beans.PropertyEditor
Parameters:
g -
r -

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

addCellEditorListener

public void addCellEditorListener(javax.swing.event.CellEditorListener l)
Specified by:
addCellEditorListener in interface javax.swing.CellEditor

removeCellEditorListener

public void removeCellEditorListener(javax.swing.event.CellEditorListener l)
Specified by:
removeCellEditorListener in interface javax.swing.CellEditor

isCellEditable

public boolean isCellEditable(java.util.EventObject anEvent)
Specified by:
isCellEditable in interface javax.swing.CellEditor
Returns:
true
See Also:
CellEditor.isCellEditable(java.util.EventObject)

shouldSelectCell

public boolean shouldSelectCell(java.util.EventObject anEvent)
Specified by:
shouldSelectCell in interface javax.swing.CellEditor
Returns:
true
See Also:
CellEditor.shouldSelectCell(java.util.EventObject)

getCellEditorValue

public java.lang.Object getCellEditorValue()
Returns the value stored in this editor.

Specified by:
getCellEditorValue in interface javax.swing.CellEditor
Returns:
the current value being edited

stopCellEditing

public boolean stopCellEditing()
Specified by:
stopCellEditing in interface javax.swing.CellEditor

cancelCellEditing

public void cancelCellEditing()
Specified by:
cancelCellEditing in interface javax.swing.CellEditor