|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectnet.xoetrope.html.XHtmlWidget
net.xoetrope.html.XEdit
public class XEdit
A wrapper for the Swing JFormattedTextField class
Copyright (c) Xoetrope Ltd., 1998-2003
License: see license.txt
| Field Summary | |
|---|---|
protected netscape.javascript.JSObject |
obj
|
| Fields inherited from class net.xoetrope.html.XHtmlWidget |
|---|
currentProject, divElement, htmlDoc, imageElement, inputElement, labelElement, metaElement, olElement, selectElement, tableElement, textareaElement, ulElement |
| Constructor Summary | |
|---|---|
XEdit()
Create a new XEdit |
|
XEdit(org.w3c.dom.html.HTMLInputElement inputElement)
Create a new XEdit based on an existing HTML edit field. |
|
XEdit(java.lang.String value,
java.lang.String id)
Create a new XEdit with an id and a specific value. |
|
| Method Summary | |
|---|---|
void |
blur()
Lose focus on the current edit field. |
void |
focus()
Focus on the current edit field. |
java.lang.String |
getAlign()
Get the align attribute of the XEdit. |
java.lang.String |
getAlternativeName()
Get the alt attribute of the XEdit. |
java.lang.String |
getAttribute(java.lang.String attribName)
Get an attribute value |
java.lang.String |
getBackgroundColor()
Get the background color of the XEdit. |
java.lang.String |
getDefaultValue()
Get the default value of the XEdit. |
java.lang.String |
getFontColor()
Get the font color of the XEdit's elements. |
int |
getFontSize()
Get the size of the XEdit's text. |
org.w3c.dom.html.HTMLFormElement |
getForm()
Get the form this XEdit belongs to. |
org.w3c.dom.html.HTMLInputElement |
getHTMLElement()
Get the HTML element at which refers the XEdit. |
int |
getMaxLength()
Get the max number of characters the edit field can handle. |
java.lang.String |
getSize()
Get the size of the edit field. |
java.lang.String |
getText()
Get the text content of the current edit field. |
java.lang.Object |
getValue()
Get the Object value of the text field |
void |
select()
Select the content of the edit field. |
void |
setAlign(java.lang.String align)
Set the align attribute of the XEdit |
void |
setAlternativeName(java.lang.String name)
Set the alt attribute of the XEdit. |
void |
setAttribute(java.lang.String attribName,
java.lang.Object attribValue)
Set one or more attributes of the component. |
void |
setBackgroundColor(java.lang.String hexColor)
Set the background color of the XEdit. |
void |
setDefaultValue(java.lang.String value)
Set the default value of the XEdit. |
void |
setEnabled(boolean enabled)
Set the XEdit enabled or disabled. |
void |
setFontColor(java.lang.String hexColor)
Set the font color of the XEdit's elements. |
void |
setFontSize(int fontsize)
Set the size of the XEdit's text. |
void |
setMaxLength(int maxLength)
Set the maximum number of characters the edit field can handle. |
void |
setSize(int width)
Set the size of the edit field. |
void |
setText(java.lang.String text)
Set the text content of the current edit field. |
void |
setValue(java.lang.Object value)
Set the Object value for the text field |
void |
setVisible(boolean visible)
Set the XEdit visible or invisible. |
| Methods inherited from class net.xoetrope.html.XHtmlWidget |
|---|
addEvent, setObject, setObject, setObject, setObject, setObject, setObject, setObject, setObject, setObject, setObject |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected netscape.javascript.JSObject obj
| Constructor Detail |
|---|
public XEdit()
public XEdit(java.lang.String value,
java.lang.String id)
value - the value in the edit fieldid - the id of the edit fieldpublic XEdit(org.w3c.dom.html.HTMLInputElement inputElement)
inputElement - the HTML input tag the XEdit refers to| Method Detail |
|---|
public void blur()
public void focus()
public void select()
public void setDefaultValue(java.lang.String value)
value - the default valuepublic java.lang.String getDefaultValue()
public java.lang.Object getValue()
public void setValue(java.lang.Object value)
value - the new object valuepublic java.lang.String getText()
getText in interface XTextHolderpublic void setText(java.lang.String text)
setText in interface XTextHoldertext - the new text value of the edit fieldpublic void setVisible(boolean visible)
visible - true if visible, false otherwisepublic void setEnabled(boolean enabled)
enabled - true if enabled, false otherwise
public void setAttribute(java.lang.String attribName,
java.lang.Object attribValue)
attribName - the name of the attributeattribValue - the value of the attributepublic java.lang.String getAttribute(java.lang.String attribName)
attribName - the attribute which value is requested
public void setAlign(java.lang.String align)
align - the alignment of the XEdit (left, right, center, justified)public java.lang.String getAlign()
public void setAlternativeName(java.lang.String name)
name - the alternative name to be displayedpublic java.lang.String getAlternativeName()
public org.w3c.dom.html.HTMLFormElement getForm()
public void setMaxLength(int maxLength)
maxLength - the maximum lengthpublic int getMaxLength()
public void setSize(int width)
width - the size of the edit fieldpublic java.lang.String getSize()
public int getFontSize()
public void setFontSize(int fontsize)
fontsize - the int value of the font sizepublic java.lang.String getBackgroundColor()
public void setBackgroundColor(java.lang.String hexColor)
hexColor - the hexadecimal value of the background colorpublic java.lang.String getFontColor()
public void setFontColor(java.lang.String hexColor)
hexColor - the hexadecimal value of the font colorpublic org.w3c.dom.html.HTMLInputElement getHTMLElement()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||