Class DialogButton
java.lang.Object
com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton
- All Implemented Interfaces:
Serializable
,org.apache.wicket.util.io.IClusterable
Provides the button object that can be used in dialogs
- Author:
- Sebastien Briquet - sebfz1
- See Also:
-
Constructor Summary
ConstructorsConstructorDescriptionDialogButton
(String name, String text) ConstructorDialogButton
(String name, String text, boolean enabled) ConstructorDialogButton
(String name, String text, String icon) ConstructorDialogButton
(String name, String text, String icon, boolean enabled) ConstructorDialogButton
(String name, org.apache.wicket.model.IModel<String> model) ConstructorDialogButton
(String name, org.apache.wicket.model.IModel<String> model, boolean enabled) ConstructorDialogButton
(String name, org.apache.wicket.model.IModel<String> model, String icon) ConstructorDialogButton
(String name, org.apache.wicket.model.IModel<String> model, String icon, boolean enabled) Constructor -
Method Summary
Modifier and TypeMethodDescriptionboolean
Indicates whether thisDialogButton
is equal to anotherDialogButton
.
Are considered equals buttons having the same text representation, which is the text supplied to the constructor (iftoString()
is not overridden).protected CharSequence
getCallbackScript
(ButtonAjaxBehavior behavior) Gets the javascript statement that will generate an ajax GET request to the behavior for this assigned buttongetIcon()
Gets the button's iconGets the markupId of the specified button.
This can be used to enable/disable the buttongetName()
Gets the button's nameint
hashCode()
boolean
Indicates whether the button is enabledboolean
Indicates whether the button has a busy indicatorboolean
Indicates whether thisDialogButton
name match the supplied name.void
setEnabled
(boolean enabled) Sets the enable state of the buttonvoid
setEnabled
(boolean enabled, org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler) Sets the enable state of the buttonvoid
Sets the button's iconvoid
setVisible
(boolean visible, org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler) Sets the visible state of the buttontoString()
-
Constructor Details
-
DialogButton
Constructor- Parameters:
name
- the button's nametext
- the button's text
-
DialogButton
Constructor- Parameters:
name
- the button's nametext
- the button's texticon
- the button's icon
-
DialogButton
Constructor- Parameters:
name
- the button's nametext
- the button's textenabled
- indicates whether the button is enabled
-
DialogButton
Constructor- Parameters:
name
- the button's nametext
- the button's texticon
- the button's iconenabled
- indicates whether the button is enabled
-
DialogButton
Constructor- Parameters:
name
- the button's namemodel
- the button's text model
-
DialogButton
Constructor- Parameters:
name
- the button's namemodel
- the button's text modelicon
- the button's icon
-
DialogButton
Constructor- Parameters:
name
- the button's namemodel
- the button's text modelenabled
- indicates whether the button is enabled
-
DialogButton
public DialogButton(String name, org.apache.wicket.model.IModel<String> model, String icon, boolean enabled) Constructor- Parameters:
name
- the button's namemodel
- the button's text modelicon
- the button's iconenabled
- indicates whether the button is enabled
-
-
Method Details
-
getName
Gets the button's name- Returns:
- the button's name
-
getIcon
Gets the button's icon- Returns:
- the button's icon
-
setIcon
Sets the button's icon- Parameters:
icon
- the css class (ie: ui-my-icon)
-
isEnabled
public boolean isEnabled()Indicates whether the button is enabled- Returns:
- true or false
-
setEnabled
public void setEnabled(boolean enabled) Sets the enable state of the button- Parameters:
enabled
- true or false
-
setEnabled
public void setEnabled(boolean enabled, org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler) Sets the enable state of the button- Parameters:
enabled
- true or falsehandler
- theIPartialPageRequestHandler
-
setVisible
public void setVisible(boolean visible, org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler) Sets the visible state of the button- Parameters:
visible
- true or falsehandler
- theIPartialPageRequestHandler
-
isIndicating
public boolean isIndicating()Indicates whether the button has a busy indicator- Returns:
false
by default
-
getMarkupId
Gets the markupId of the specified button.
This can be used to enable/disable the button- Returns:
- the markupId
-
getCallbackScript
Gets the javascript statement that will generate an ajax GET request to the behavior for this assigned button- Parameters:
behavior
- theButtonAjaxBehavior
- Returns:
- the javascript statement
-
hashCode
public int hashCode() -
equals
Indicates whether thisDialogButton
is equal to anotherDialogButton
.
Are considered equals buttons having the same text representation, which is the text supplied to the constructor (iftoString()
is not overridden).- Overrides:
equals
in classObject
- Parameters:
object
- theDialogButton
to compare to- Returns:
- true if considered as equal
-
match
Indicates whether thisDialogButton
name match the supplied name.- Parameters:
name
- the name to compare to- Returns:
- true if equal
-
toString
-