com.droplets.api
Class DateChooser

java.lang.Object
  |
  +--com.droplets.api.Component
        |
        +--com.droplets.api.Panel
              |
              +--com.droplets.api.DateChooser

public class DateChooser
extends Panel

Component that lets the user specify a particular date using a standard visual calendar user interface. Uses an event listener to tell the application that the user has chosen a new date


Inner classes inherited from class com.droplets.api.Panel
Panel.ImageMode
 
Fields inherited from class com.droplets.api.Panel
IMAGE_CENTER, IMAGE_FIT, IMAGE_SCALE_BOTH, IMAGE_SCALE_DOWN, IMAGE_SCALE_UP, IMAGE_TILE, IMAGE_TILE_WRT_WINDOW, SCROLLBARS_AUTO, SCROLLBARS_OFF, SCROLLBARS_ON
 
Fields inherited from class com.droplets.api.Component
ANCHOR_CENTER, ANCHOR_EAST, ANCHOR_NORTH, ANCHOR_NORTHEAST, ANCHOR_NORTHWEST, ANCHOR_SOUTH, ANCHOR_SOUTHEAST, ANCHOR_SOUTHWEST, ANCHOR_WEST, FILL_BOTH, FILL_HORIZONTAL, FILL_NONE, FILL_VERTICAL
 
Constructor Summary
DateChooser(LayoutPlacement layout, java.util.Calendar initialDate, Window window)
          Construct a DateChooser.
 
Method Summary
 void addDateChooserListener(DateChooserListener l)
          Add a listener object to let the application know when the user has inidicated a new date in the CalendarWindow
protected  void fireDateChooserEvent(java.util.Calendar newValue)
           
 void removeDateChooserListener(DateChooserListener l)
          remove a listener object from the list
 void setDate(java.util.Calendar newDate)
          Make the DateChooser point to a new date programmatically
 void useImagesForNavigation(java.lang.String prevImageSetName, java.lang.String nextImageSetName)
          Set the date chooser to use images for the previous/next month/year buttons, instead of the characters < and >.
 
Methods inherited from class com.droplets.api.Panel
addComponent, getBorders, getImageMode, getImageName, getImageRedirector, getImageUrl, getIsMoveHandle, getIsScrollPanelEnabled, getMinScrollContentHeight, getMinScrollContentWidth, getScrollbarVisibility, getSizeToImage, isContainer, setBorders, setBorders, setImageMode, setImageMode, setImageName, setImageName, setImageRedirector, setImageRedirector, setImageUrl, setImageUrl, setIsMoveHandle, setIsMoveHandle, setIsScrollPanelEnabled, setMinScrollContentHeight, setMinScrollContentWidth, setScrollbarVisibility, setSizeToImage, setSizeToImage
 
Methods inherited from class com.droplets.api.Component
action, addActionListener, addAttributeChangeListener, addValueChangeListener, attributeChanged, constructionFailed, equals, fireActionEvent, fireAttributeChangeEvent, fireValueChangeEvent, getAnchor, getAttribute, getBgColor, getBoolAttribute, getBordersAttribute, getColorAttribute, getCursor, getCursorType, getDoubleAttribute, getEnabled, getFgColor, getFill, getFont, getGridHeight, getGridWidth, getGridX, getGridY, getInsets, getIntAttribute, getIPadX, getIPadY, getOpaque, getParent, getScriptingName, getSpecification, getStringAttribute, getToolTip, getValue, getVisible, getWeightX, getWeightY, getWindow, invalidate, isAddedToWindow, isFocusTraversable, isFocusTraversableDefault, isValid, removeActionListener, removeAttributeChangeListener, removeValueChangeListener, requestFocus, reset, sendCommandAttribute, setAnchor, setAnchor, setArg, setAttribute, setBgColor, setBgColor, setBoolAttribute, setBordersAttribute, setColorAttribute, setCursor, setCursor, setCursorType, setDoubleAttribute, setEnabled, setEnabled, setEnterButton, setEnterButton, setEnterButton, setFgColor, setFgColor, setFill, setFill, setFocusTraversable, setFont, setFont, setGridHeight, setGridHeight, setGridWidth, setGridWidth, setGridX, setGridX, setGridY, setGridY, setInsets, setInsets, setIntAttribute, setIPadX, setIPadX, setIPadY, setIPadY, setItemListAttribute, setOpaque, setOpaque, setScriptingName, setStringAttribute, setToolTip, setValue, setValue, setVisible, setVisible, setWeightX, setWeightX, setWeightY, setWeightY, storeAttribute, valueChanged
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DateChooser

public DateChooser(LayoutPlacement layout,
                   java.util.Calendar initialDate,
                   Window window)
Construct a DateChooser. Calendar panels must be added to windows by adding them directly to parent panels (with Panel.addComponent()). Furthermore, since you must add all components to the window with the same style (to the Panel as opposed to to the Window), Window.addComponent() may not be called on the parent window at all. Panel.addComponent() is the preferred method of adding components.
Parameters:
layout - The grid position and size of the component
initialDate - is the date to which the CalendarWindow should be pointing
window - the parent window of the component when it first comes up
Method Detail

setDate

public void setDate(java.util.Calendar newDate)
Make the DateChooser point to a new date programmatically
Parameters:
newDate - is the date to which the DateChooser should now point

addDateChooserListener

public void addDateChooserListener(DateChooserListener l)
Add a listener object to let the application know when the user has inidicated a new date in the CalendarWindow
Parameters:
l - listener to be added

removeDateChooserListener

public void removeDateChooserListener(DateChooserListener l)
remove a listener object from the list
Parameters:
l - listener to be removed

fireDateChooserEvent

protected void fireDateChooserEvent(java.util.Calendar newValue)

useImagesForNavigation

public void useImagesForNavigation(java.lang.String prevImageSetName,
                                   java.lang.String nextImageSetName)
Set the date chooser to use images for the previous/next month/year buttons, instead of the characters < and >. Exactly as in ImageButton, an "image set name" of "X" would refer to an image file "X.gif" for the default appearance of the button, and optional "XOver.gif" and "XDown.gif" files when the button is under the mouse pointer or being clicked.

If you pass an empty string or null for prevImageSetName or nextImageSetName, the buttons will be drawn as < or > again.

Parameters:
prevImageSetName - name of image set to use for "previous" buttons
nextImageSetName - name of image set to use for "next" buttons


Copyright © Droplets, 2001. All Rights Reserved.