DhButton Class

DhButton Class

This Package | All Packages

DhButtonBase
  |
  +--DhButton
public class DhButton
extends DhButtonBase

Implements a push button class. This can be used inside or outside of HTTP forms.

Constructors
Name Description
DhButton() Creates a button.
DhButton( String strText ) Creates a button.

Methods
Name Description
getEnabled() Retrieves the enabled state of the button.
getText() Retrieves the label from the button.
setEnabled(boolean f) Sets the button's enabled state.
setText( String strText ) Sets the button's text label.

Constructors

DhButton.DhButton

Syntax 1
public DhButton();
Description

Creates a button. This default constructor creates a button with a default text label of "button".



Syntax 2
public DhButton( String strText );
Parameters
strText
The new button's label.
Description

Creates a button.

Methods

DhButton.getEnabled

Syntax
public boolean getEnabled();
Return Value

Returns s true if enabled or false if disabled.

Description

Retrieves the enabled state of the button.

DhButton.getText

Syntax
public String getText();
Return Value

Returns the current label string.

Description

Retrieves the label from the button.

DhButton.setEnabled

Syntax
public void setEnabled( boolean f );
Parameters
f
Set to true if enabled; false if disabled.
Description

Sets the button's enabled state.

DhButton.setText

Syntax
public void setText( String strText );
Parameters
strText
The new label.
Description

Sets the button's text label.