org.netbeans.microedition.svg
Class SVGRadioButton

java.lang.Object
  extended by org.netbeans.microedition.svg.SVGComponent
      extended by org.netbeans.microedition.svg.SVGAbstractButton
          extended by 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>
 


Field Summary
 
Fields inherited from class org.netbeans.microedition.svg.SVGAbstractButton
myPressedAnimation, myReleasedAnimation, PRESSED, PRESSED_SUFFIX, RELEASED, RELEASED_SUFFIX
 
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
 
Constructor Summary
SVGRadioButton(SVGForm form, java.lang.String elemId)
           
 
Method Summary
 java.lang.String getText()
           
 boolean isSelected()
           
 void pressButton()
           
 void setSelected(boolean selected)
           
 void setText(java.lang.String text)
           
 
Methods inherited from class org.netbeans.microedition.svg.SVGAbstractButton
getBodyElement, getInputHandler, releaseButton
 
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
 

Constructor Detail

SVGRadioButton

public SVGRadioButton(SVGForm form,
                      java.lang.String elemId)
Method Detail

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)