Class AbstractButton
- java.lang.Object
-
- com.googlecode.wicket.kendo.ui.datatable.button.AbstractButton
-
- All Implemented Interfaces:
com.googlecode.wicket.jquery.core.IJsonFactory
,Serializable
,org.apache.wicket.util.io.IClusterable
- Direct Known Subclasses:
CommandButton
,ToolbarButton
public abstract class AbstractButton extends Object implements com.googlecode.wicket.jquery.core.IJsonFactory, org.apache.wicket.util.io.IClusterable
Provides a base button object that can be used inDataTable
The css content forCSS_ICON_ONLY
is not supplied.
It might be implemented like this:
.k-button.w-icon-only { padding: .2em; min-width: 0px !important; } .k-button.w-icon-only > .k-icon { margin: auto 2px; }
- Author:
- Sebastien Briquet - sebfz1
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description AbstractButton(String name)
Constructor with default property tonull
)AbstractButton(String name, String property)
ConstructorAbstractButton(String name, org.apache.wicket.model.IModel<String> text)
Constructor with default property tonull
)AbstractButton(String name, org.apache.wicket.model.IModel<String> text, String property)
Constructor
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object object)
Indicates whether thisAbstractButton
is equal to anotherAbstractButton
.String
getCSSClass()
Gets the CSS class to be applied on the button
Caution:super.getCSSClass()
should be called when overriddenString
getIcon()
Gets the icon being displayed in the buttonString
getIconClass()
Gets the CSS class for the iconString
getName()
Gets the button nameString
getProperty()
Gets the button propertyorg.apache.wicket.model.IModel<String>
getTextModel()
Gets the button textint
hashCode()
abstract boolean
isBuiltIn()
Indicates whether the button acts as a built-in one (like create, edit, update, destroy)boolean
isEnabled()
Indicates whether this button is enabledboolean
isVisible()
Indicates whether the button should be visibleboolean
match(String name)
Indicates whether thisAbstractButton
name match to the supplied name.
-
-
-
Field Detail
-
CSS_ICON_ONLY
public static final String CSS_ICON_ONLY
css class for icon-only button- See Also:
- Constant Field Values
-
CSS_STATE_DISABLED
public static final String CSS_STATE_DISABLED
css class for disabled button state- See Also:
- Constant Field Values
-
EDIT
public static final String EDIT
- See Also:
- Constant Field Values
-
SAVE
public static final String SAVE
- See Also:
- Constant Field Values
-
CREATE
public static final String CREATE
- See Also:
- Constant Field Values
-
CANCEL
public static final String CANCEL
- See Also:
- Constant Field Values
-
DESTROY
public static final String DESTROY
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
AbstractButton
public AbstractButton(String name)
Constructor with default property tonull
)- Parameters:
name
- the button's name
-
AbstractButton
public AbstractButton(String name, org.apache.wicket.model.IModel<String> text)
Constructor with default property tonull
)- Parameters:
name
- the button's nametext
- the button's text
-
AbstractButton
public AbstractButton(String name, String property)
Constructor- Parameters:
name
- the button's nameproperty
- the property used to retrieve the row's object value
-
-
Method Detail
-
getName
public String getName()
Gets the button name- Returns:
- the button name
-
getTextModel
public org.apache.wicket.model.IModel<String> getTextModel()
Gets the button text- Returns:
- the button text
-
getProperty
public String getProperty()
Gets the button property- Returns:
- the button property
-
isEnabled
public boolean isEnabled()
Indicates whether this button is enabled- Returns:
true
by default
-
isVisible
public boolean isVisible()
Indicates whether the button should be visible- Returns:
true
by default
-
getCSSClass
public String getCSSClass()
Gets the CSS class to be applied on the button
Caution:super.getCSSClass()
should be called when overridden- Returns:
- the CSS class
-
getIcon
public String getIcon()
Gets the icon being displayed in the button- Returns:
KendoIcon.NONE
by default- See Also:
getIconClass()
-
getIconClass
public String getIconClass()
Gets the CSS class for the icon- Returns:
- the CSS class for the icon
- See Also:
getIcon()
-
isBuiltIn
public abstract boolean isBuiltIn()
Indicates whether the button acts as a built-in one (like create, edit, update, destroy)- Returns:
- true if the button is a built-in one
-
equals
public boolean equals(Object object)
Indicates whether thisAbstractButton
is equal to anotherAbstractButton
. Are considered equals buttons having the same name.- Overrides:
equals
in classObject
- Parameters:
object
- aAbstractButton
to compare to- Returns:
- true if considered as equal
-
match
public boolean match(String name)
Indicates whether thisAbstractButton
name match to the supplied name.- Parameters:
name
- the name to compare to- Returns:
- true if equal
-
-