|
[.hacks.] [.java.] |
||||||||
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 | +--java.awt.Panel | +--Awt | +--Cal
(#)Cal.java
Field Summary | |
protected java.util.GregorianCalendar |
cl
holds current date/time |
static int |
DATE
bitmask for showing date |
protected Caption |
datl
date label - disply current date set |
protected java.awt.Container |
datp
date panel |
protected java.awt.Container |
dayp
day panel |
protected Knob[] |
days
knobs for day of month selection |
protected java.text.DateFormat |
df
dateformat used for this widget |
protected int |
mode
currend mode: TIME, DATE, DATE|TIME |
protected java.text.DateFormat |
tf
timeformat used for this widget |
static int |
TIME
bitmask for showing time |
protected Caption |
timl
time label - disply current time set |
protected java.awt.Container |
timp
time panel |
Fields inherited from class Awt |
actionListener, Background, bg, big, bim, Black, BlueMask, Bold, Bolditalic, borderDepth, borderType, BOTTOM, Brighter, Bulk, BULK, C, Center, CENTER, ColorMask, componentStates, Darker, E, East, EFFECT_MASK, Esc, FILL, Flat, FontMask, fonts, FontSize0, FontSizeMask, Foreground, GreenMask, Href, HREF, Hrefend, innerInsets, insets, Italic, itemListener, jvendor, jversion, Larger, LEFT, minimumDimension, MISC_MASK, Monospaced, N, NE, None, NONE, North, NorthEast, NorthWest, Null, NW, Plain, POSITION_MASK, Raised, RAISED, RedMask, RIGHT, S, SansSerif, SE, Serif, Smaller, South, SouthEast, SouthWest, Sunken, SUNKEN, SW, Tab0, TabMask, TabSizeMask, TOP, Uline, ULINE, W, West, White |
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 | |
Cal()
default constructor - creates date date/time widget |
|
Cal(int m)
constructor - creates specified widget |
|
Cal(int m,
java.util.Date d)
constructor - creates specified widget with specified initial date/time |
|
Cal(int m,
java.util.Date d,
java.util.Locale l)
constructor - creates specified widget with specified initial date/time and specified locale (language) |
Method Summary | |
void |
actionPerformed(java.awt.event.ActionEvent e)
implement actionlistener to catch knobs pressed |
void |
add(int f,
int v)
increment/decrement current date/time |
protected java.util.TimeZone |
correctTZ(java.util.TimeZone tz)
Java treats MET as "Middle Eastern Time" not as "Middle European time" as expected. |
java.util.Calendar |
getCalendar()
get this widget's date/time as Calendar object |
java.util.Date |
getDate()
get this widget's current date/time |
int |
getMode()
get this widget's mode |
long |
getTime()
get this widget's current time as seconds from 1970 |
java.awt.Dimension |
measure()
get this widget's required size |
protected void |
set()
internally called if something has changed |
void |
set(int f,
int v)
set current date/time |
void |
setCalendar(java.util.Calendar c)
set current date/time |
void |
setDate(java.util.Calendar c)
set current date/time |
void |
setDate(java.util.Date d)
set current date/time |
void |
setDate(java.lang.String d,
java.text.DateFormat df)
set current date/time from string using specified date format |
void |
setDate(java.lang.String d,
java.lang.String df)
set current date/time from string using specified date format |
void |
setMode(int m)
set this widget mode - TIME, DATE or DATE|TIME |
java.lang.String |
toString(java.text.DateFormat df)
get this widget's date/time using the specified date format |
java.lang.String |
toString(java.lang.String df)
get this widget's date/time using the specified date format |
Methods inherited from class java.awt.Panel |
getAccessibleContext |
Methods inherited from class java.awt.Container |
add, add, add, add, add, addContainerListener, addImpl, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, countComponents, deliverEvent, doLayout, findComponentAt, findComponentAt, getAlignmentX, getAlignmentY, getComponent, getComponentAt, getComponentAt, getComponentCount, getComponents, getContainerListeners, getFocusTraversalKeys, getFocusTraversalPolicy, getLayout, getListeners, getMaximumSize, insets, isAncestorOf, isFocusCycleRoot, isFocusCycleRoot, isFocusTraversalPolicySet, layout, list, list, locate, minimumSize, paintComponents, paramString, preferredSize, print, printComponents, processContainerEvent, processEvent, remove, remove, removeAll, removeContainerListener, removeNotify, 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, contains, createImage, createImage, createVolatileImage, createVolatileImage, disable, disableEvents, dispatchEvent, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getBackground, getBounds, getBounds, getColorModel, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, list, list, list, location, lostFocus, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, 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, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setComponentOrientation, setCursor, setDropTarget, setFocusable, setFocusTraversalKeysEnabled, setForeground, 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 |
public static final int DATE
public static final int TIME
protected int mode
protected java.util.GregorianCalendar cl
protected java.text.DateFormat df
protected java.text.DateFormat tf
protected Knob[] days
protected java.awt.Container datp
protected java.awt.Container dayp
protected java.awt.Container timp
protected Caption datl
protected Caption timl
Constructor Detail |
public Cal()
public Cal(int m)
m
- mode bits: TIME DATE DATE|TIMEpublic Cal(int m, java.util.Date d)
m
- mode bits: TIME DATE DATE|TIMEd
- date for initializationpublic Cal(int m, java.util.Date d, java.util.Locale l)
m
- mode bits: TIME DATE DATE|TIMEd
- date for initializationl
- locale to useMethod Detail |
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void add(int f, int v)
f
- field to change within calendarv
- value to add/removepublic void set(int f, int v)
f
- field to set within calendarv
- value to setpublic void setDate(java.util.Date d)
d
- date to setpublic void setDate(java.lang.String d, java.lang.String df)
d
- date to setdf
- date format to usepublic void setDate(java.lang.String d, java.text.DateFormat df)
d
- date to setdf
- date format to usepublic java.util.Date getDate()
public long getTime()
public void setDate(java.util.Calendar c)
c
- date/time to usepublic void setCalendar(java.util.Calendar c)
c
- date/time to usepublic java.util.Calendar getCalendar()
protected void set()
public void setMode(int m)
m
- mode bits: TIME DATE DATE|TIMEpublic int getMode()
public java.lang.String toString(java.lang.String df)
df
- date format to usepublic java.lang.String toString(java.text.DateFormat df)
df
- date format to useprotected java.util.TimeZone correctTZ(java.util.TimeZone tz)
public java.awt.Dimension measure()
measure
in class Awt
|
[.hacks.] [.java.] |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |