|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectjava.awt.Component
java.awt.Container
javax.swing.JComponent
javax.swing.JPanel
com.retek.commons.gui.widget.RPanel
com.retek.commons.gui.widget.RDateField
This class sublcasses an RPanel and supplies a date field that consists of a text field and a button that triggers a popup calendar window. It acts just like any other widget.
Retek Inc. Copyright (c) 2002
Nested Class Summary |
Nested classes inherited from class javax.swing.JPanel |
javax.swing.JPanel.AccessibleJPanel |
Nested classes inherited from class javax.swing.JComponent |
javax.swing.JComponent.AccessibleJComponent |
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 |
Field Summary | |
static java.lang.String |
DATE_SELECTED
|
static java.lang.String |
FOCUS_GAINED
|
static java.lang.String |
FOCUS_LOST
|
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 | |
RDateField()
Return new RDateField object. |
|
RDateField(javax.swing.JDialog dialog)
Return new RDateField object. |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent event)
Implements the ActionListener method. |
void |
clear()
Clears the date field of all information. |
void |
focusGained(java.awt.event.FocusEvent event)
Implements the focus listener method. |
void |
focusLost(java.awt.event.FocusEvent event)
Implements the focus listener method. |
java.lang.String |
getClusterName()
Retrieves the cluster name of the widget. |
java.lang.String |
getName()
Retrieve the name fo the component. |
java.lang.String |
getText()
Retrieves the text in the date field. |
boolean |
isEmpty()
Retrieves whether or not the date field is empty. |
boolean |
isErrorState()
Retrieves whether or not the date field is in an error state. |
void |
propertyChange(java.beans.PropertyChangeEvent event)
Implements the proerty change listener method. |
void |
refresh()
Refreshes the text in the date field (this will reformat the text). |
void |
requestFocus()
Transfers focus of the cursor to the date field. |
void |
selectAll()
Selects all the text in the date field. |
void |
setBackground(java.awt.Color color)
|
void |
setCalendarOwner(javax.swing.JDialog dialog)
Assigns a JDialog as the calendar owner of the calendar. |
void |
setClusterName(java.lang.String name)
Sets the cluster name of the widget. |
void |
setDate(RDate date)
Sets the date represented by this date field. |
void |
setDate(java.lang.String dateText)
Sets the date represented by this date field. |
void |
setEditable(boolean editable)
Sets whether or not the date field is editable. |
void |
setEnabled(boolean enabled)
Sets whether or not the date field is enabled. |
void |
setErrorState(boolean errorState)
Sets whether or not the date field is in an error state. |
void |
setFocusedState()
Sets the date field to focused state, updating colors. |
void |
setForeground(java.awt.Color color)
|
void |
setFormatInvalid(boolean formatInvalid)
Sets whether or not the date field currently contains invalidly formatted data. |
void |
setLength(int length)
Sets the enterable length of the component. |
void |
setMask(Mask mask)
Sets the formatting mask on the component. |
void |
setMinimumWidth(int width)
Sets the minimum width of the component. |
void |
setName(java.lang.String name)
Sets the name of the component. |
void |
updateColorState()
Updates the color state. |
Methods inherited from class com.retek.commons.gui.widget.RPanel |
addREventListener, getFocusCycleComponents, notifyREventListeners, notifyREventListeners, performActionEvent, performErrorEvent, removeAllREventListeners, removeREventListener, repaintPanel, setEmptyBorder, setEmptyBorder, setFocusCycleComponents, setLineBorder, setLineBorder, setLoweredBevelBorder, setMinimumHeight, setRaisedBevelBorder, setTitleBorder, setTitleBorder, setTitleBorder, setTitleBorder |
Methods inherited from class javax.swing.JPanel |
getAccessibleContext, getUI, getUIClassID, paramString, setUI, updateUI |
Methods inherited from class javax.swing.JComponent |
addAncestorListener, addNotify, addPropertyChangeListener, addPropertyChangeListener, addVetoableChangeListener, computeVisibleRect, contains, createToolTip, disable, enable, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, firePropertyChange, fireVetoableChange, getActionForKeyStroke, getActionMap, getAlignmentX, getAlignmentY, getAncestorListeners, getAutoscrolls, getBorder, getBounds, getClientProperty, getComponentGraphics, getConditionForKeyStroke, getDebugGraphicsOptions, getDefaultLocale, getGraphics, getHeight, getInputMap, getInputMap, getInputVerifier, getInsets, getInsets, getListeners, getLocation, getMaximumSize, getMinimumSize, getNextFocusableComponent, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getRegisteredKeyStrokes, getRootPane, getSize, getToolTipLocation, getToolTipText, getToolTipText, getTopLevelAncestor, getTransferHandler, getVerifyInputWhenFocusTarget, getVetoableChangeListeners, getVisibleRect, getWidth, getX, getY, grabFocus, isDoubleBuffered, isLightweightComponent, isManagingFocus, isMaximumSizeSet, isMinimumSizeSet, isOpaque, isOptimizedDrawingEnabled, isPaintingTile, isPreferredSizeSet, isRequestFocusEnabled, isValidateRoot, paint, paintBorder, paintChildren, paintComponent, paintImmediately, paintImmediately, print, printAll, printBorder, printChildren, printComponent, processComponentKeyEvent, processKeyBinding, processKeyEvent, processMouseMotionEvent, putClientProperty, registerKeyboardAction, registerKeyboardAction, removeAncestorListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, removeVetoableChangeListener, repaint, repaint, requestDefaultFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setFont, setInputMap, setInputVerifier, setMaximumSize, setMinimumSize, setNextFocusableComponent, setOpaque, setPreferredSize, setRequestFocusEnabled, setToolTipText, setTransferHandler, setUI, setVerifyInputWhenFocusTarget, setVisible, unregisterKeyboardAction, update |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, setFocusCycleRoot, setFocusTraversalKeys, setFocusTraversalPolicy, 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, getBackground, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getParent, getPeer, getSize, getToolkit, getTreeLock, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, 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, processMouseEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, repaint, repaint, repaint, resize, resize, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setIgnoreRepaint, setLocale, setLocation, setLocation, 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 |
Field Detail |
public static final java.lang.String FOCUS_GAINED
public static final java.lang.String FOCUS_LOST
public static final java.lang.String DATE_SELECTED
Constructor Detail |
public RDateField()
public RDateField(javax.swing.JDialog dialog)
Method Detail |
public void setName(java.lang.String name)
setName
in interface WidgetInterface
name
- The name to assign to this component.public java.lang.String getName()
getName
in interface WidgetInterface
public void setCalendarOwner(javax.swing.JDialog dialog)
dialog
- The dialog to assign as the calendar owner.public java.lang.String getText()
public void setMask(Mask mask)
mask
- A mask to assign to the component.public void setLength(int length)
length
- The enterable length of the component.public void setMinimumWidth(int width)
width
- The minimum width (number of pixels).public void setFormatInvalid(boolean formatInvalid)
formatInvalid
- True if the data is in an invalid format, false if valid.public void actionPerformed(java.awt.event.ActionEvent event)
actionPerformed
in interface java.awt.event.ActionListener
public void setDate(RDate date)
date
- The date to assign to the date field.public void setDate(java.lang.String dateText)
dateText
- The date to assign to the date field.public boolean isEmpty()
public void clear()
public void selectAll()
public void refresh()
public void requestFocus()
public void setEnabled(boolean enabled)
enabled
- True if the date field should be enabled, false if not.public void setEditable(boolean editable)
editable
- True if the date field should be editable, false if not.public void focusGained(java.awt.event.FocusEvent event)
focusGained
in interface java.awt.event.FocusListener
public void focusLost(java.awt.event.FocusEvent event)
focusLost
in interface java.awt.event.FocusListener
public void propertyChange(java.beans.PropertyChangeEvent event)
propertyChange
in interface java.beans.PropertyChangeListener
public void setClusterName(java.lang.String name)
setClusterName
in interface WidgetInterface
public java.lang.String getClusterName()
getClusterName
in interface WidgetInterface
public void setBackground(java.awt.Color color)
in JTextField.
public void setForeground(java.awt.Color color)
in JTextField.
public void setErrorState(boolean errorState)
setErrorState
in interface WidgetInterface
errorState
- True if the date field is in an error state, false if not.public boolean isErrorState()
isErrorState
in interface WidgetInterface
public void setFocusedState()
setFocusedState
in interface WidgetInterface
public void updateColorState()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |