OverviewSingleDeprecated

jsx3.gui

class TimePicker

Object
->jsx3.lang.Object
  ->jsx3.app.Model
    ->jsx3.gui.Painted
      ->jsx3.gui.Block
        ->jsx3.gui.TimePicker

All Implemented Interfaces:

jsx3.gui.Form, jsx3.gui.Interactive, jsx3.util.EventDispatcher

class TimePicker
extends jsx3.gui.Block
A form element that allows for the selection of an arbitrary time of day. This control always shows hour and minute values and can be configured to show second and millisecond values as well.

This control is localized. The separators between the time fields are controlled by the server locale. Additionally, whether a 24 hour clock is used is determined by the server locale, although this can be overridden per instance by setting the 24hour property explicitly.

Since:

3.2

See Also:

jsx3.gui.DatePicker, jsx3.app.Server.getLocale()

Constructor Summary
void
init(strName : String, intLeft : int | String, intTop : int | String, intHeight : int | String)
The instance initializer.
Method Summary
Date
getDate(objDate : Date)
Returns a date with the time of day set to the value of this time picker.
int
Returns the hour (0-23) of the time value of this time picker.
int
Returns the millisecond (0-999) of the time value of this time picker.
int
Returns the minute (0-60) of the time value of this time picker.
int
Returns the second (0-60) of the time value of this time picker.
int
Returns whether this time picker shows the millisecond input field.
int
Returns whether this time picker shows the second input field.
int
Returns whether this time picker displays with a 24-hour clock.
String
void
set24Hour(b24Hour : boolean)
Sets whether this time picker uses a 24-hour clock.
void
setDate(objDate : Date)
Sets the value of this time picker in local time.
jsx3.gui.Block
setFontSize(intPixelSize : int)
Sets the CSS font-size for the object; returns reference to self to facilitate method chaining;
void
setHours(intHours : int)
Sets the hour value of this time picker.
void
setMilliseconds(intMillis : int)
Sets the millisecond value of this time picker.
void
setMinutes(intMinutes : int)
Sets the minute value of this time picker.
void
setSeconds(intSeconds : int)
Sets the second value of this time picker.
void
Sets whether this time picker shows the millisecond input field.
void
Sets whether this time picker shows the second input field.
Methods Inherited From jsx3.gui.Form
doKeyBinding, doReset, doValidate, getDisabledBackgroundColor, getDisabledColor, getEnabled, getKeyBinding, getRequired, getValidationState, getValue, setDisabledBackgroundColor, setDisabledColor, setEnabled, setKeyBinding, setRequired, setValidationState, setValue
Methods Inherited From jsx3.gui.Block
getBackground, getBackgroundColor, getBorder, getCSSOverride, getClassName, getColor, getCursor, getDimensions, getDisplay, getFontName, getFontSize, getFontWeight, getHeight, getIndex, getLeft, getMargin, getOverflow, getPadding, getRelativePosition, getTagName, getText, getTextAlign, getTip, getTop, getVisibility, getWidth, getZIndex, hideMask, setBackground, setBackgroundColor, setBorder, setCSSOverride, setClassName, setColor, setCursor, setDimensions, setDisplay, setFontName, setFontWeight, setHeight, setIndex, setLeft, setMargin, setOverflow, setPadding, setRelativePosition, setTagName, setText, setTextAlign, setTip, setTop, setVisibility, setWidth, setZIndex, showMask
Methods Inherited From jsx3.gui.Interactive
doEvent, getCanDrag, getCanDrop, getCanMove, getCanSpy, getEvent, getEvents, getMenu, hasEvent, registerHotKey, removeEvent, removeEvents, setCanDrag, setCanDrop, setCanMove, setCanSpy, setEvent, setMenu, setSpyStyles, showSpy
Methods Inherited From jsx3.gui.Painted
focus, getAbsolutePosition, getAttribute, getAttributes, getDynamicProperty, getRendered, insertHTML, onAfterPaint, paintChild, paintChildren, recalcBox, removeAttribute, removeAttributes, repaint, setAttribute, setDynamicProperty
Methods Inherited From jsx3.app.Model
adoptChild, doClone, findAncestor, findDescendants, getAncestorOfName, getAncestorOfType, getChild, getChildIndex, getChildren, getDescendantOfName, getDescendantsOfType, getFirstChild, getFirstChildOfType, getHelpId, getId, getLastChild, getLoadType, getMetaValue, getNS, getName, getNextSibling, getParent, getPersistence, getPreviousSibling, getServer, getUriResolver, insertBefore, load, loadAndCache, loadXML, onAfterAssemble, onAfterAttach, onBeforeAssemble, onChangeServer, onDestroy, onRemoveChild, onSetChild, onSetParent, removeChild, removeChildren, setChild, setHelpId, setLoadType, setMetaValue, setName, setPersistence, toString, toXML, toXMLDoc
Methods Inherited From jsx3.util.EventDispatcher
publish, subscribe, unsubscribe, unsubscribeAll
Methods Inherited From jsx3.lang.Object
clone, equals, eval, getClass, getInstanceOf, getInstanceOfClass, getInstanceOfPackage, instanceOf, isInstanceOf, isSubclassOf, jsxmix, jsxsuper, jsxsupermix, setInstanceOf
Constructor Detail

init

void init(strName : String, intLeft : int | String, intTop : int | String, intHeight : int | String)
The instance initializer.

Parameters:

strNameunique name distinguishing this object from all other JSX GUI objects in the JSX application
intLefteither a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
intTopeither a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
intHeighteither a number (i.e, 12, 30, etc) or a number and a unit value (i.e., "25%", "36pt", etc); if a number is passed, pixels will be the assumed unit when painted to screen
Method Detail

getDate

Date getDate(objDate : Date)
Returns a date with the time of day set to the value of this time picker. This method either returns the objDate parameter with the time of day set in local time or, if objDate is not provided, it returns a new date (the current day) with the time of day set.

Parameters:

objDatethe date on which to set the time of day. This parameter is optional.

Returns:

 

getHours

int getHours()
Returns the hour (0-23) of the time value of this time picker.

Returns:

 

getMilliseconds

int getMilliseconds()
Returns the millisecond (0-999) of the time value of this time picker.

Returns:

 

getMinutes

int getMinutes()
Returns the minute (0-60) of the time value of this time picker.

Returns:

 

getSeconds

int getSeconds()
Returns the second (0-60) of the time value of this time picker.

Returns:

 

getShowMillis

int getShowMillis()
Returns whether this time picker shows the millisecond input field. The millisecond input field will only display if both this and showSeconds are true.

Returns:

0 or 1.  

getShowSeconds

int getShowSeconds()
Returns whether this time picker shows the second input field.

Returns:

0 or 1.  

is24Hour

int is24Hour()
Returns whether this time picker displays with a 24-hour clock. The default value depends on the default locale.

Returns:

0 or 1.  

paint

String paint()

Returns:

 

Overrides:

paint in jsx3.gui.Block

set24Hour

void set24Hour(b24Hour : boolean)
Sets whether this time picker uses a 24-hour clock.

Parameters:

b24Hourmay be null to use the locale default value.

setDate

void setDate(objDate : Date)
Sets the value of this time picker in local time. This method updates the view immediately.

Parameters:

objDatethe date whose time of day information to use for setting the value of this time picker. If this parameter is null, the current time value is cleared.

setFontSize

jsx3.gui.Block setFontSize(intPixelSize : int)
Sets the CSS font-size for the object; returns reference to self to facilitate method chaining;

Parameters:

intPixelSizefont-size (in pixels)

Returns:

this object  

Overrides:

setFontSize in jsx3.gui.Block

setHours

void setHours(intHours : int)
Sets the hour value of this time picker. This method updates the view immediately.

Parameters:

intHours0-23.

setMilliseconds

void setMilliseconds(intMillis : int)
Sets the millisecond value of this time picker. This method updates the view immediately.

Parameters:

intMillis0-999.

setMinutes

void setMinutes(intMinutes : int)
Sets the minute value of this time picker. This method updates the view immediately.

Parameters:

intMinutes0-59.

setSeconds

void setSeconds(intSeconds : int)
Sets the second value of this time picker. This method updates the view immediately.

Parameters:

intSeconds0-59.

setShowMillis

void setShowMillis(bShow : boolean)
Sets whether this time picker shows the millisecond input field.

Parameters:

bShow

setShowSeconds

void setShowSeconds(bShow : boolean)
Sets whether this time picker shows the second input field.

Parameters:

bShow