Class DialogButton
- java.lang.Object
-
- com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton
-
- All Implemented Interfaces:
Serializable
,org.apache.wicket.util.io.IClusterable
public class DialogButton extends Object implements org.apache.wicket.util.io.IClusterable
Provides the button object that can be used in dialogs- Author:
- Sebastien Briquet - sebfz1
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description DialogButton(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
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
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 buttonString
getIcon()
Gets the button's iconString
getMarkupId()
Gets the markupId of the specified button.
This can be used to enable/disable the buttonString
getName()
Gets the button's nameint
hashCode()
boolean
isEnabled()
Indicates whether the button is enabledboolean
isIndicating()
Indicates whether the button has a busy indicatorboolean
match(String name)
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
setIcon(String icon)
Sets the button's iconvoid
setVisible(boolean visible, org.apache.wicket.core.request.handler.IPartialPageRequestHandler handler)
Sets the visible state of the buttonString
toString()
-
-
-
Constructor Detail
-
DialogButton
public DialogButton(String name, String text)
Constructor- Parameters:
name
- the button's nametext
- the button's text
-
DialogButton
public DialogButton(String name, String text, String icon)
Constructor- Parameters:
name
- the button's nametext
- the button's texticon
- the button's icon
-
DialogButton
public DialogButton(String name, String text, boolean enabled)
Constructor- Parameters:
name
- the button's nametext
- the button's textenabled
- indicates whether the button is enabled
-
DialogButton
public DialogButton(String name, String text, String icon, boolean enabled)
Constructor- Parameters:
name
- the button's nametext
- the button's texticon
- the button's iconenabled
- indicates whether the button is enabled
-
DialogButton
public DialogButton(String name, org.apache.wicket.model.IModel<String> model)
Constructor- Parameters:
name
- the button's namemodel
- the button's text model
-
DialogButton
public DialogButton(String name, org.apache.wicket.model.IModel<String> model, String icon)
Constructor- Parameters:
name
- the button's namemodel
- the button's text modelicon
- the button's icon
-
DialogButton
public DialogButton(String name, org.apache.wicket.model.IModel<String> model, boolean enabled)
Constructor- Parameters:
name
- the button's namemodel
- the button's text modelenabled
- indicates whether the button is enabled
-
-
Method Detail
-
getName
public String getName()
Gets the button's name- Returns:
- the button's name
-
getIcon
public String getIcon()
Gets the button's icon- Returns:
- the button's icon
-
setIcon
public void setIcon(String icon)
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
public String getMarkupId()
Gets the markupId of the specified button.
This can be used to enable/disable the button- Returns:
- the markupId
-
getCallbackScript
protected CharSequence getCallbackScript(ButtonAjaxBehavior behavior)
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
-
equals
public boolean equals(Object object)
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
public boolean match(String name)
Indicates whether thisDialogButton
name match the supplied name.- Parameters:
name
- the name to compare to- Returns:
- true if equal
-
-