org.netbeans.microedition.svg
Class SVGRadioButton
java.lang.Object
org.netbeans.microedition.svg.SVGComponent
org.netbeans.microedition.svg.SVGAbstractButton
org.netbeans.microedition.svg.SVGRadioButton
- All Implemented Interfaces:
- SVGForm.FocusListener
public class SVGRadioButton
- extends SVGAbstractButton
Suggested SVG snippet:
<g transform="translate(20,190)">
<rect x="0" y="0" rx="5" ry="5" width="200" height="60" fill="none" stroke="#85a6cf" stroke-width="2"/>
<g id="radio_male" transform="translate(7,5)">
<!-- Metadata information. Please don't edit. -->
<text display="none">type=radio</text>
<rect x="0" y="0" rx="5" ry="5" width="185" height="24" fill="none" stroke="rgb(255,165,0)" stroke-width="2" visibility="hidden">
<set attributeName="visibility" attributeType="XML" begin="radio_male.focusin" fill="freeze" to="visible"/>
<set attributeName="visibility" attributeType="XML" begin="radio_male.focusout" fill="freeze" to="hidden"/>
</rect>
<circle id="radio_male_dot" cx="11" cy="12" r="8" fill="white" stroke="black" stroke-width="2"/>
<g>
<text display="none">type=dot</text>
<circle cx="11" cy="12" r="4" fill="black" visibility="hidden"/>
<g
<text id="radio_male_text" x="24" y="17" stroke="gray" font-size="15">
Male</text>
<!-- Metadata information. Please don't edit. -->
<text display="none">type=text</text>
</g>
<g id="radio_female" transform="translate(7,33)">
<!-- Metadata information. Please don't edit. -->
<text display="none">type=radio</text>
<rect x="0" y="0" rx="5" ry="5" width="185" height="24" fill="none" stroke="rgb(255,165,0)" stroke-width="2" visibility="hidden">
<set attributeName="visibility" attributeType="XML" begin="radio_female.focusin" fill="freeze" to="visible"/>
<set attributeName="visibility" attributeType="XML" begin="radio_female.focusout" fill="freeze" to="hidden"/>
</rect>
<circle transform="translate(11, 12)" cx="0" cy="0" r="8" fill="white" stroke="black" stroke-width="2"/>
<g>
<!-- Metadata information. Please don't edit. -->
<text display="none">type=dot</text>
<circle id="radio_female_dot" cx="11" cy="12" r="4" fill="black" visibility="hidden"/>
<g>
<text x="24" y="17" stroke="gray" font-size="15">
Female</text>
<!-- Metadata information. Please don't edit. -->
<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 |
SVGRadioButton
public SVGRadioButton(SVGForm form,
java.lang.String elemId)
setSelected
public void setSelected(boolean selected)
- Specified by:
setSelected
in class SVGAbstractButton
isSelected
public boolean isSelected()
- Specified by:
isSelected
in class SVGAbstractButton
pressButton
public void pressButton()
- Overrides:
pressButton
in class SVGAbstractButton
getText
public java.lang.String getText()
setText
public void setText(java.lang.String text)