org.netbeans.microedition.svg
Class SVGButton
java.lang.Object
org.netbeans.microedition.svg.SVGComponent
org.netbeans.microedition.svg.SVGAbstractButton
org.netbeans.microedition.svg.SVGButton
- All Implemented Interfaces:
- SVGForm.FocusListener
public class SVGButton
- extends SVGAbstractButton
Suggested SVG snippet:
<g transform="translate(130,276)" id="button_ok">
<!-- Metadata information. Please don't edit. -->
<text display="none">type=button</text>
<rect x="-2" y="-2" rx="5" ry="5" width="80" height="30" fill="white"/>
<rect x="1" y="1" rx="5" ry="5" width="81" height="31" fill="rgb(0,0,128)"/>
<g>
<text display="none">type=body</text>
<rect id="button_ok_body" transform="matrix(1.060988,0.003826782,-0.003826782,1.060988,4.617886,1.9321077)"
x="0" y="0" rx="5" ry="5" width="80" height="30" fill="rgb(176,196,222)" stroke="rgb(255,165,0)" stroke-width="0">
<animate attributeName="stroke-width" attributeType="XML" begin="button_ok.focusin" dur="0.25s" fill="freeze" to="2"/>
<animate attributeName="stroke-width" attributeType="XML" begin="button_ok.focusout" dur="0.25s" fill="freeze" to="0"/>
<!-- The third and fourth animation elements are used for animate button : on press, on release -->
<animate id="button_ok_body_pressed" "attributeName="fill" attributeType="XML" begin="indefinite" dur="0.25s" fill="freeze" to="rgb(156,176,202)"/>
<animate id="button_ok_body_released" attributeName="fill" attributeType="XML" begin="indefinite" dur="0.25s" fill="freeze" to="rgb(176,196,222)"/>
</rect>
</g>
<g>
<text id="button_ok_stext" x="24" y="23" fill="black" font-size="20">
OK</text>
<text display="none">type=shadow_text</text>
</g>
<g>
<text id="button_ok_text" x="23" y="21" fill="gray" font-size="20">
OK</text>
<text display="none">type=text</text>
</g>
</g>
Fields inherited from class org.netbeans.microedition.svg.SVGComponent |
actionListeners, DASH, ENABLED, form, LABEL_FOR, REF, SVG_NS, TR_VALUE_HIDDEN, TR_VALUE_INHERIT, TR_VALUE_VISIBLE, TRAIT_FILL, TRAIT_TEXT, TRAIT_VISIBILITY, TRAIT_X, TRAIT_Y, TYPE, wrapperElement |
Methods inherited from class org.netbeans.microedition.svg.SVGComponent |
addActionListener, fireActionPerformed, focusGained, focusLost, getElement, getElementById, getElementByMeta, getElementByMeta, getForm, getLabel, getNestedElementByMeta, getProperty, isFocusable, removeActionListener, requestFocus, setFocusable, setProperty, setTraitSafely, setTraitSafely |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SVGButton
public SVGButton(SVGForm form,
java.lang.String elemId)
pressButton
public void pressButton()
- Overrides:
pressButton
in class SVGAbstractButton
releaseButton
public void releaseButton()
- Overrides:
releaseButton
in class SVGAbstractButton
isSelected
public boolean isSelected()
- Specified by:
isSelected
in class SVGAbstractButton
setSelected
public void setSelected(boolean selected)
- Specified by:
setSelected
in class SVGAbstractButton