public class DateChooserDialog extends ComponentDialog
DateChooser
.
DateChooser
,
Serialized FormJDialog.AccessibleJDialog
Dialog.AccessibleAWTDialog, Dialog.ModalExclusionType, Dialog.ModalityType
Window.AccessibleAWTWindow, Window.Type
Container.AccessibleAWTContainer
Component.AccessibleAWTComponent, Component.BaselineResizeBehavior, Component.BltBufferStrategy, Component.FlipBufferStrategy
Modifier and Type | Field and Description |
---|---|
private DateChooser |
cal |
private Calendar |
v_date |
b_cancel, b_ok
accessibleContext, rootPane, rootPaneCheckingEnabled
DEFAULT_MODALITY_TYPE
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, EXIT_ON_CLOSE, HIDE_ON_CLOSE
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
Constructor and Description |
---|
DateChooserDialog(Dialog parent,
boolean modal)
Construct a new
DateChooserDialog with a default title. |
DateChooserDialog(Dialog parent,
String title,
boolean modal)
Construct a new
DateChooserDialog . |
DateChooserDialog(Frame parent,
boolean modal)
Construct a new
DateChooserDialog with a default title. |
DateChooserDialog(Frame parent,
String title,
boolean modal)
Construct a new
DateChooserDialog . |
Modifier and Type | Method and Description |
---|---|
protected boolean |
accept()
Accept the input.
|
protected Component |
buildDialogUI()
Build the dialog user interface.
|
Calendar |
getDate()
Get the selected date.
|
Calendar |
getMaximumDate()
Get the latest selectable date for the chooser.
|
Calendar |
getMinimumDate()
Get the earliest selectable date for the chooser.
|
void |
setCellSize(int size)
Set the size of date cells in the calendar pane.
|
void |
setDate(Calendar date)
Set the selected date.
|
void |
setMaximumDate(Calendar date)
Set the latest selectable date for the chooser.
|
void |
setMinimumDate(Calendar date)
Set the earliest selectable date for the chooser.
|
void |
setVisible(boolean flag)
Show or hide the dialog.
|
addButton, addButton, canCancel, installDialogUI, registerTextInputComponent, removeButton, removeButton, setAcceptButtonText, setButtonOpacity, setCancelButtonText, setComment, setComment, setIcon
addDialogDismissListener, cancel, canClose, destroy, doAccept, doCancel, fireDialogDismissed, fireDialogDismissed, getMainContainer, isCancelled, removeDialogDismissListener, setBusyCursor, setCancelled, setFont, setTexture, startFocus
addImpl, createRootPane, dialogInit, getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getGraphics, getJMenuBar, getLayeredPane, getRootPane, getTransferHandler, isDefaultLookAndFeelDecorated, isRootPaneCheckingEnabled, paramString, processWindowEvent, remove, repaint, setContentPane, setDefaultCloseOperation, setDefaultLookAndFeelDecorated, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setRootPane, setRootPaneCheckingEnabled, setTransferHandler, update
addNotify, getModalityType, getTitle, hide, isModal, isResizable, isUndecorated, setBackground, setModal, setModalityType, setOpacity, setResizable, setShape, setTitle, setUndecorated, show, toBack
addPropertyChangeListener, addPropertyChangeListener, addWindowFocusListener, addWindowListener, addWindowStateListener, applyResourceBundle, applyResourceBundle, createBufferStrategy, createBufferStrategy, dispose, getBackground, getBufferStrategy, getFocusableWindowState, getFocusCycleRootAncestor, getFocusOwner, getFocusTraversalKeys, getIconImages, getInputContext, getListeners, getLocale, getModalExclusionType, getMostRecentFocusOwner, getOpacity, getOwnedWindows, getOwner, getOwnerlessWindows, getShape, getToolkit, getType, getWarningString, getWindowFocusListeners, getWindowListeners, getWindows, getWindowStateListeners, isActive, isAlwaysOnTop, isAlwaysOnTopSupported, isAutoRequestFocus, isFocusableWindow, isFocusCycleRoot, isFocused, isLocationByPlatform, isOpaque, isShowing, isValidateRoot, pack, paint, postEvent, processEvent, processWindowFocusEvent, processWindowStateEvent, removeNotify, removeWindowFocusListener, removeWindowListener, removeWindowStateListener, reshape, setAlwaysOnTop, setAutoRequestFocus, setBounds, setBounds, setCursor, setFocusableWindowState, setFocusCycleRoot, setIconImage, setIconImages, setLocation, setLocation, setLocationByPlatform, setLocationRelativeTo, setMinimumSize, setModalExclusionType, setSize, setSize, setType, toFront
add, add, add, add, add, addContainerListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getComponentZOrder, getContainerListeners, getFocusTraversalPolicy, getInsets, getLayout, getMaximumSize, getMinimumSize, getMousePosition, getPreferredSize, insets, invalidate, isAncestorOf, isFocusCycleRoot, isFocusTraversalPolicyProvider, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, preferredSize, print, printComponents, processContainerEvent, remove, removeAll, removeContainerListener, setComponentZOrder, setFocusTraversalKeys, setFocusTraversalPolicy, setFocusTraversalPolicyProvider, transferFocusDownCycle, validate, validateTree
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, getBaseline, getBaselineResizeBehavior, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMousePosition, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isMaximumSizeSet, isMinimumSizeSet, isPreferredSizeSet, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, resize, resize, revalidate, setComponentOrientation, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeysEnabled, setForeground, setIgnoreRepaint, setLocale, setMaximumSize, setName, setPreferredSize, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle
private DateChooser cal
public DateChooserDialog(Frame parent, boolean modal)
DateChooserDialog
with a default title.parent
- The parent window for the dialog.modal
- A flag specifying whether this dialog will be modal.public DateChooserDialog(Dialog parent, boolean modal)
DateChooserDialog
with a default title.parent
- The parent window for the dialog.modal
- A flag specifying whether this dialog will be modal.public DateChooserDialog(Frame parent, String title, boolean modal)
DateChooserDialog
.parent
- The parent window for the dialog.title
- The title for the dialog.modal
- A flag specifying whether this dialog will be modal.public DateChooserDialog(Dialog parent, String title, boolean modal)
DateChooserDialog
.parent
- The parent window for the dialog.title
- The title for the dialog.modal
- A flag specifying whether this dialog will be modal.protected Component buildDialogUI()
buildDialogUI
in class ComponentDialog
Component
to display in the dialog, or
null
if the component will be constructed later.public void setVisible(boolean flag)
setVisible
in class ComponentDialog
flag
- A flag specifying whether the dialog should be shown
or hidden. If true
, the startFocus()
method is called to allow the subclasser to request focus for a
given child component.KDialog.startFocus()
protected boolean accept()
true
.public Calendar getDate()
Calendar
object, or
null
if the dialog was cancelled.public Calendar getMaximumDate()
null
if there is no
maximum date currently set.public void setMaximumDate(Calendar date)
date
- The (possibly null
) maximum selectable date.public Calendar getMinimumDate()
null
if there is no
minimum date currently set.public void setMinimumDate(Calendar date)
date
- The (possibly null
) minimum selectable date.public void setCellSize(int size)
size
- The width and height, in pixels, of a cell.WebARTS Library Licensed Under the GNU - General Public License. Other Libraries licensed under their respective Open Source Licenses