java.lang.Object
java.awt.Component
java.awt.Container
java.awt.Panel
com.flexstor.common.awt.DatePanel
- All Implemented Interfaces:
- javax.accessibility.Accessible, java.awt.event.ActionListener, java.util.EventListener, java.awt.image.ImageObserver, java.awt.event.ItemListener, java.awt.MenuContainer, java.io.Serializable
- public class DatePanel
- extends java.awt.Panel
- implements java.awt.event.ItemListener, java.awt.event.ActionListener
This class implements a date selection panel which can be plugged
into any container which needs this functionality.
The panel is self contained, meaning it enables/disables its components
correctly depending on user input and notifies potential
property change listeners about relevant changes.
| Nested classes inherited from class java.awt.Panel |
java.awt.Panel.AccessibleAWTPanel |
| Nested classes inherited from class java.awt.Container |
java.awt.Container.AccessibleAWTContainer |
| Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
| Fields inherited from class java.awt.Panel |
|
| Fields inherited from class java.awt.Container |
|
| Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getInsets, getLayout, getListeners, getMaximumSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paint, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, setComponentZOrder, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, setFont, setLayout, transferFocusDownCycle, update, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle |
changes
protected java.beans.PropertyChangeSupport changes
bValid
protected boolean bValid
dtSend
protected java.util.Date dtSend
dtLowerLimit
protected java.util.Date dtLowerLimit
fParent
protected java.awt.Frame fParent
rbImmediately
protected java.awt.Checkbox rbImmediately
pnlAt
protected java.awt.Panel pnlAt
rbAt
protected java.awt.Checkbox rbAt
pbSelectDate
protected com.flexstor.common.awt.field.ActionButton pbSelectDate
bCanbeEnabled
protected boolean bCanbeEnabled
DatePanel
public DatePanel(java.awt.Frame fParent)
DatePanel
public DatePanel(java.awt.Frame fParent,
java.lang.String strBorderLabel)
- strBorderLabel : Label of the border
getDate
public java.util.Date getDate()
- Returns the currently selected date if the 'At' radio
button is selected, otherwise null.
setDate
public void setDate(java.util.Date date)
isComplete
public boolean isComplete()
- Return true if all entries make the panel valid.
Could not use isValid() because it overlaps with java.awt.Component.isValid()
Ex: If 'At' is selected but no date, it would return false.
enableInput
public void enableInput(boolean mode)
- Enables/Disables input.
NOTE : Be ware, if this method is called with a 'false', there is NO WAY right
now to enable any of the components on the panel ! It is written keeping in mind the
requirement that the user should not be able to provide any input what so ever. One of
requirement was found on settings dialog where this panel should be disabled fully
when called from the admin tool.. but
should be enabled when called from the Import frame.
setEnabled
public void setEnabled(boolean mode)
- This method is overridden in association with 'enableInput' method.
itemStateChanged
public void itemStateChanged(java.awt.event.ItemEvent event)
- Implementing ItemListener.
Evaluates the status of the panel and notifies any property
change listeners.
- Specified by:
itemStateChanged in interface java.awt.event.ItemListener
refresh
public void refresh()
actionPerformed
public void actionPerformed(java.awt.event.ActionEvent event)
- Implementing ActionListener.
Shows the date selection dialog.
- Specified by:
actionPerformed in interface java.awt.event.ActionListener
setLowerLimit
public void setLowerLimit(java.util.Date date)
addPropertyChangeListener
public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
- Description copied from class:
java.awt.Component
- Adds the specified property listener to this component. This is harmless
if the listener is null, but if the listener has already been registered,
it will now be registered twice. The property listener ignores inherited
properties. Recognized properties include:
- the font (
"font")
- the background color (
"background")
- the foreground color (
"foreground")
- the focusability (
"focusable")
- the focus key traversal enabled state
(
"focusTraversalKeysEnabled")
- the set of forward traversal keys
(
"forwardFocusTraversalKeys")
- the set of backward traversal keys
(
"backwardFocusTraversalKeys")
- the set of up-cycle traversal keys
(
"upCycleFocusTraversalKeys")
removePropertyChangeListener
public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
- Description copied from class:
java.awt.Component
- Removes the specified property listener from the component. This is
harmless if the listener was not previously registered.
getPreferredSize
public java.awt.Dimension getPreferredSize()
- Description copied from class:
java.awt.Container
- Returns the preferred size of this container.
getMinimumSize
public java.awt.Dimension getMinimumSize()
- Description copied from class:
java.awt.Container
- Returns the minimum size of this container.