gov.noaa.pmel.sgt.swing.prop
Class GeoDateDialog

java.lang.Object
  |
  +--java.awt.Component
        |
        +--java.awt.Container
              |
              +--java.awt.Window
                    |
                    +--java.awt.Dialog
                          |
                          +--javax.swing.JDialog
                                |
                                +--gov.noaa.pmel.sgt.swing.prop.GeoDateDialog
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.beans.PropertyChangeListener, javax.swing.RootPaneContainer, java.io.Serializable, javax.swing.WindowConstants

public class GeoDateDialog
extends javax.swing.JDialog
implements java.awt.event.ItemListener, java.beans.PropertyChangeListener, java.awt.event.ActionListener

GeoDateDialog is a calendar, plus optionally, time, chooser that produces a date. It allows the invoker to set the allowable range of dates by specifying an earliest and latest allowable date. The user can select a date to within 5 minutes. If the hour and minutes aren't needed, a flag allows the exclusion of the display of these fields.

Since:
2.0
Version:
$Revision: 1.2 $, $Date: 2001/02/08 00:29:39 $
Author:
Chris Windsor
See Also:
Serialized Form

Field Summary
static int CANCEL_RESPONSE
           
static int DATE
           
static int HOUR_OF_DAY
           
static int MINUTE
           
static int MONTH
           
static int OK_RESPONSE
           
static int YEAR
           
 
Fields inherited from class java.awt.Component
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT
 
Fields inherited from interface javax.swing.WindowConstants
DISPOSE_ON_CLOSE, DO_NOTHING_ON_CLOSE, HIDE_ON_CLOSE
 
Fields inherited from interface java.awt.image.ImageObserver
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH
 
Constructor Summary
GeoDateDialog()
           
GeoDateDialog(GeoDate inDate)
           
GeoDateDialog(GeoDate inDate, GeoDate earliestDateAllowedIn, GeoDate latestDateAllowedIn, int xlocIn, int ylocIn)
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent event)
          Invoked when an action occurs.
 void addPropertyChangeListener(java.beans.PropertyChangeListener l)
          Add a PropertyChangeListener to the listener list.
 java.awt.Font getBoldFont()
           
 java.awt.Color getCalBackground()
           
 GeoDate getDate()
           
 GeoDate getEarliestDateAllowed()
           
 GeoDate getGeoDate()
           
 boolean getHideTime()
           
 GeoDate getInitialDate()
           
 GeoDate getLatestDateAllowed()
           
 java.awt.Color getPanelBackground()
           
 java.awt.Font getRegularFont()
           
 java.awt.Color getSelectedButnBackground()
           
 java.lang.String getTitle()
          Gets the title of the dialog.
 void itemStateChanged(java.awt.event.ItemEvent itemEvent)
          Invoked when an item has been selected or deselected.
static void main(java.lang.String[] args)
           
 void propertyChange(java.beans.PropertyChangeEvent event)
          This method gets called when a bound property is changed.
 void removePropertyChangeListener(java.beans.PropertyChangeListener l)
          Remove a PropertyChangeListener from the listener list.
 void resetMonthYearPanel(GeoDate newDate)
           
 void setBoldFont(java.awt.Font boldFontIn)
           
 void setCalBackground(java.awt.Color color)
           
 void setEarliestDateAllowed(GeoDate earliestDateAllowed)
           
 void setGeoDate(GeoDate dt)
           
 void setHideTime(boolean ans)
           
 void setInitialDate(GeoDate initialDateIn)
           
 void setLatestDateAllowed(GeoDate latestDateAllowed)
           
 void setOutputDateFormatter(java.text.SimpleDateFormat sdf)
           
 void setPanelBackground(java.awt.Color color)
           
 void setRegularFont(java.awt.Font regularFontIn)
           
 void setSelectedButnBackground(java.awt.Color color)
           
 void setTitle(java.lang.String title)
          Sets the title of the Dialog.
 int showDialog(GeoDate date, int x, int y)
           
 
Methods inherited from class javax.swing.JDialog
getAccessibleContext, getContentPane, getDefaultCloseOperation, getGlassPane, getJMenuBar, getLayeredPane, getRootPane, remove, setContentPane, setDefaultCloseOperation, setGlassPane, setJMenuBar, setLayeredPane, setLayout, setLocationRelativeTo, update
 
Methods inherited from class java.awt.Dialog
addNotify, dispose, hide, isModal, isResizable, setModal, setResizable, show
 
Methods inherited from class java.awt.Window
addWindowListener, applyResourceBundle, applyResourceBundle, getFocusOwner, getGraphicsConfiguration, getInputContext, getListeners, getLocale, getOwnedWindows, getOwner, getToolkit, getWarningString, isShowing, pack, postEvent, removeWindowListener, setCursor, toBack, toFront
 
Methods inherited from class java.awt.Container
add, add, add, add, add, addContainerListener, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getInsets, getLayout, getMaximumSize, getMinimumSize, getPreferredSize, insets, invalidate, isAncestorOf, layout, list, list, locate, minimumSize, paint, paintComponents, preferredSize, print, printComponents, remove, removeAll, removeContainerListener, removeNotify, setFont, validate
 
Methods inherited from class java.awt.Component
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addPropertyChangeListener, bounds, checkImage, checkImage, contains, contains, createImage, createImage, disable, dispatchEvent, enable, enable, enableInputMethods, getBackground, getBounds, getBounds, getColorModel, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getHeight, getInputMethodRequests, getLocation, getLocation, getLocationOnScreen, getName, getParent, getPeer, getSize, getSize, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, imageUpdate, inside, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, prepareImage, prepareImage, printAll, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setDropTarget, setEnabled, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, size, toString, transferFocus
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

OK_RESPONSE

public static int OK_RESPONSE

CANCEL_RESPONSE

public static int CANCEL_RESPONSE

DATE

public static final int DATE

YEAR

public static final int YEAR

MONTH

public static final int MONTH

MINUTE

public static final int MINUTE

HOUR_OF_DAY

public static final int HOUR_OF_DAY
Constructor Detail

GeoDateDialog

public GeoDateDialog(GeoDate inDate)

GeoDateDialog

public GeoDateDialog(GeoDate inDate,
                     GeoDate earliestDateAllowedIn,
                     GeoDate latestDateAllowedIn,
                     int xlocIn,
                     int ylocIn)

GeoDateDialog

public GeoDateDialog()
Method Detail

setEarliestDateAllowed

public void setEarliestDateAllowed(GeoDate earliestDateAllowed)

setLatestDateAllowed

public void setLatestDateAllowed(GeoDate latestDateAllowed)

getEarliestDateAllowed

public GeoDate getEarliestDateAllowed()

getLatestDateAllowed

public GeoDate getLatestDateAllowed()

setOutputDateFormatter

public void setOutputDateFormatter(java.text.SimpleDateFormat sdf)

setInitialDate

public void setInitialDate(GeoDate initialDateIn)

setGeoDate

public void setGeoDate(GeoDate dt)

setTitle

public void setTitle(java.lang.String title)
Description copied from class: java.awt.Dialog
Sets the title of the Dialog.
Overrides:
setTitle in class java.awt.Dialog
Following copied from class: java.awt.Dialog
Parameters:
title - the title displayed in the dialog's border
See Also:
Dialog.getTitle()

getTitle

public java.lang.String getTitle()
Description copied from class: java.awt.Dialog
Gets the title of the dialog. The title is displayed in the dialog's border.
Overrides:
getTitle in class java.awt.Dialog
Following copied from class: java.awt.Dialog
Returns:
the title of this dialog window. The title may be null.
See Also:
Dialog.setTitle(java.lang.String)

getInitialDate

public GeoDate getInitialDate()

setRegularFont

public void setRegularFont(java.awt.Font regularFontIn)

getRegularFont

public java.awt.Font getRegularFont()

setBoldFont

public void setBoldFont(java.awt.Font boldFontIn)

getBoldFont

public java.awt.Font getBoldFont()

setPanelBackground

public void setPanelBackground(java.awt.Color color)

getPanelBackground

public java.awt.Color getPanelBackground()

setCalBackground

public void setCalBackground(java.awt.Color color)

getCalBackground

public java.awt.Color getCalBackground()

setSelectedButnBackground

public void setSelectedButnBackground(java.awt.Color color)

getSelectedButnBackground

public java.awt.Color getSelectedButnBackground()

setHideTime

public void setHideTime(boolean ans)

getHideTime

public boolean getHideTime()

showDialog

public int showDialog(GeoDate date,
                      int x,
                      int y)

getGeoDate

public GeoDate getGeoDate()

resetMonthYearPanel

public void resetMonthYearPanel(GeoDate newDate)

itemStateChanged

public void itemStateChanged(java.awt.event.ItemEvent itemEvent)
Description copied from interface: java.awt.event.ItemListener
Invoked when an item has been selected or deselected. The code written for this method performs the operations that need to occur when an item is selected (or deselected).
Specified by:
itemStateChanged in interface java.awt.event.ItemListener

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent event)
Description copied from interface: java.awt.event.ActionListener
Invoked when an action occurs.
Specified by:
actionPerformed in interface java.awt.event.ActionListener

getDate

public GeoDate getDate()

propertyChange

public void propertyChange(java.beans.PropertyChangeEvent event)
Description copied from interface: java.beans.PropertyChangeListener
This method gets called when a bound property is changed.
Specified by:
propertyChange in interface java.beans.PropertyChangeListener
Following copied from interface: java.beans.PropertyChangeListener
Parameters:
evt - A PropertyChangeEvent object describing the event source and the property that has changed.

addPropertyChangeListener

public void addPropertyChangeListener(java.beans.PropertyChangeListener l)
Description copied from class: java.awt.Component
Add a PropertyChangeListener to the listener list. The listener is registered for all properties.

A PropertyChangeEvent will get fired in response to an explicit setFont, setBackground, or SetForeground on the current component. Note that if the current component is inheriting its foreground, background, or font from its container, then no event will be fired in response to a change in the inherited property. If listener is null, no exception is thrown and no action is performed.

Overrides:
addPropertyChangeListener in class java.awt.Component
Following copied from class: java.awt.Component
Parameters:
listener - The PropertyChangeListener to be added

removePropertyChangeListener

public void removePropertyChangeListener(java.beans.PropertyChangeListener l)
Description copied from class: java.awt.Component
Remove a PropertyChangeListener from the listener list. This removes a PropertyChangeListener that was registered for all properties. If listener is null, no exception is thrown and no action is performed.
Overrides:
removePropertyChangeListener in class java.awt.Component
Following copied from class: java.awt.Component
Parameters:
listener - The PropertyChangeListener to be removed

main

public static void main(java.lang.String[] args)


Send comments about the Scientific Graphics toolkit to dwd@pmel.noaa.gov. For more information about Java Development in the EPIC Group see the EPIC Software Page
Generated on December 13 2001