Example usage for org.apache.wicket.markup.html.link AbstractLink isEnabled

List of usage examples for org.apache.wicket.markup.html.link AbstractLink isEnabled

Introduction

In this page you can find the example usage for org.apache.wicket.markup.html.link AbstractLink isEnabled.

Prototype

public boolean isEnabled() 

Source Link

Document

Gets whether this component is enabled.

Usage

From source file:org.geoserver.web.resources.PageResourceBrowser.java

License:Open Source License

/**
 * Enable/disable a button/* w ww. ja  v a 2  s . c o m*/
 * 
 * @param button the button
 * @param enabled enabled state
 */
protected static void enable(AbstractLink button, boolean enabled) {
    if (enabled != button.isEnabled()) {
        button.setEnabled(enabled);
        if (enabled) {
            button.remove(DISABLED_BEHAVIOR);
        } else {
            button.add(DISABLED_BEHAVIOR);
        }
    }
}