|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.google.gwt.user.client.ui.UIObject
com.google.gwt.user.client.ui.Widget
com.google.gwt.user.client.ui.Panel
com.google.gwt.user.client.ui.ComplexPanel
com.google.gwt.user.client.ui.FlowPanel
com.vaadin.terminal.gwt.client.ui.VDateField
com.vaadin.terminal.gwt.client.ui.VTextualDate
com.vaadin.terminal.gwt.client.ui.VPopupCalendar
public class VPopupCalendar
Represents a date selection component with a text field and a popup date
selector.
Note: To change the keyboard assignments used in the popup dialog you
should extend com.vaadin.terminal.gwt.client.ui.VCalendarPanel
and then pass set it by calling the
setCalendarPanel(VCalendarPanel panel)
method.
Nested Class Summary |
---|
Nested classes/interfaces inherited from class com.google.gwt.user.client.ui.UIObject |
---|
com.google.gwt.user.client.ui.UIObject.DebugIdImpl, com.google.gwt.user.client.ui.UIObject.DebugIdImplEnabled |
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.InsertPanel |
---|
com.google.gwt.user.client.ui.InsertPanel.ForIsWidget |
Nested classes/interfaces inherited from interface com.google.gwt.user.client.ui.HasWidgets |
---|
com.google.gwt.user.client.ui.HasWidgets.ForIsWidget |
Field Summary |
---|
Fields inherited from class com.vaadin.terminal.gwt.client.ui.VTextualDate |
---|
fieldExtraWidth |
Fields inherited from class com.vaadin.terminal.gwt.client.ui.VDateField |
---|
CLASSNAME, currentLocale, currentResolution, dts, enabled, immediate, readonly, RESOLUTION_DAY, RESOLUTION_HOUR, RESOLUTION_MIN, RESOLUTION_MONTH, RESOLUTION_MSEC, RESOLUTION_SEC, RESOLUTION_YEAR, WEEK_NUMBERS |
Fields inherited from class com.google.gwt.user.client.ui.UIObject |
---|
DEBUG_ID_PREFIX |
Constructor Summary | |
---|---|
VPopupCalendar()
|
Method Summary | |
---|---|
protected void |
buildDate()
Updates the text field according to the current date (provided by VDateField.getDate() ). |
protected void |
buildDate(boolean forceValid)
Update the text field contents from the date. |
void |
closeCalendarPanel()
Closes the open popup panel |
protected int |
getFieldExtraWidth()
Returns pixels in x-axis reserved for other than textfield content. |
protected int |
getOpenCalenderPanelKey()
Get the key code that opens the calendar panel. |
com.google.gwt.user.client.Element |
getSubPartElement(String subPart)
Locates an element inside a component using the identifier provided in subPart . |
String |
getSubPartName(com.google.gwt.user.client.Element subElement)
Provides an identifier that identifies the element within the component. |
void |
onBrowserEvent(com.google.gwt.user.client.Event event)
|
void |
onClick(com.google.gwt.event.dom.client.ClickEvent event)
|
void |
onClose(com.google.gwt.event.logical.shared.CloseEvent<com.google.gwt.user.client.ui.PopupPanel> event)
|
void |
openCalendarPanel()
Opens the calendar panel popup |
void |
setFocus(boolean focus)
Sets focus to Calendar panel. |
void |
setStyleName(String style)
|
void |
updateFromUIDL(UIDL uidl,
ApplicationConnection client)
|
Methods inherited from class com.vaadin.terminal.gwt.client.ui.VTextualDate |
---|
focus, getFormatString, getText, iLayout, iLayout, isUndefinedWidth, onChange, setPrompting, setText, setWidth, updateWidth |
Methods inherited from class com.vaadin.terminal.gwt.client.ui.VDateField |
---|
getClient, getCurrentDate, getCurrentLocale, getCurrentResolution, getDate, getDateTimeService, getId, getMilliseconds, isEnabled, isImmediate, isReadonly, isShowISOWeekNumbers, setCurrentDate, setCurrentLocale, setCurrentResolution, setDate, setMilliseconds |
Methods inherited from class com.google.gwt.user.client.ui.FlowPanel |
---|
add, clear, insert, insert |
Methods inherited from class com.google.gwt.user.client.ui.ComplexPanel |
---|
add, adjustIndex, checkIndexBoundsForAccess, checkIndexBoundsForInsertion, getChildren, getWidget, getWidgetCount, getWidgetIndex, getWidgetIndex, insert, insert, iterator, remove, remove |
Methods inherited from class com.google.gwt.user.client.ui.Panel |
---|
add, adopt, adopt, disown, doAttachChildren, doDetachChildren, orphan, remove |
Methods inherited from class com.google.gwt.user.client.ui.Widget |
---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onDetach, onLoad, onUnload, removeFromParent, setLayoutData, sinkEvents |
Methods inherited from class com.google.gwt.user.client.ui.UIObject |
---|
addStyleDependentName, addStyleName, ensureDebugId, ensureDebugId, ensureDebugId, getAbsoluteLeft, getAbsoluteTop, getElement, getOffsetHeight, getOffsetWidth, getStyleElement, getStyleName, getStyleName, getStylePrimaryName, getStylePrimaryName, getTitle, isVisible, isVisible, onEnsureDebugId, removeStyleDependentName, removeStyleName, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, sinkBitlessEvent, toString, unsinkEvents |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.google.gwt.user.client.ui.InsertPanel.ForIsWidget |
---|
add |
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel |
---|
getWidget, getWidgetCount, getWidgetIndex, remove |
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel.ForIsWidget |
---|
getWidgetIndex |
Methods inherited from interface com.google.gwt.user.client.ui.IndexedPanel |
---|
getWidget, getWidgetCount, getWidgetIndex, remove |
Constructor Detail |
---|
public VPopupCalendar()
Method Detail |
---|
public void updateFromUIDL(UIDL uidl, ApplicationConnection client)
updateFromUIDL
in interface Paintable
updateFromUIDL
in class VTextualDate
public void setStyleName(String style)
setStyleName
in class com.google.gwt.user.client.ui.UIObject
public void openCalendarPanel()
public void onClick(com.google.gwt.event.dom.client.ClickEvent event)
onClick
in interface com.google.gwt.event.dom.client.ClickHandler
public void onClose(com.google.gwt.event.logical.shared.CloseEvent<com.google.gwt.user.client.ui.PopupPanel> event)
onClose
in interface com.google.gwt.event.logical.shared.CloseHandler<com.google.gwt.user.client.ui.PopupPanel>
public void setFocus(boolean focus)
focus
- protected int getFieldExtraWidth()
VTextualDate
getFieldExtraWidth
in class VTextualDate
protected void buildDate()
VTextualDate
VDateField.getDate()
). Takes care of updating text, enabling and disabling
the field, setting/removing readonly status and updating readonly styles.
TODO: Split part of this into a method that only updates the text as this
is what usually is needed except for updateFromUIDL.
buildDate
in class VTextualDate
protected void buildDate(boolean forceValid)
buildDate()
.
forceValid
- true to force the text field to be updated, false to only
update if the parsable flag is true.public void onBrowserEvent(com.google.gwt.user.client.Event event)
onBrowserEvent
in interface com.google.gwt.user.client.EventListener
onBrowserEvent
in class VDateField
protected int getOpenCalenderPanelKey()
public void closeCalendarPanel()
public com.google.gwt.user.client.Element getSubPartElement(String subPart)
SubPartAware
subPart
. The subPart
identifier is component specific and
may be any string of characters, numbers, space characters and brackets.
getSubPartElement
in interface SubPartAware
getSubPartElement
in class VTextualDate
subPart
- The identifier for the element inside the component
public String getSubPartName(com.google.gwt.user.client.Element subElement)
SubPartAware
subElement
is a part of the component and must never be null.
Note!
getSubPartElement(getSubPartName(element)) == element
is not
always true. A component can choose to provide a more generic
identifier for any given element if the results of all interactions with
subElement
are the same as interactions with the element
identified by the return value. For example a button can return an
identifier for the root element even though a DIV inside the button was
passed as subElement
because interactions with the DIV and the
root button element produce the same result.
getSubPartName
in interface SubPartAware
getSubPartName
in class VTextualDate
subElement
- The element the identifier string should uniquely identify
subElement
or null
if no identifier could be provided.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |