|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Object
|
+--java.awt.Component
|
+--java.awt.Container
|
+--javax.swing.JComponent
|
+--javax.swing.JPanel
|
+--arlut.csd.JCalendar.JpanelCalendar
A GUI Calendar for use with the JdateField class.
| Field Summary | |
protected arlut.csd.JCalendar.JdateButton[] |
_datebuttonArray
The meat of the calendar. |
private boolean |
allowMonthChange
If true, we'll allow the use to change the month and year displayed in the calendar. |
private javax.swing.JPanel |
buttonPanel
|
private javax.swing.JPanel |
calButtonPanel
|
protected arlut.csd.JDataComponent.JsetValueCallback |
callback
Who do we notify when the user changes the date through direct manipulation of the calendar? |
protected javax.swing.JButton |
closeButton
|
private boolean |
compact
If true, we'll try to render the calendar in a compressed form, with less space for the calendar buttons. |
private boolean |
dateIsSet
Used to control whether we show a selected day in the calendar. |
(package private) static boolean |
debug
|
private boolean |
editable
If true, we will allow the calendar to be used to change the date/time selected. |
(package private) static int[] |
leapDays
|
(package private) static java.lang.String[] |
month_names
|
(package private) static int[] |
monthDays
|
private arlut.csd.JCalendar.JMonthYearPanel |
monthYearPanel
|
protected java.awt.Font |
notTodayFont
|
protected arlut.csd.JCalendar.JpopUpCalendar |
pCal
If we are contained in a pop-up, this will refer to the dialog frame, so that the close button can close it. |
private java.util.Date |
previousDate
The last known good date. |
protected java.util.GregorianCalendar |
selectedDate_calendar
What time do we have set? |
private boolean |
showTime
If true, we'll show the time of day in the calendar, and allow the user to edit the time of day if we are editable. |
private arlut.csd.JCalendar.JTimePanel |
timePanel
|
protected java.awt.Font |
todayFont
|
protected java.util.GregorianCalendar |
visibleDate_calendar
What time do we have visible? Month, year, etc. |
| Fields inherited from class javax.swing.JPanel |
|
| 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.Container |
|
| 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 | |
JpanelCalendar(java.util.GregorianCalendar parentCalendar,
arlut.csd.JDataComponent.JsetValueCallback callback,
boolean editable)
Lots of constructors. |
|
JpanelCalendar(java.util.GregorianCalendar parentCalendar,
arlut.csd.JDataComponent.JsetValueCallback callback,
boolean showTime,
boolean editable)
Constructors. |
|
JpanelCalendar(java.util.GregorianCalendar parentCalendar,
arlut.csd.JDataComponent.JsetValueCallback callback,
boolean showTime,
boolean compact,
boolean editable)
The main constructor. |
|
JpanelCalendar(arlut.csd.JCalendar.JpopUpCalendar pC,
java.util.GregorianCalendar parentCalendar,
arlut.csd.JDataComponent.JsetValueCallback callback,
boolean editable)
|
|
JpanelCalendar(arlut.csd.JCalendar.JpopUpCalendar pC,
java.util.GregorianCalendar parentCalendar,
arlut.csd.JDataComponent.JsetValueCallback callback,
boolean showTime,
boolean editable)
|
|
JpanelCalendar(arlut.csd.JCalendar.JpopUpCalendar pC,
java.util.GregorianCalendar parentCalendar,
arlut.csd.JDataComponent.JsetValueCallback callback,
boolean showTime,
boolean compact,
boolean editable)
|
|
| Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
Our buttons call us back here. |
void |
buttonPressed(arlut.csd.JCalendar.JdateButton _bttn)
This method handles the final processing of any calendar button pushed. |
void |
clear()
|
void |
displaySelectedPage()
This method forces the calendar to jump to the page containing the selected date. |
boolean |
getAllowMonthChange()
This method may be used to query the calendar to see if the month and year changing buttons are enabled. |
java.util.Date |
getDate()
This method returns the selected date held in this calendar. |
int |
getSelectedMonth()
This method returns the month of the year for the selected date, in the range 0-11. |
java.lang.String |
getSelectedMonthString()
This method returns a string describing the month and year of the currently selected date |
int |
getSelectedYear()
This method returns the year being displayed in the calendar gui. |
int |
getVisibleMonth()
This method returns the month of the year currently being displayed in the calendar gui, in the range 0-11. |
int |
getVisibleYear()
This method returns the year being displayed in the calendar gui. |
boolean |
isEditable()
Returns true if this calendar is configured to allow editing of the selected date. |
static void |
main(java.lang.String[] argv)
Command line test rig |
void |
setAllowMonthChange(boolean okay)
This method may be used to enable or disable the month and year changing buttons. |
void |
setDate(java.util.Date date)
This is the main programmatic entry point for setting the date selected in this calendar widget. |
private void |
setYear(int year)
|
void |
timeChanged(java.lang.String _field,
int _value)
This method is used to update the calendar's notion of time from information passed in from the time panel. |
void |
update()
This method takes the current time held in selectedDate_calendar and refreshes the calendar with it. |
(package private) void |
updateDate()
This will update the visibleDate_calendar according to the current year and month visible in the GUI controls. |
protected void |
writeDates()
This method updates the calendar buttons from the time information held in visibleDate_calendar. |
| 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, requestFocus, requestFocusInWindow, requestFocusInWindow, resetKeyboardActions, reshape, revalidate, scrollRectToVisible, setActionMap, setAlignmentX, setAlignmentY, setAutoscrolls, setBackground, setBorder, setDebugGraphicsOptions, setDefaultLocale, setDoubleBuffered, setEnabled, setFont, setForeground, 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, getName, 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, setName, 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 |
static final boolean debug
static final int[] leapDays
static final int[] monthDays
static final java.lang.String[] month_names
protected java.util.GregorianCalendar selectedDate_calendar
protected java.util.GregorianCalendar visibleDate_calendar
protected arlut.csd.JDataComponent.JsetValueCallback callback
Who do we notify when the user changes the date through direct manipulation of the calendar?
protected arlut.csd.JCalendar.JpopUpCalendar pCal
If we are contained in a pop-up, this will refer to the dialog frame, so that the close button can close it.
protected javax.swing.JButton closeButton
protected arlut.csd.JCalendar.JdateButton[] _datebuttonArray
The meat of the calendar. This array of JdateButton's are both the display and the main user interface element for the JpanelCalendar.
private arlut.csd.JCalendar.JMonthYearPanel monthYearPanel
private javax.swing.JPanel calButtonPanel
private javax.swing.JPanel buttonPanel
private arlut.csd.JCalendar.JTimePanel timePanel
protected java.awt.Font todayFont
protected java.awt.Font notTodayFont
private boolean editable
If true, we will allow the calendar to be used to change the date/time selected. If false, we will be display only.
private boolean dateIsSet
Used to control whether we show a selected day in the calendar. If false, no date has been set, and we'll show all calendar pages with no dates highlighed.
private boolean showTime
If true, we'll show the time of day in the calendar, and allow the user to edit the time of day if we are editable. If false, we'll show the the date only.
private boolean allowMonthChange
If true, we'll allow the use to change the month and year displayed in the calendar.
private boolean compact
If true, we'll try to render the calendar in a compressed form, with less space for the calendar buttons.
private java.util.Date previousDate
The last known good date. If we attempt to pass a date change back to our client and the attempt fails, this is the date we'll revert to afterwards.
| Constructor Detail |
public JpanelCalendar(java.util.GregorianCalendar parentCalendar,
arlut.csd.JDataComponent.JsetValueCallback callback,
boolean editable)
public JpanelCalendar(java.util.GregorianCalendar parentCalendar,
arlut.csd.JDataComponent.JsetValueCallback callback,
boolean showTime,
boolean editable)
showTime - If true, then the "Choose a time" part will be there. Also, if true, time will appear in date at top.
public JpanelCalendar(arlut.csd.JCalendar.JpopUpCalendar pC,
java.util.GregorianCalendar parentCalendar,
arlut.csd.JDataComponent.JsetValueCallback callback,
boolean editable)
public JpanelCalendar(arlut.csd.JCalendar.JpopUpCalendar pC,
java.util.GregorianCalendar parentCalendar,
arlut.csd.JDataComponent.JsetValueCallback callback,
boolean showTime,
boolean editable)
public JpanelCalendar(arlut.csd.JCalendar.JpopUpCalendar pC,
java.util.GregorianCalendar parentCalendar,
arlut.csd.JDataComponent.JsetValueCallback callback,
boolean showTime,
boolean compact,
boolean editable)
compact - If true, calendar will be drawn smaller.
public JpanelCalendar(java.util.GregorianCalendar parentCalendar,
arlut.csd.JDataComponent.JsetValueCallback callback,
boolean showTime,
boolean compact,
boolean editable)
The main constructor. Here's where all the magic happens.
| Method Detail |
public void setDate(java.util.Date date)
This is the main programmatic entry point for setting the date selected in this calendar widget. Calling this method will update the selected time/date to that passed, and will redraw the calendar with the selected time/date shown.
Calling this method will not trigger a callback to report the date change to our client.
public java.util.Date getDate()
This method returns the selected date held in this calendar.
public boolean isEditable()
Returns true if this calendar is configured to allow editing of the selected date.
public int getVisibleMonth()
This method returns the month of the year currently being displayed in the calendar gui, in the range 0-11.
public int getSelectedMonth()
This method returns the month of the year for the selected date, in the range 0-11.
public int getVisibleYear()
This method returns the year being displayed in the calendar gui.
public int getSelectedYear()
This method returns the year being displayed in the calendar gui.
private void setYear(int year)
public void clear()
public void setAllowMonthChange(boolean okay)
This method may be used to enable or disable the month and year changing buttons. If this method is called with a false parameter, the calendar will not allow changing of the month/year.
By default, the JpanelCalendar allows month flipping in editable calendars and does not allow it in non-editable calendars.
public boolean getAllowMonthChange()
This method may be used to query the calendar to see if the month and year changing buttons are enabled. If this method returns false, the calendar does not allow changing of the month/year.
void updateDate()
public void displaySelectedPage()
This method forces the calendar to jump to the page containing the selected date.
public java.lang.String getSelectedMonthString()
This method returns a string describing the month and year of the currently selected date
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed in interface java.awt.event.ActionListenerpublic void update()
protected void writeDates()
This method updates the calendar buttons from the time information held in visibleDate_calendar.
public void buttonPressed(arlut.csd.JCalendar.JdateButton _bttn)
public void timeChanged(java.lang.String _field,
int _value)
public static void main(java.lang.String[] argv)
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||