Main Page | Packages | Class Tree | Index | Help

xp.controls

class DateField

MovieClip
  |
  +--xp.system.UIControl
        |
        +--xp.controls.TextBase
              |
              +--xp.controls.Label
                    |
                    +--xp.controls.DateField


class DateField
extends Label

/** An nonselectable text field with a drop down arrow. When a user clicks inside the component’s bounding box, a DateChooser component is displayed.


Author:
ProWin Computers Ltd. - Rob Edgar

Version:
3.0.0.000

See also:


Field Summary

public static
classInfo: Object
A static class information object

public
disableAcceptButton: Boolean
Disables the global accept button whilst this control has focus

public
disableCancelButton: Boolean
Disables the global cancel button whilst this control has focus

public
initialMsg: String
//initial msg or unselected msg

public
initialSelectedState: Boolean
Controls whether the date is initialy selected or not

public
styleClass: String
The name of the style class this instance will use.

public
tabStop: Boolean
All input controls are TabStops by default

Fields inherited from class xp.controls.Label

classInfo, styleClass

Fields inherited from class xp.controls.TextBase

leading, leftMargin, rightMargin, textIndent

Fields inherited from class xp.system.UIControl

__layout, allowDrop, autoLayout, bindingDefaultValue, bindingFormatter, bindingPath, bindingSource, bindingType, bindingValidator, border, causesValidation, classInfo, clickOnENTER, clickOnSPACE, container, context, data, disableAcceptButton, disableCancelButton, enableBGMouseEvents, enableDblClickEvent, enableKeyDownEvents, enableKeyEvents, enableKeyUpEvents, enableMouseWheelEvents, formatterOptions, horizontalAlignment, index, isBinding, itemId, logEnabled, parent, parentContainer, parentForm, percentageHeight, percentageWidth, styleClass, tabIndex, tabStop, tooltip, tree, verticalAlignment

Property Summary

public
displayDateFormat: String (read, write)
format string for displaying dates in the item box

public
displayedDay: Number (read, write)
The day number of the currently selcted date

public
displayedMonth: Number (read, write)
The month number of the currently selcted date

public
displayedYear: Number (read, write)
The year number of the currently selcted date

public
firstDayOfWeek: Number (read, write)
The first day of a week. Can be eiether 0(Sunday) or 1(Monday)

public
isSelectionRequired: Boolean (read, write)
Is a selctoin required

public
selectedDate: Date (read, write)
The the currently selected date

public
selectedDateFormat: String (read, write)
Format string for the selected date

public
selectOnKeyScroll: Boolean (read, write)
Controls whether dates are selected as you scroll

public
showToday: Boolean (read, write)
Open the calender initially with todays date selected

Properties inherited from class xp.controls.Label

autoEllipsis, hAnchorPoint, html, icon, iconIndex, styleSheet, vAnchorPoint

Properties inherited from class xp.controls.TextBase

font, fontBold, fontColor, fontEmbed, fontFamily, fontItalic, fontName, fontSize, fontStyle, fontUnderline, fontWeight, text, textAlign, textDecoration, textWrap

Properties inherited from class xp.system.UIControl

alpha, autosize, background, backgroundVisible, bindings, borderBrush, borderRadius, borderShadow, borderStyle, borderThickness, bottom, dataSource, enableMouseEvents, focusManager, height, id, isEnabled, isFocused, isMouseOver, isPressed, isSelected, isValid, layout, left, margin, maxHeight, maxWidth, measuredHeight, measuredMinHeight, measuredMinWidth, measuredWidth, minHeight, minWidth, padding, readOnly, resources, right, styleName, top, triggers, visible, width, x, y

Constructor

public
DateField ( )
Constructor - This should not be called directly.


Method Summary

public
__onKeyDown ( code, repeat ): Void
Handler key down events

public
__onKeyUp ( code ): Void
Relay all key strokes to the calendar

public
close ( refocus: Boolean ): Void
Closes the calendar

public
drawComponent ( ): Void
Layout the control

public
getClass ( ): Function
Returns a reference to the components static class

public static
newInstance ( owner, instanceId, depth, initObj )
Creates a new Instance of this class

public
onEnabledChanged ( state: Boolean ): Void
Override to sync the button enabled state

public
open ( ): Void
Open the calendar

public
toggleList ( ): Void
Toggles the display of the calendar

Methods inherited from class xp.controls.Label

drawComponent, getClass, newInstance

Methods inherited from class xp.controls.TextBase

getTextEllipsis, getTextExtent

Methods inherited from class xp.system.UIControl

addBinding, addBindings, addEventListener, addPropertyTrigger, applyStyle, beginDeferUpdate, canUpdate, centerContent, checkState, containsFocus, destroy, destroyObject, drawFocus, endDeferUpdate, findFocusFromObject, findFocusInChildren, getBinding, getBounds, getCenter, getClass, getFocus, getFocusManager, getFocusRect, getLocation, getPropertyValue, getSize, getStateName, getTrigger, globalToLocalPoint, invalidate, invalidateLayout, invalidateSize, invalidateSizeAndLayout, invalidChild, isChild, isMouseDirectlyOver, isParent, localToGlobalPoint, localToLocalPoint, measure, mouseWheel, move, onChildFocus, onKillFocus, onSetFocus, processEnterKey, processEscapeKey, processTabKey, redraw, refresh, removeEventListener, routeEvent, setBounds, setFocus, setLocation, setPropertyValue, setSize, setValueChanged, update, validate



Field Documentation

classInfo

public static var classInfo: Object
A static class information object

Every class has an associated classInfo object that holds the version and other static information. The classInfo can be accessed either directly by referencing the static class or by calling getClass() on any class instance.

disableAcceptButton

public var disableAcceptButton: Boolean
Disables the global accept button whilst this control has focus

disableCancelButton

public var disableCancelButton: Boolean
Disables the global cancel button whilst this control has focus

initialMsg

public var initialMsg: String
//initial msg or unselected msg

initialSelectedState

public var initialSelectedState: Boolean
Controls whether the date is initialy selected or not

styleClass

public var styleClass: String
The name of the style class this instance will use.

tabStop

public var tabStop: Boolean
All input controls are TabStops by default


Property Documentation

displayDateFormat

public displayDateFormat: String (read, write)
format string for displaying dates in the item box

displayedDay

public displayedDay: Number (read, write)
The day number of the currently selcted date

displayedMonth

public displayedMonth: Number (read, write)
The month number of the currently selcted date

displayedYear

public displayedYear: Number (read, write)
The year number of the currently selcted date

firstDayOfWeek

public firstDayOfWeek: Number (read, write)
The first day of a week. Can be eiether 0(Sunday) or 1(Monday)

isSelectionRequired

public isSelectionRequired: Boolean (read, write)
Is a selctoin required

If this is true a date can only be unselected by selecting another date

selectedDate

public selectedDate: Date (read, write)
The the currently selected date

The currently selected date. Either a date object or formatted string if the selectedDateFormat has been set If there is no selection, the value is undefined.

selectedDateFormat

public selectedDateFormat: String (read, write)
Format string for the selected date

selectOnKeyScroll

public selectOnKeyScroll: Boolean (read, write)
Controls whether dates are selected as you scroll

If this is true then as u navigate with the keyboard the cell is automatically selected

showToday

public showToday: Boolean (read, write)
Open the calender initially with todays date selected


Constructor Documentation

DateField

public function DateField()
Constructor - This should not be called directly.

If you want to dynamically create a new instance of a control use its static newInstance method


Method Documentation

__onKeyDown

public function __onKeyDown(code,
 repeat): Void
Handler key down events

Overrides:

Parameters:
code
The key code of the key pressed
repeat
Boolean true if this is a repeat fioring of the key

__onKeyUp

public function __onKeyUp(code): Void
Relay all key strokes to the calendar

Overrides:

Parameters:
code
The key code for the key released

close

public function close(refocus: Boolean): Void
Closes the calendar

Forces the calendar to close and become invisible.

Parameters:
refocus
If true the DateField is refocused on close.

drawComponent

public function drawComponent(): Void
Layout the control

Overrides:

getClass

public function getClass(): Function
Returns a reference to the components static class

Overrides:

newInstance

public static function newInstance(owner,
 instanceId,
 depth,
 initObj)
Creates a new Instance of this class

Creates an instance of a component at runtime. You need to use the import statement and specify the class package name before calling this method. In addition, the component must be in the FLA file’s library.

Overrides:

Parameters:
owner
A reference to the movie clip or object that will contains the new Instance.
instanceId
A string indicating the instance name of the new instance.(optional)
depth
A number indicating the depth of the new instance.(optional)
initObj
An object containing initialization properties for the new instance.(optional)
Returns:
A object that is an instance of the specified class.

onEnabledChanged

public function onEnabledChanged(state: Boolean): Void
Override to sync the button enabled state

Component developers should override this if they want to process a change to the enabled state instead of overriding the getter/setter

Overrides:

Parameters:
state
The new enabled state.

open

public function open(): Void
Open the calendar

Forces the calendar to open and become visible.
The position of the calendar will be automaticialy adjusted to take account of the stage size.

toggleList

public function toggleList(): Void
Toggles the display of the calendar

If open when this method is called the calendarn will close, if closed when this method is called then the calendar will open.


The documentation was generated from the following file:


Generated on 10/30/2005 9:34:02 PM by AS2Doc