|
||||||||||
| 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.XCheckbox
public class XCheckbox
A wrapper for the Swing JCheckbox class
Copyright (c) Xoetrope Ltd., 1998-2004
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 | |
|---|---|
XCheckbox()
Construct a new checkbox |
|
XCheckbox(org.w3c.dom.html.HTMLInputElement inputElement)
Create a new XCheckbox based on an existing HTML checkbox element. |
|
XCheckbox(java.lang.String id,
java.lang.String value)
Create a new check box with a value and an id |
|
| Method Summary | |
|---|---|
void |
click()
Simulate a click on the XCheckbox. |
void |
deleteElement()
Delete the current XCheckbox. |
java.lang.String |
getAlign()
Get the align attribute of the XCheckbox. |
java.lang.String |
getAlternativeName()
Get the alt attribute of the XCheckbox. |
java.lang.String |
getAttribute(java.lang.String attribName)
Get an attribute value |
java.lang.Object |
getComponentState()
Get the component state |
boolean |
getDefaultChecked()
Get whether the checkbox is checked by default |
java.lang.String |
getFontColor()
Get the font color of the XCheckbox's elements. |
java.lang.String |
getFontSize()
Get the size of the XCheckbox's text. |
org.w3c.dom.html.HTMLFormElement |
getForm()
Get the form this XCheckbox belongs to. |
org.w3c.dom.html.HTMLInputElement |
getHTMLElement()
Get the HTML element at which refers the XCheckbox. |
java.lang.String |
getText()
Gets the text/caption |
java.lang.Object |
getValue()
Get the checkbox's value if it has one or else get the text |
void |
insertAfter(java.lang.String element,
java.lang.String id,
boolean checked)
Insert a new radiobutton after the current one |
void |
insertBefore(java.lang.String element,
java.lang.String id,
boolean checked)
Insert a new radiobutton before the current one |
boolean |
isSelected()
Get the status of the check box |
void |
setAlign(java.lang.String align)
Set the align attribute of the XCheckbox |
void |
setAlternativeName(java.lang.String name)
Set the alt attribute of the XCheckbox. |
int |
setAttribute(java.lang.String attribName,
java.lang.Object attribValue)
Set one or more attributes of the component. |
void |
setComponentState(java.lang.Object object)
Set the component state |
void |
setDefaultChecked(boolean defaultChecked)
Set whether the checkbox is checked by default |
void |
setEnabled(boolean enabled)
Set the XCheckbox enabled or disabled. |
void |
setFontColor(java.lang.String hexColor)
Set the font color of the XCheckbox's elements. |
void |
setFontSize(int size)
Set the size of the XCheckbox's text. |
void |
setSelected(boolean checked)
Enables or disables the check box |
void |
setText(java.lang.String s)
Set the check box text |
void |
setValue(java.lang.Object newValue)
Set the value associated with this box |
void |
setVisible(boolean visible)
Set the XCheckbox 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 XCheckbox()
public XCheckbox(java.lang.String id,
java.lang.String value)
id - the check box idvalue - the check box valuepublic XCheckbox(org.w3c.dom.html.HTMLInputElement inputElement)
inputElement - the HTML input tag the XCheckbox refers to| Method Detail |
|---|
public void click()
public void setText(java.lang.String s)
setText in interface XTextHoldersetText in interface XValueHolders - the new textpublic java.lang.String getText()
getText in interface XTextHoldergetText in interface XValueHolderpublic java.lang.Object getValue()
getValue in interface XValueHolderpublic void setValue(java.lang.Object newValue)
setValue in interface XValueHoldernewValue - the new box valuepublic boolean isSelected()
public void setDefaultChecked(boolean defaultChecked)
defaultChecked - true if the checkbox is checked by default, false otherwisepublic boolean getDefaultChecked()
public void setSelected(boolean checked)
public void setVisible(boolean visible)
visible - true if visible, false otherwisepublic void setEnabled(boolean enabled)
enabled - true if enabled, false otherwise
public int setAttribute(java.lang.String attribName,
java.lang.Object attribValue)
setAttribute in interface XAttributedComponentattribName - the name of the attributeattribValue - the value of the attribute
public 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 XCheckbox (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 insertAfter(java.lang.String element,
java.lang.String id,
boolean checked)
element - the displayed name of the buttonid - the unique identifier of the radio button
public void insertBefore(java.lang.String element,
java.lang.String id,
boolean checked)
element - the displayed name of the buttonid - the unique identifier of the radio buttonpublic void deleteElement()
public void setFontSize(int size)
size - the int value of the font sizepublic java.lang.String getFontSize()
public void setFontColor(java.lang.String hexColor)
hexColor - the hexadecimal value of the font colorpublic java.lang.String getFontColor()
public org.w3c.dom.html.HTMLInputElement getHTMLElement()
public java.lang.Object getComponentState()
getComponentState in interface XStateHolderpublic void setComponentState(java.lang.Object object)
setComponentState in interface XStateHolderobject - the selection state. Possible values: 1 or true and 0 or false
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||