OverviewSingleDeprecatedPropertiesEventsXSL Parameters

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
int
Returns STATEVALID if this time picker is not required or if it is required and its value is not null, otherwise returns STATEINVALID.
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.
String
Returns the value of this time picker as a formatted string matching the appearance of the control.
int
Returns whether this time picker displays with a 24-hour clock.
String
jsx3.gui.TimePicker
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.TimePicker
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.
jsx3.gui.TimePicker
Sets whether this time picker shows the millisecond input field.
jsx3.gui.TimePicker
Sets whether this time picker shows the second input field.
jsx3.gui.TimePicker
setValue(vntValue : String | Date | int)
Sets the value of this time picker in local time.
Methods Inherited From jsx3.gui.Form
doKeyBinding, doReset, getDisabledBackgroundColor, getDisabledColor, getEnabled, getKeyBinding, getRequired, getValidationState, setDisabledBackgroundColor, setDisabledColor, setEnabled, setKeyBinding, setRequired, setValidationState
Methods Inherited From jsx3.gui.Block
getBackground, getBackgroundColor, getBorder, getCDFAttribute, getCDFId, 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, setCDFAttribute, setCDFId, 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, getRendered, insertHTML, onAfterPaint, onAfterRestoreView, paintChild, paintChildren, recalcBox, removeAttribute, removeAttributes, repaint, setAttribute
Methods Inherited From jsx3.app.Model
adoptChild, assembleFromXML, doClone, findAncestor, findDescendants, getAncestorOfName, getAncestorOfType, getChild, getChildIndex, getChildren, getDescendantOfName, getDescendantsOfType, getDynamicProperty, getFirstChild, getFirstChildOfType, getHelpId, getId, getLastChild, getLoadType, getMetaValue, getNS, getName, getNextSibling, getParent, getPersistence, getPreviousSibling, getServer, getUriResolver, insertBefore, load, loadAndCache, loadXML, onAfterAssemble, onAfterAttach, onBeforeAssemble, onChangeServer, onChildAdded, onDestroy, onRemoveChild, onSetChild, onSetParent, removeChild, removeChildren, selectDescendants, setChild, setDynamicProperty, setHelpId, setLoadType, setMetaValue, setName, setPersistence, toString, toXML, toXMLDoc, toXMLElm
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

doValidate

int doValidate()
Returns STATEVALID if this time picker is not required or if it is required and its value is not null, otherwise returns STATEINVALID.

Returns:

 

Overrides:

doValidate in jsx3.gui.Form

See Also:

jsx3.gui.Form.STATEVALID, jsx3.gui.Form.STATEINVALID

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.  

getValue

String getValue()
Returns the value of this time picker as a formatted string matching the appearance of the control.

Returns:

 

Overrides:

getValue in jsx3.gui.Form

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

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

Parameters:

b24Hourmay be null to use the locale default value.

Returns:

this object  

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.TimePicker 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

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

Parameters:

bShow

Returns:

this object  

setShowSeconds

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

Parameters:

bShow

Returns:

this object  

setValue

jsx3.gui.TimePicker setValue(vntValue : String | Date | int)
Sets the value of this time picker in local time. This method updates the view immediately.

Parameters:

vntValuethe date whose time of day information to use for setting the value of this time picker. This parameter may be a number, in which case it is taken as epoch seconds. It may also be a string, in which case it is parsed as the time portion of a date with the built-in JavaScript data parsing.

Returns:

this object  

Overrides:

setValue in jsx3.gui.Form