|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||
java.lang.Objectcom.google.gwt.aria.client.Attribute<T>
T - The attribute value typepublic abstract class Attribute<T>
Class representing ARIA state/property attribute. Contains methods for setting, getting,
removing ARIA attributes for an HTML Element.
For more details about ARIA states and properties check the W3C ARIA documentation Supported States and Properties .
| Field Summary | |
|---|---|
protected java.lang.String |
defaultValue
|
protected java.lang.String |
name
|
| Constructor Summary | |
|---|---|
Attribute(java.lang.String name)
Constructs a state/property ARIA attribute with name name and null default value. |
|
Attribute(java.lang.String name,
java.lang.String defaultValue)
Constructs a state/property ARIA attribute with name name and defaultValue. |
|
| Method Summary | |
|---|---|
java.lang.String |
get(Element element)
Gets the HTML attribute value for the attribute with name name for element
element |
java.lang.String |
getName()
Gets the property/state name |
protected abstract java.lang.String |
getSingleValue(T value)
Gets the string representation of value to be set as an attribute value
to an HTML element. |
void |
remove(Element element)
Removes the state/property attribute for element element. |
void |
set(Element element,
T... values)
Sets the state/property value for the HTML element element. |
void |
setDefault(Element element)
Sets the state/property value to the defaultValue if not null. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected final java.lang.String name
protected java.lang.String defaultValue
| Constructor Detail |
|---|
public Attribute(java.lang.String name,
java.lang.String defaultValue)
name and defaultValue.
name - State/Property namedefaultValue - Default valuespublic Attribute(java.lang.String name)
name and null default value.
name - State/Property name| Method Detail |
|---|
public java.lang.String get(Element element)
name for element
element
element - HTML element
elementpublic java.lang.String getName()
public void remove(Element element)
element.
element - HTM element
public void set(Element element,
T... values)
value for the HTML element element.
element - HTML elementvalues - Attribute valuepublic void setDefault(Element element)
element - HTML elementprotected abstract java.lang.String getSingleValue(T value)
value to be set as an attribute value
to an HTML element.
value - The item to be stringified
value
|
GWT 2.7.0 | |||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||