|
||||||||||
| 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
org.vectomatic.dom.svg.ui.SVGWidget
org.vectomatic.dom.svg.ui.SVGButtonBase
public abstract class SVGButtonBase
Abstract base class for SVG buttons.
SVG buttons consists in an SVG element and a collection of six predefined faces
Each face consists in a list of changes which are applied to the main SVG element (currently, CSS style changes but other changes are possible). You do not need to specify all faces for a button. In case a face is missing, the widget will attempt to use another face for the button.
| Nested Class Summary | |
|---|---|
static class |
SVGButtonBase.SVGFace
Class to represent an SVG button face. |
static class |
SVGButtonBase.SVGFaceChange
Base class to represent the changes occurring to an SVG button when it enters a new state. |
static class |
SVGButtonBase.SVGFaceName
Enum to represent the possible states of an SVG button |
static class |
SVGButtonBase.SVGStyleChange
Class to represent a style change as an SVG button enters a new state. |
| 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 |
| Field Summary | |
|---|---|
protected SVGButtonBase.SVGFaceName |
currentFaceName
The name of the face currently displayed by this button |
protected Map<SVGButtonBase.SVGFaceName,SVGButtonBase.SVGFace> |
faces
A map associating button face names to button faces |
protected OMSVGSVGElement |
svgElement
The OMSVGSVGElement representing
this button |
| Fields inherited from class com.google.gwt.user.client.ui.UIObject |
|---|
DEBUG_ID_PREFIX |
| Constructor Summary | |
|---|---|
protected |
SVGButtonBase()
No-arg constructor. |
protected |
SVGButtonBase(OMSVGSVGElement svgElement,
Map<SVGButtonBase.SVGFaceName,SVGButtonBase.SVGFace> faces)
Constructor |
protected |
SVGButtonBase(SVGResource resource,
Map<SVGButtonBase.SVGFaceName,SVGButtonBase.SVGFace> faces)
Constructor |
| Method Summary | |
|---|---|
void |
addClassNameBaseVal(String className)
Adds the specified class name to the baseVal CSS class name of this element |
com.google.gwt.event.shared.HandlerRegistration |
addClickHandler(com.google.gwt.event.dom.client.ClickHandler handler)
|
SVGButtonBase.SVGFace |
addFace(SVGButtonBase.SVGFaceName faceName,
SVGButtonBase.SVGFace face)
Adds a new faces to the button |
com.google.gwt.event.shared.HandlerRegistration |
addMouseDownHandler(com.google.gwt.event.dom.client.MouseDownHandler handler)
|
com.google.gwt.event.shared.HandlerRegistration |
addMouseMoveHandler(com.google.gwt.event.dom.client.MouseMoveHandler handler)
|
com.google.gwt.event.shared.HandlerRegistration |
addMouseOutHandler(com.google.gwt.event.dom.client.MouseOutHandler handler)
|
com.google.gwt.event.shared.HandlerRegistration |
addMouseOverHandler(com.google.gwt.event.dom.client.MouseOverHandler handler)
|
com.google.gwt.event.shared.HandlerRegistration |
addMouseUpHandler(com.google.gwt.event.dom.client.MouseUpHandler handler)
|
com.google.gwt.event.shared.HandlerRegistration |
addMouseWheelHandler(com.google.gwt.event.dom.client.MouseWheelHandler handler)
|
OMSVGAnimatedString |
getClassName()
Returns the CSS class name of this element. |
SVGButtonBase.SVGFaceName |
getCurrentFaceName()
Returns the name of the face currently displayed by this button |
SVGButtonBase.SVGFace |
getFace(SVGButtonBase.SVGFaceName faceName)
Returns the face associated with a face name |
OMSVGStyle |
getStyle()
Returns the CSS style of this element |
OMSVGSVGElement |
getSvgElement()
Returns the SVG element defining the button |
boolean |
isEnabled()
Returns true if this button is enabled, false otherwise |
void |
onClick(com.google.gwt.event.dom.client.ClickEvent event)
|
void |
removeClassNameBaseVal(String className)
Removes the specified class name from the baseVal CSS class name of this element |
void |
replaceClassNameBaseVal(String oldClassName,
String newClassName)
Replaces the specified class name in the baseVal CSS class name of this element with a new class name |
void |
setClassNameBaseVal(String className)
Sets the baseVal CSS class name of this element to the specified value |
void |
setEnabled(boolean enabled)
Sets whether this button is enabled |
void |
setResource(SVGResource resource)
Sets the SVG resource defining the button |
void |
setSvgElement(OMSVGSVGElement svgElement)
Sets the SVG element defining the button |
void |
showFace(SVGButtonBase.SVGFaceName faceName)
Forces the button to display the specified face |
| Methods inherited from class org.vectomatic.dom.svg.ui.SVGWidget |
|---|
getUiBinderField |
| Methods inherited from class com.google.gwt.user.client.ui.Widget |
|---|
addAttachHandler, addBitlessDomHandler, addDomHandler, addHandler, asWidget, asWidgetOrNull, createHandlerManager, delegateEvent, doAttachChildren, doDetachChildren, fireEvent, getHandlerCount, getLayoutData, getParent, isAttached, isOrWasAttached, onAttach, onBrowserEvent, 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, resolvePotentialElement, setElement, setElement, setHeight, setPixelSize, setSize, setStyleDependentName, setStyleName, setStyleName, setStyleName, setStyleName, setStylePrimaryName, setStylePrimaryName, setTitle, setVisible, setVisible, setWidth, 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.event.shared.HasHandlers |
|---|
fireEvent |
| Methods inherited from interface com.google.gwt.event.dom.client.MouseDownHandler |
|---|
onMouseDown |
| Methods inherited from interface com.google.gwt.event.dom.client.MouseUpHandler |
|---|
onMouseUp |
| Methods inherited from interface com.google.gwt.event.dom.client.MouseOverHandler |
|---|
onMouseOver |
| Methods inherited from interface com.google.gwt.event.dom.client.MouseOutHandler |
|---|
onMouseOut |
| Field Detail |
|---|
protected OMSVGSVGElement svgElement
OMSVGSVGElement representing
this button
protected SVGButtonBase.SVGFaceName currentFaceName
protected Map<SVGButtonBase.SVGFaceName,SVGButtonBase.SVGFace> faces
| Constructor Detail |
|---|
protected SVGButtonBase()
setResource(SVGResource) or setSvgElement(OMSVGSVGElement)
before using the widget.
protected SVGButtonBase(OMSVGSVGElement svgElement,
Map<SVGButtonBase.SVGFaceName,SVGButtonBase.SVGFace> faces)
svgElement - The SVG element defining the buttonfaces - A collection of faces
protected SVGButtonBase(SVGResource resource,
Map<SVGButtonBase.SVGFaceName,SVGButtonBase.SVGFace> faces)
resource - An SVG resource to use for the SVG element defining the buttonfaces - The SVG element defining the button| Method Detail |
|---|
public SVGButtonBase.SVGFace addFace(SVGButtonBase.SVGFaceName faceName,
SVGButtonBase.SVGFace face)
faceName - The face nameface - The face
public SVGButtonBase.SVGFace getFace(SVGButtonBase.SVGFaceName faceName)
faceName - The face name
public void setResource(SVGResource resource)
resource - An SVG resourcepublic OMSVGSVGElement getSvgElement()
public void setSvgElement(OMSVGSVGElement svgElement)
svgElement - the SVG element defining the buttonpublic SVGButtonBase.SVGFaceName getCurrentFaceName()
public boolean isEnabled()
public void setEnabled(boolean enabled)
enabled - true to enable the button, false to disable itpublic void showFace(SVGButtonBase.SVGFaceName faceName)
faceName - The name of the face to displaypublic com.google.gwt.event.shared.HandlerRegistration addClickHandler(com.google.gwt.event.dom.client.ClickHandler handler)
addClickHandler in interface com.google.gwt.event.dom.client.HasClickHandlerspublic com.google.gwt.event.shared.HandlerRegistration addMouseDownHandler(com.google.gwt.event.dom.client.MouseDownHandler handler)
addMouseDownHandler in interface com.google.gwt.event.dom.client.HasMouseDownHandlerspublic com.google.gwt.event.shared.HandlerRegistration addMouseUpHandler(com.google.gwt.event.dom.client.MouseUpHandler handler)
addMouseUpHandler in interface com.google.gwt.event.dom.client.HasMouseUpHandlerspublic com.google.gwt.event.shared.HandlerRegistration addMouseOutHandler(com.google.gwt.event.dom.client.MouseOutHandler handler)
addMouseOutHandler in interface com.google.gwt.event.dom.client.HasMouseOutHandlerspublic com.google.gwt.event.shared.HandlerRegistration addMouseOverHandler(com.google.gwt.event.dom.client.MouseOverHandler handler)
addMouseOverHandler in interface com.google.gwt.event.dom.client.HasMouseOverHandlerspublic com.google.gwt.event.shared.HandlerRegistration addMouseMoveHandler(com.google.gwt.event.dom.client.MouseMoveHandler handler)
addMouseMoveHandler in interface com.google.gwt.event.dom.client.HasMouseMoveHandlerspublic com.google.gwt.event.shared.HandlerRegistration addMouseWheelHandler(com.google.gwt.event.dom.client.MouseWheelHandler handler)
addMouseWheelHandler in interface com.google.gwt.event.dom.client.HasMouseWheelHandlerspublic OMSVGStyle getStyle()
ISVGStylable
getStyle in interface ISVGStylablepublic final OMSVGAnimatedString getClassName()
ISVGStylable
getClassName in interface ISVGStylablepublic final void addClassNameBaseVal(String className)
ISVGStylable
addClassNameBaseVal in interface ISVGStylableclassName - the class name to addpublic final void removeClassNameBaseVal(String className)
ISVGStylable
removeClassNameBaseVal in interface ISVGStylableclassName - the class name to remove
public final void replaceClassNameBaseVal(String oldClassName,
String newClassName)
ISVGStylable
replaceClassNameBaseVal in interface ISVGStylableoldClassName - the class name to replacenewClassName - the replacement class namepublic final void setClassNameBaseVal(String className)
ISVGStylable
setClassNameBaseVal in interface ISVGStylableclassName - the class namepublic void onClick(com.google.gwt.event.dom.client.ClickEvent event)
onClick in interface com.google.gwt.event.dom.client.ClickHandler
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||