public class XULButton extends AbstractXULWidget
    <button label="basic button" left="5" top="5"/>
    <button label="basic button with image" image="anImage.gif" left="50" top="5"/>
    <button label="checkbox button" type="checkbox" left="5" top="30"/>
    <button label="radio button" type="radio" left="5" top="50"/>
    <toolbarbutton id="toolbar button" image="anImage.png"
                      oncommand="aJavaScriptCommand()" top="70" left="70"/>
    <radiogroup top="100" left="20">
      <radio label="first" />
      <radio label="second" />
      <radio label="third" />
    </radiogroup>
 | Modifier and Type | Field and Description | 
|---|---|
static int | 
TYPE_CHECKBOX  | 
static int | 
TYPE_MENU  | 
static int | 
TYPE_RADIO  | 
static int | 
TYPE_REGULAR  | 
static int | 
TYPE_TOOLBAR  | 
align, bindingscomp, document, eltALIGN, CHECKED, CLASS, COLS, CURPOS, CURRENTINDEX, CURRENTITEM, DECIMALPLACES, DIALOGTYPE, DIRECTORY, DISABLED, DOCUMENT, EDITABLE, EDITING_COLUMN, EDITING_ROW, EXTENSIONS, HEIGHT, HIDDEN, HORIZONTAL, ID, IMAGE, INCREMENT, ITEMCOUNT, LABEL, LEFT, MAX, MAX_HEIGHT, MAX_WIDTH, MAXPOS, MIN, MIN_HEIGHT, MIN_WIDTH, MODE, MULTILINE, ORIENT, PAGEINCREMENT, RESIZABLE, ROWS, SCREENX, SCREENY, SELECTED, SELECTEDINDEX, SRC, STYLE, TITLE, TOOLTIPTEXT, TOP, TYPE, VALUE, VERTICAL, VIEW, WIDTH, WINDOW, WRAP| Constructor and Description | 
|---|
XULButton(XULDocument document,
         org.w3c.dom.Element elt)  | 
XULButton(XULDocument document,
         org.w3c.dom.Element elt,
         int buttonType)  | 
| Modifier and Type | Method and Description | 
|---|---|
boolean | 
applyStyles(CSSStyles.Rules rules)
Apply the styles on the widget. 
 | 
void | 
bindClickAction(java.lang.String onclick)
Bind an "onclick" action. 
 | 
void | 
bindCommandAction(java.lang.String onCommand)
Bind an "oncommand" action. 
 | 
XULButton | 
cloneWidget()
Clone the widget. 
 | 
java.lang.Object | 
get(java.lang.String property)
Return the value of a property. 
 | 
int | 
getButtonType()  | 
javax.swing.AbstractButton | 
getComponent()
Return the associated Swing component. 
 | 
void | 
jsSet_checked(java.lang.String value)  | 
void | 
jsSet_disabled(java.lang.String value)  | 
void | 
jsSet_image(java.lang.String value)  | 
void | 
jsSet_label(java.lang.String value)  | 
void | 
set(java.lang.String property,
   java.lang.String value)
Set an attribute value for this widget as a String. 
 | 
bindAnyAction, bindChangeAction, bindChangeActionImpl, bindMouseOutAction, bindMouseOverAction, bindSelectAction, getAlignment, getDocument, getFunctionBinding, getOnChange, getOnCommand, getOnMouseOut, getOnMouseOver, getOnSelect, getStyle, getStyleClasses, getWidgetType, jsSet_class, jsSet_height, jsSet_hidden, jsSet_left, jsSet_style, jsSet_tooltiptext, jsSet_top, jsSet_width, reapplyStyle, reapplyStyle, resetMaximumSize, resetMinimumSize, resetPosition, resetSize, setComponent, setFunctionBinding, setStyle, setStyleClasses, setToolTipText, wrapActionEvent, wrapAdjustmentEvent, wrapChangeEvent, wrapChangeEvent, wrapChangeEvent, wrapChangeEvent, wrapDocumentEvent, wrapHoverEvent, wrapOutEvent, wrapSelectedEventaddAttribute, getAlignmentFromNode, getAttrValueAsBoolean, getAttrValueAsBoolean, getAttrValueAsDimension, getAttrValueAsDouble, getAttrValueAsIcon, getAttrValueAsInteger, getElement, getIDclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitbindLoadAction, canAddToHierarchy, finishConstruction, getOnLoad, getParentElement, getPreferredSize, getSizedComponent, hasChildren, isEmptyContructionElementgetAttrValue, getElement, getID, hasAttrpublic static final int TYPE_REGULAR
public static final int TYPE_TOOLBAR
public static final int TYPE_RADIO
public static final int TYPE_CHECKBOX
public static final int TYPE_MENU
public XULButton(XULDocument document, org.w3c.dom.Element elt)
public XULButton(XULDocument document, org.w3c.dom.Element elt, int buttonType)
public XULButton cloneWidget()
XULWidgetpublic int getButtonType()
public javax.swing.AbstractButton getComponent()
XULElementgetComponent in interface XULElementgetComponent in class AbstractXULElementpublic boolean applyStyles(CSSStyles.Rules rules)
rules - the CSS rules applied to this widgetpublic void bindCommandAction(java.lang.String onCommand)
AbstractXULWidgetbindCommandAction in interface XULWidgetbindCommandAction in class AbstractXULWidgetonCommand - the onchange contentpublic void bindClickAction(java.lang.String onclick)
XULWidget
 button.bindClickAction("clicked()");
 onclick - the onchange contentpublic java.lang.Object get(java.lang.String property)
AbstractXULWidgetget in interface XULElementget in class AbstractXULWidgetproperty - the property namepublic void set(java.lang.String property,
                java.lang.String value)
AbstractXULWidgetset in interface XULElementset in class AbstractXULWidgetproperty - the property namevalue - the property valuepublic void jsSet_label(java.lang.String value)
public void jsSet_disabled(java.lang.String value)
public void jsSet_checked(java.lang.String value)
public void jsSet_image(java.lang.String value)
Copyright © 2008-2020 Herve Girod. All Rights Reserved. Documentation and source under the LGPL licence