org.netbeans.microedition.svg
Class SVGTextField
java.lang.Object
org.netbeans.microedition.svg.SVGComponent
org.netbeans.microedition.svg.SVGTextField
- All Implemented Interfaces:
- SVGForm.FocusListener
public class SVGTextField
- extends SVGComponent
Suggested svg snippet :
<g id="textfield_name" transform="translate(20,40)">
<!-- Metadata information. Please don't edit. -->
<text display="none">type=textfield</text>
<text display="none">editable=true</text>
<text display="none">enabled=true</text>
<rect x="0" y="0" rx="5" ry="5" width="200" height="30" fill="none" stroke="black" stroke-width="2">
<animate attributeName="stroke" attributeType="XML" begin="textfield_name.focusin" dur="0.25s" fill="freeze" to="rgb(255,165,0)"/>
<animate attributeName="stroke" attributeType="XML" begin="textfield_name.focusout" dur="0.25s" fill="freeze" to="black"/>
</rect>
<g>
<text id="textfield_name_text" x="10" y="23" stroke="black" font-size="20"
font-family="SunSansSemiBold">textField</text>
<!-- Metadata information. Please don't edit. -->
<text display="none">type=text</text>
</g>
<g>
<!-- Metadata information. Please don't edit. -->
<text display="none">type=caret</text>
<rect id="textfield_name_caret" visibility="visible" x="20" y="4"
width="3" height="22" fill="black" stroke="black"/>
</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, 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 |
TRAIT_FONT_FAMILY
protected static final java.lang.String TRAIT_FONT_FAMILY
- See Also:
- Constant Field Values
TEXT
protected static final java.lang.String TEXT
- See Also:
- Constant Field Values
TRAIT_FONT_SIZE
protected static final java.lang.String TRAIT_FONT_SIZE
- See Also:
- Constant Field Values
SVGTextField
public SVGTextField(SVGForm form,
org.w3c.dom.svg.SVGLocatableElement element)
SVGTextField
public SVGTextField(SVGForm form,
java.lang.String elemId)
getTitle
public java.lang.String getTitle()
setTitle
public void setTitle(java.lang.String title)
getText
public java.lang.String getText()
setText
public void setText(java.lang.String text)
getStartOffset
public int getStartOffset()
setStartOffset
public void setStartOffset(int offset)
getCaretPosition
public int getCaretPosition()
setCaretPosition
public void setCaretPosition(int caretPos)
setCaretVisible
public void setCaretVisible(boolean isVisible)
focusGained
public void focusGained()
- Specified by:
focusGained
in interface SVGForm.FocusListener
- Overrides:
focusGained
in class SVGComponent
focusLost
public void focusLost()
- Specified by:
focusLost
in interface SVGForm.FocusListener
- Overrides:
focusLost
in class SVGComponent
getInputHandler
public InputHandler getInputHandler()
- Overrides:
getInputHandler
in class SVGComponent
isEditable
public boolean isEditable()
setEditable
public void setEditable(boolean editable)