com.googlecode.wicket.jquery.ui.widget.dialog
Class DialogButton

java.lang.Object
  extended by com.googlecode.wicket.jquery.ui.widget.dialog.DialogButton
All Implemented Interfaces:
Serializable, org.apache.wicket.IClusterable

public class DialogButton
extends Object
implements org.apache.wicket.IClusterable

Provides the button object that can be used in dialogs

Author:
Sebastien Briquet - sebfz1
See Also:
Serialized Form

Constructor Summary
DialogButton(org.apache.wicket.model.IModel<String> model)
          Constructor
DialogButton(org.apache.wicket.model.IModel<String> model, boolean enabled)
          Constructor
DialogButton(org.apache.wicket.model.IModel<String> model, String icon)
          Constructor
DialogButton(org.apache.wicket.model.IModel<String> model, String icon, boolean enabled)
          Constructor
DialogButton(String text)
          Constructor
DialogButton(String text, boolean enabled)
          Constructor
DialogButton(String text, String icon)
          Constructor
DialogButton(String text, String icon, boolean enabled)
          Constructor
 
Method Summary
 boolean equals(Object object)
          Indicates whether this DialogButton is equal to another DialogButton.
 String getIcon()
          Gets the button's icon
protected  String getMarkupId()
          Gets the markupId of the specified button.
This can be used to enable/disable the button
 int hashCode()
           
 boolean isEnabled()
          Indicates whether the button is enabled
 void setEnabled(boolean enabled)
          Sets the enable state of the button
 void setEnabled(boolean enabled, org.apache.wicket.ajax.AjaxRequestTarget target)
          Sets the enable state of the button
 void setIcon(String icon)
          Sets the button's icon
 void setVisible(boolean visible, org.apache.wicket.ajax.AjaxRequestTarget target)
          Sets the visible state of the button
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

DialogButton

public DialogButton(String text)
Constructor

Parameters:
text - the button's text

DialogButton

public DialogButton(String text,
                    String icon)
Constructor

Parameters:
text - the button's text
icon - the button's icon

DialogButton

public DialogButton(String text,
                    boolean enabled)
Constructor

Parameters:
text - the button's text
enabled - indicates whether the button is enabled

DialogButton

public DialogButton(String text,
                    String icon,
                    boolean enabled)
Constructor

Parameters:
text - the button's text
icon - the button's icon
enabled - indicates whether the button is enabled

DialogButton

public DialogButton(org.apache.wicket.model.IModel<String> model)
Constructor

Parameters:
model - the button's text model

DialogButton

public DialogButton(org.apache.wicket.model.IModel<String> model,
                    String icon)
Constructor

Parameters:
model - the button's text model
icon - the button's icon

DialogButton

public DialogButton(org.apache.wicket.model.IModel<String> model,
                    boolean enabled)
Constructor

Parameters:
model - the button's text model
enabled - indicates whether the button is enabled

DialogButton

public DialogButton(org.apache.wicket.model.IModel<String> model,
                    String icon,
                    boolean enabled)
Constructor

Parameters:
model - the button's text model
icon - the button's icon
enabled - indicates whether the button is enabled
Method Detail

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.ajax.AjaxRequestTarget target)
Sets the enable state of the button

Parameters:
enabled - true or false
target - the AjaxRequestTarget

setVisible

public void setVisible(boolean visible,
                       org.apache.wicket.ajax.AjaxRequestTarget target)
Sets the visible state of the button

Parameters:
visible - true or false
target - the AjaxRequestTarget

getMarkupId

protected String getMarkupId()
Gets the markupId of the specified button.
This can be used to enable/disable the button

Returns:
the markupId

hashCode

public int hashCode()
Overrides:
hashCode in class Object

equals

public boolean equals(Object object)
Indicates whether this DialogButton is equal to another DialogButton. Are considered equals buttons having the same text representation (toString()), which is the text supplied to the constructor (if not overridden).

Overrides:
equals in class Object
Parameters:
object - either a DialogButton or a String
Returns:
true if considered as equal

toString

public String toString()
Overrides:
toString in class Object


Copyright © 2013 7thWeb. All Rights Reserved.