public abstract class Element
extends java.lang.Object
implements java.io.Serializable
Constructor and Description |
---|
Element() |
Modifier and Type | Method and Description |
---|---|
Element |
add(Element object)
Adds element to end of list of element lying on this element.
|
Element |
addAllDropTargets(java.util.Collection<Element> drops)
Add collection of drop target elements.
|
Element |
addDropTarget(Element dropTarget)
Add drop target element.
|
Element |
addStyleClass(java.lang.String tagClass)
Add style class to list.
|
Element |
alert(java.lang.String text)
Calls JavaScript alert()
|
Element |
assignText(java.lang.String text)
Set text body value without changing object state and without sending
JavaScript to browser.
|
Element |
callBack(int duration,
java.util.concurrent.TimeUnit unit)
Calls timer JavaScript to call back to the server.
|
Element |
callScript(java.lang.String script)
Send script to browser or add to buffer if WebCocket is not available.
|
Element |
clearDropTargets()
Remove all drop target element.
|
Element |
clearElements()
Removes all children elements of this element.
|
<T extends Element> |
clearElements(java.lang.Class<T> c)
Removes all children elements of this element.
|
Element |
confirm(java.lang.String text)
Calls JavaScript confirm().
|
<T extends Element> |
findElement(java.lang.String objectId)
Finds element in application tree.
|
java.util.Set<java.lang.annotation.Annotation> |
findEventOptions(java.lang.Class<? extends java.lang.annotation.Annotation> eventType)
Retrieves event options taking into account class hierarchy and dynamic
options defined at runtime.
|
<T extends Element> |
findParent(java.lang.Class<T> c)
Looking for first occurrence parent element in tree with given class
type.
|
<T extends Element> |
findViewElements(java.lang.Class<T> c)
Returns unmodifiable children list of element selected by any class type
of objects lying on element and elements in tree view where parent is
this element.
|
Element |
fireEvent(java.lang.Class<? extends java.lang.annotation.Annotation> eventType)
Fires event if object is listening on and the event is not browser event.
|
Element |
fireEvent(java.lang.Class<? extends java.lang.annotation.Annotation> eventType,
Event we)
Fires event if object is listening on and the event is not browser event.
|
Element |
fireEventOnView(java.lang.Class<? extends java.lang.annotation.Annotation> eventType)
Fires event on all objects in the view if objects are listening on and
the event is not browser event.
|
Element |
fireEventOnView(java.lang.Class<? extends java.lang.annotation.Annotation> eventType,
Event we)
Fires event on all objects in view if objects are listening on and the
event is not browser event.
|
Element |
firePropertyChange(java.lang.String propertyName,
java.lang.Object oldValue,
java.lang.Object newValue)
Shortcut to PropertyChangeSupport method.
|
Element |
focus()
The focus() method is used to give focus to a input or element with
tabIndex >= 0.
|
<T extends FireWebApplication> |
getApplication()
Obtain the application object from objects tree.
|
java.lang.String |
getContenteditableValue() |
Direction.Type |
getDir()
Get text direction property
|
java.util.Set<Element> |
getDropTargets()
Unmodifiable set of drop targets for this element of Drag&Drop.
|
java.util.List<Element> |
getElements()
Returns unmodifiable children list of this element
|
<T extends Element> |
getElements(java.lang.Class<T> c)
Returns unmodifiable children list of this element selected by Element
subclass type and lying on this element.
|
java.util.List<java.lang.reflect.Method> |
getEventListeners(java.lang.Class<? extends java.lang.annotation.Annotation> eventType)
Retrieve event's listeners.
|
java.lang.String |
getId()
Creates server object id (HEX), based on
Object.hashCode() . |
java.lang.String |
getLang()
Get lang property
|
<T extends Element> |
getParent()
Return parent element.
|
java.lang.String |
getStyle()
Returns text representation of inline styles of the element.
|
<T extends StyleElement> |
getStyle(java.lang.Class<T> styleType)
Finds inline style of this element.
|
java.lang.String |
getStyleClass()
Get list of style classes
|
java.util.Collection<StyleElement> |
getStyles()
Returns collection of inline styles of the element.
|
java.lang.Integer |
getTabIndex()
Specifies the tab order of an element.
|
java.lang.String |
getText()
Get text of the element
|
java.lang.String |
getTitle()
Get title property of the element
|
java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> |
getTypeEvents()
Returns set of all event listeners of this class
|
Element |
insert(int index,
Element object)
Insert's child element at given index.
|
boolean |
isChildrenSetChanged()
Test if children set changed
|
boolean |
isContenteditable() |
boolean |
isDraggable()
Test if is on the class any listener of
OnDrag event. |
boolean |
isDrawn() |
boolean |
isListening(java.lang.Class<? extends java.lang.annotation.Annotation> eventType)
Test if object listening on event type.
|
Element |
listenerOff(java.lang.Class<? extends java.lang.annotation.Annotation> eventType)
Mark event listener as disabled and draws JavaScript to browser.
|
Element |
listenerOn(java.lang.Class<? extends java.lang.annotation.Annotation> eventType)
Remove tag event listener as disabled and draws JavaScript to browser.
|
Element |
print()
Calls JavaScript print()
|
Element |
prompt(java.lang.String title,
java.lang.String value)
Calls JavaScript prompt().
|
Element |
remove(Element object)
Removes element form elements lying on this element.
|
Element |
remove(int index)
Removes element at index form elements lying on this element.
|
Element |
removeDropTarget(Element dropTarget)
Remove drop target element.
|
Element |
removeEventOptions(java.lang.Class<? extends java.lang.annotation.Annotation> eventType,
java.lang.Class<? extends java.lang.annotation.Annotation>... eventOptionType)
Removes event options.
|
Element |
removeParent()
Detach the object from parent.
|
Element |
removeStyle(java.lang.Class<? extends StyleElement> styleType)
Removes inline style of the element.
|
Element |
removeStyleClass(java.lang.String tagClass)
Removes style class from the list
|
Element |
removeStyles()
Clears inline styles of the element
|
Element |
replace(int index,
Element object)
Replace child element at given index.
|
Element |
replaceStyleClass(java.lang.String fromClass,
java.lang.String toClass)
Replace style class from regex pattern to new one.
|
Element |
setChangeChildrenSet(boolean changed)
Set up if element state changed
|
Element |
setContenteditable(boolean contenteditable) |
Element |
setDir(Direction.Type dir)
Set text direction property
|
Element |
setDrawn(boolean drawn)
Set if element drown.
|
Element |
setEventOptions(java.lang.Class<? extends java.lang.annotation.Annotation> eventType,
java.lang.annotation.Annotation... newValues)
Override event options.
|
Element |
setLang(java.lang.String lang)
Set lang property.
|
Element |
setParent(Element parent)
Set parent element of this object.
|
Element |
setStyle(StyleElement styleElement)
Add inline style to the element.
|
Element |
setStyleClass(java.lang.String tagClass)
Set new style class.
|
Element |
setStyles(java.util.Set<StyleElement> styles)
Replaces inline styles of the element.
|
Element |
setTabIndex(java.lang.Integer tabIndex)
Set "tabindex" property and if element drew call script at browser.
|
Element |
setText(java.lang.String text)
Set text body value and changing object state.
|
Element |
setTitle(java.lang.String tagTitle)
Set title property of the element
|
public final java.lang.String getId()
Object.hashCode()
.public final <T extends FireWebApplication> T getApplication()
T
- type of applicationpublic final <T extends Element> T getParent()
T
- type of elementpublic final <T extends Element> T findParent(java.lang.Class<T> c)
T
- type of elementc
- Class of searched element typepublic final Element setParent(Element parent)
parent
- The parent containerpublic final Element removeParent()
public final java.util.List<Element> getElements()
public final <T extends Element> java.util.List<T> getElements(java.lang.Class<T> c)
T
- Class typec
- Element class type to searchpublic final Element setChangeChildrenSet(boolean changed)
changed
- the object to set the statepublic final boolean isChildrenSetChanged()
public final Element setDrawn(boolean drawn)
drawn
- the drawn to setpublic final <T extends Element> java.util.List<T> findViewElements(java.lang.Class<T> c)
T
- Class typec
- Any class or interface.public final Element callScript(java.lang.String script)
script
- Java Script to callpublic final <T extends Element> T findElement(java.lang.String objectId)
Utils.findElement(Element, String)
T
- Class typeobjectId
- Object id to findpublic final Element clearElements()
public final <T extends Element> Element clearElements(java.lang.Class<T> c)
T
- Class typec
- Element type class to removepublic final Element add(Element object)
object
- the element to addpublic final Element remove(Element object)
object
- the element to removepublic final Element remove(int index)
index
- of the element to remove.public final Element insert(int index, Element object)
index
- Where to place the element at this containerobject
- The web object to insert.public final Element replace(int index, Element object)
index
- Where to place the element at this containerobject
- The web object to set.public final Element fireEvent(java.lang.Class<? extends java.lang.annotation.Annotation> eventType, Event we)
eventType
- Event annotation to fire.we
- Web object if is accessible or null.public final Element fireEvent(java.lang.Class<? extends java.lang.annotation.Annotation> eventType)
fireEvent(Class, Event)
with event object as null.eventType
- Event annotation to fire.public final Element fireEventOnView(java.lang.Class<? extends java.lang.annotation.Annotation> eventType, Event we)
eventType
- Event class to fire.we
- Web object if is accessible or null.public final Element fireEventOnView(java.lang.Class<? extends java.lang.annotation.Annotation> eventType)
fireEvent(Class, Event)
with event object as null.eventType
- Event class to fire.public final java.util.Set<java.lang.Class<? extends java.lang.annotation.Annotation>> getTypeEvents()
public final java.util.List<java.lang.reflect.Method> getEventListeners(java.lang.Class<? extends java.lang.annotation.Annotation> eventType)
eventType
- Event listener annotation.public final boolean isListening(java.lang.Class<? extends java.lang.annotation.Annotation> eventType)
eventType
- Class event listener to testpublic final Element setEventOptions(java.lang.Class<? extends java.lang.annotation.Annotation> eventType, java.lang.annotation.Annotation... newValues)
EventListener
then
throws FireWebException
.eventType
- event typenewValues
- new values of event optionpublic final Element removeEventOptions(java.lang.Class<? extends java.lang.annotation.Annotation> eventType, java.lang.Class<? extends java.lang.annotation.Annotation>... eventOptionType)
EventListener
then
throws FireWebException
.eventType
- event typeeventOptionType
- List of event's option to removepublic final java.util.Set<java.lang.annotation.Annotation> findEventOptions(java.lang.Class<? extends java.lang.annotation.Annotation> eventType)
eventType
- event type classpublic final Element listenerOn(java.lang.Class<? extends java.lang.annotation.Annotation> eventType)
CustomizedListener
s then the
CustomizedListener.enableEvent(Element, Class)
is called of it.
If there are not listeners of event then the FireWebException
exception will be thrown.eventType
- Event type to of listening.public final Element listenerOff(java.lang.Class<? extends java.lang.annotation.Annotation> eventType)
CustomizedListener
s then the
CustomizedListener.enableEvent(Element, Class)
is called of it.
If there are not listeners or the listener is not a browser event then
the FireWebException
exception will be thrown.eventType
- Event type to of listening.public final boolean isDraggable()
OnDrag
event.public final java.util.Set<Element> getDropTargets()
public final Element addDropTarget(Element dropTarget)
dropTarget
- Other element which will receive onDrop event comes from this
element.public final Element removeDropTarget(Element dropTarget)
dropTarget
- Other element which will receive onDrop event comes from this
element.public final Element clearDropTargets()
public final Element addAllDropTargets(java.util.Collection<Element> drops)
drops
- Other element which will receive onDrop event comes from this
element.public final Element alert(java.lang.String text)
text
- the text to displaypublic final Element print()
public final Element confirm(java.lang.String text)
text
- the text to displaypublic final Element prompt(java.lang.String title, java.lang.String value)
title
- title to displayvalue
- default valuepublic final Element callBack(int duration, java.util.concurrent.TimeUnit unit)
duration
- of timeoutunit
- of time durationpublic final java.lang.String getStyleClass()
public final Element setStyleClass(java.lang.String tagClass)
tagClass
- the tagClass to setpublic final Element addStyleClass(java.lang.String tagClass)
tagClass
- CSS class namepublic final Element removeStyleClass(java.lang.String tagClass)
tagClass
- CSS class namepublic final Element replaceStyleClass(java.lang.String fromClass, java.lang.String toClass)
fromClass
- regex expression of CSS class name to replacetoClass
- new CSS class namepublic final java.lang.String getStyle()
public final <T extends StyleElement> T getStyle(java.lang.Class<T> styleType)
T
- type of return stylestyleType
- Type of inline stylepublic final Element setStyle(StyleElement styleElement)
styleElement
- Inline style element to setpublic final Element removeStyle(java.lang.Class<? extends StyleElement> styleType)
styleType
- Type of inline stylepublic final java.util.Collection<StyleElement> getStyles()
public final Element removeStyles()
public final Element setStyles(java.util.Set<StyleElement> styles)
styles
- set of stylespublic final java.lang.String getTitle()
public final Element setTitle(java.lang.String tagTitle)
tagTitle
- the title to setpublic final java.lang.String getText()
public final Element setText(java.lang.String text)
text
- the text to setpublic final Element assignText(java.lang.String text)
text
- the text to setpublic final Direction.Type getDir()
public final Element setDir(Direction.Type dir)
dir
- the dir property to setpublic final java.lang.String getLang()
public final Element setLang(java.lang.String lang)
lang
- the lang to set.public final java.lang.Integer getTabIndex()
public final Element setTabIndex(java.lang.Integer tabIndex)
tabIndex
- the tabIndex to set. If is null or less then 0 calls set empty
value to element at browser. If not null calls assign value to
element at browser.public final Element focus()
public final boolean isDrawn()
public final boolean isContenteditable()
public final java.lang.String getContenteditableValue()
public final Element setContenteditable(boolean contenteditable)
contenteditable
- the contenteditable to setpublic final Element firePropertyChange(java.lang.String propertyName, java.lang.Object oldValue, java.lang.Object newValue)
propertyName
- of the elementoldValue
- of the propertynewValue
- of the property