Class WindowButton
- java.lang.Object
-
- com.googlecode.wicket.kendo.ui.widget.window.WindowButton
-
- All Implemented Interfaces:
Serializable
,org.apache.wicket.util.io.IClusterable
public class WindowButton extends Object implements org.apache.wicket.util.io.IClusterable
Provides the button object that can be used inMessageWindow
- Author:
- Sebastien Briquet - sebfz1
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description WindowButton(String name, String text)
ConstructorWindowButton(String name, String text, boolean enabled)
ConstructorWindowButton(String name, String text, String icon)
ConstructorWindowButton(String name, String text, String icon, boolean enabled)
ConstructorWindowButton(String name, org.apache.wicket.model.IModel<String> model)
ConstructorWindowButton(String name, org.apache.wicket.model.IModel<String> model, boolean enabled)
ConstructorWindowButton(String name, org.apache.wicket.model.IModel<String> model, String icon)
ConstructorWindowButton(String name, org.apache.wicket.model.IModel<String> model, String icon, boolean enabled)
Main constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
Indicates whether thisWindowButton
is equal to anotherWindowButton
.
Are considered equals buttons having the same text representation, which is the text supplied to the constructor (iftoString()
is not overridden).boolean
getDefaultFormProcessing()
Indicates whether the form will be validated and updated.String
getIcon()
Gets the button's iconString
getName()
Gets the button's nameint
hashCode()
boolean
isEnabled()
Indicates whether the button is enabledboolean
isIndicating()
Indicates whether the button has a busy indicatorboolean
isVisible()
Indicates whether the button is visibleboolean
match(String name)
Indicates whether thisWindowButton
name match the supplied name.static WindowButton
of(String name, org.apache.wicket.model.IModel<String> model, boolean formProcessing)
Helper that creates a newWindowButton
static WindowButton
of(String name, org.apache.wicket.model.IModel<String> model, String icon, boolean formProcessing)
Helper that creates a newWindowButton
WindowButton
setDefaultFormProcessing(boolean processing)
Set the default form processingvoid
setIcon(String icon)
Sets the button's iconString
toString()
-
-
-
Constructor Detail
-
WindowButton
public WindowButton(String name, String text)
Constructor- Parameters:
name
- the button's nametext
- the button's text
-
WindowButton
public WindowButton(String name, String text, String icon)
Constructor- Parameters:
name
- the button's nametext
- the button's texticon
- the button's icon
-
WindowButton
public WindowButton(String name, String text, boolean enabled)
Constructor- Parameters:
name
- the button's nametext
- the button's textenabled
- indicates whether the button is enabled
-
WindowButton
public WindowButton(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
-
WindowButton
public WindowButton(String name, org.apache.wicket.model.IModel<String> model)
Constructor- Parameters:
name
- the button's namemodel
- the button's text
-
WindowButton
public WindowButton(String name, org.apache.wicket.model.IModel<String> model, String icon)
Constructor- Parameters:
name
- the button's namemodel
- the button's texticon
- the button's icon
-
WindowButton
public WindowButton(String name, org.apache.wicket.model.IModel<String> model, boolean enabled)
Constructor- Parameters:
name
- the button's namemodel
- the button's textenabled
- indicates whether the button is enabled
-
-
Method Detail
-
of
public static WindowButton of(String name, org.apache.wicket.model.IModel<String> model, boolean formProcessing)
Helper that creates a newWindowButton
- Parameters:
name
- the button's namemodel
- the button's textformProcessing
- whether the form will be validated and updated- Returns:
- a new
WindowButton
-
of
public static WindowButton of(String name, org.apache.wicket.model.IModel<String> model, String icon, boolean formProcessing)
Helper that creates a newWindowButton
- Parameters:
name
- the button's namemodel
- the button's texticon
- the button's iconformProcessing
- whether the form will be validated and updated- Returns:
- a new
WindowButton
-
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: k-i-icon)
-
isEnabled
public boolean isEnabled()
Indicates whether the button is enabled- Returns:
- true or false
-
isVisible
public boolean isVisible()
Indicates whether the button is visible- Returns:
- true or false
-
isIndicating
public boolean isIndicating()
Indicates whether the button has a busy indicator- Returns:
getDefaultFormProcessing()
by default
-
getDefaultFormProcessing
public boolean getDefaultFormProcessing()
Indicates whether the form will be validated and updated.- Returns:
- true by default
- See Also:
IFormSubmitter.getDefaultFormProcessing()
-
setDefaultFormProcessing
public WindowButton setDefaultFormProcessing(boolean processing)
Set the default form processing- Parameters:
processing
- true or false- Returns:
- this, for chaining
-
equals
public boolean equals(Object object)
Indicates whether thisWindowButton
is equal to anotherWindowButton
.
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
- theWindowButton
to compare to- Returns:
- true if considered as equal
-
match
public boolean match(String name)
Indicates whether thisWindowButton
name match the supplied name.- Parameters:
name
- the name to compare to- Returns:
- true if equal
-
-