ADAPTER
- is the generic type of AbstractUiWidgetNative.getWidgetAdapter()
.public abstract class AbstractUiWidgetAbstractWindow<ADAPTER extends UiWidgetAdapterAbstractWindow> extends AbstractUiWidgetDynamicComposite<ADAPTER,UiWidgetRegular> implements UiWidgetAbstractWindow
UiWidgetAbstractWindow
.Modifier and Type | Class and Description |
---|---|
private class |
AbstractUiWidgetAbstractWindow.SizeWindowImpl
Extends
AbstractUiWidgetNative.SizeImpl with window specific
size logic. |
AbstractUiWidgetNative.SizeImpl
AbstractUiWidget.AccessHelper, AbstractUiWidget.EventSender, AbstractUiWidget.HandlerContainer
Modifier and Type | Field and Description |
---|---|
private String |
title |
private double |
x |
private double |
y |
STYLE_HEADER
HTML_ATTRIBUTE_ID, ID_SEPARATOR, PROPERTY_ID
PROPERTY_STYLES, STYLE_PATTERN_MULTIPLE, STYLE_PATTERN_SINGLE
WAI_ARIA
PROPERTY_TITLE
Constructor and Description |
---|
AbstractUiWidgetAbstractWindow(UiContext context,
ADAPTER widgetAdapter)
The constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
centerWindow()
This method sets the position of the window, so that it is in the center of the screen.
|
private Length |
convertEmToPixel(Length length)
|
protected AbstractUiWidgetNative.SizeImpl |
createSize() |
double |
getPositionX()
This method gets the pixel position of the left border object on the x-axis (horizontal).
|
double |
getPositionY()
This method gets the pixel position of the top border of this object on the y-axis (vertical).
|
private AttributeReadSizeInPixel |
getScreenBase() |
String |
getSource() |
String |
getTitle()
This method gets the title of this object.
|
protected void |
initializeWidgetAdapter(ADAPTER adapter)
This method is called from
AbstractUiWidgetNative.getWidgetAdapter() to initialize the UiWidgetAdapter . |
void |
setPosition(double xPos,
double yPos)
This method sets the position of the object.
|
void |
setTitle(String title)
This method sets the title of this object.
|
void |
setVisible(boolean visible,
boolean programmatic)
This method shows or hides this object.
|
addChild, addChild, doAddChild, getChild, getChildCount, getChildIndex, removeChild, removeChild
getChild
addChangeHandler, addStyle, clearMessages, clearValidity, createUniqueId, createWidgetAdapter, dispose, doGetValue, doSetMode, doSetValue, doValidate, getAriaRole, getAriaRoleFixedType, getId, getIndexOfStyle, getMode, getModeFixed, getParent, getPrimaryStyle, getSize, getStyles, getTooltip, getVisibleFlag, getWidgetAdapter, getWidgetAdapter, hasStyle, hasWidgetAdapter, isDisposed, isEnabled, isModifiedRecursive, isVisible, isVisibleRecursive, removeChangeHandler, removeFromParent, removeStyle, setAriaRole, setEnabled, setFocused, setId, setIdPrefix, setMode, setMode, setModeFixed, setParent, setPrimaryStyle, setStyles, setTooltip, setVisible, toString, visibilityChanged
addEventHandler, addValidator, clearMessagesLocal, clearValidationFailure, convertValueToString, fireEvent, fireValueChange, getBasicUtil, getContext, getDataBinding, getDataBinding, getDataBindingForWidget, getEventSender, getFactory, getLogger, getObserverSource, getOriginalValue, getRecentValue, getValueClass, getValueDirect, getValueOrException, getWidgetAdapter, hasEventSender, isMandatory, isModified, removeEventHandler, removeFromParent, removeValidator, setMandatory, setModified, setParent, setValue
addValidatorMandatory, createValidationFailure, getValue, getValueAndValidate, handleGetValueError, resetValue, setValue, setValueForUser, validate
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
addChild, addChild
removeChild, removeChild
getChild, getChild
getChildCount, getChildIndex
getContext, getParent, getSize
clearMessages
addEventHandler, removeEventHandler
setMode
getMode
setModeFixed
getModeFixed
setId
getId
setTooltip
getTooltip
getVisibleFlag, isVisible, setVisible
isVisibleRecursive
setEnabled
isEnabled
addStyle, removeStyle
hasStyle
setStyles
getStyles
setPrimaryStyle
getPrimaryStyle
dispose
isDisposed
isModified
getAriaRole
validate
isResizable
resetValue, setValue, setValueForUser
getValue
private String title
getTitle()
private double x
getPositionX()
private double y
getPositionY()
public AbstractUiWidgetAbstractWindow(UiContext context, ADAPTER widgetAdapter)
context
- is the context
.widgetAdapter
- is the widget adapter
. Typically null
for
lazy initialization.protected void initializeWidgetAdapter(ADAPTER adapter)
AbstractUiWidgetNative.getWidgetAdapter()
to initialize the UiWidgetAdapter
. All
attributes of this widget need to be set in the UiWidgetAdapter
.initializeWidgetAdapter
in class AbstractUiWidgetDynamicComposite<ADAPTER extends UiWidgetAdapterAbstractWindow,UiWidgetRegular>
adapter
- is the UiWidgetAdapter
to initialize.public void setTitle(String title)
setTitle
in interface AttributeWriteStringTitle
setTitle
in interface AttributeWriteTitle<String>
title
- is the new title.AttributeReadStringTitle.getTitle()
public void setPosition(double xPos, double yPos)
setPosition
in interface AttributeWritePosition
xPos
- is the position on the x-axsis
(horizontal).yPos
- is the position on the y-axsis
(vertical).public double getPositionX()
getPositionX
in interface AttributeReadPosition
AttributeReadPosition.getPositionY()
public double getPositionY()
getPositionY
in interface AttributeReadPosition
AttributeReadPosition.getPositionX()
public String getTitle()
getTitle
in interface AttributeReadStringTitle
getTitle
in interface AttributeReadTitle<String>
public void centerWindow()
set
the size
before invoking this method.centerWindow
in interface UiWidgetAbstractWindow
protected AbstractUiWidgetNative.SizeImpl createSize()
createSize
in class AbstractUiWidgetNative<ADAPTER extends UiWidgetAdapterAbstractWindow,Void>
Size
instance lazily created by AbstractUiWidgetNative.getSize()
.private AttributeReadSizeInPixel getScreenBase()
AttributeReadSizeInPixel
used to determine the base of the screen to
center or convert Length
.public void setVisible(boolean visible, boolean programmatic)
setVisible
in interface AttributeWriteVisibleAdvanced
setVisible
in class AbstractUiWidgetNative<ADAPTER extends UiWidgetAdapterAbstractWindow,Void>
visible
- - see AbstractUiWidgetNative.setVisible(boolean)
.programmatic
- - see UiEvent.isProgrammatic()
.AbstractUiWidgetNative.setVisible(boolean)
public String getSource()
getSource
in class AbstractUiWidget<Void>
String
representation of this object that qualifies as source description that might be
displayed to end-users (unlike AbstractUiWidget.toString()
what is for debugging only).Copyright © 2001–2016 mmm-Team. All rights reserved.