com.extjs.gxt.ui.client.widget.button.ToolButton Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of gxt Show documentation
Show all versions of gxt Show documentation
Rich Internet Application Framework for GWT
/*
* Sencha GXT 2.3.1 - Sencha for GWT
* Copyright(c) 2007-2013, Sencha, Inc.
* [email protected]
*
* http://www.sencha.com/products/gxt/license/
*/
package com.extjs.gxt.ui.client.widget.button;
import com.extjs.gxt.ui.client.event.IconButtonEvent;
import com.extjs.gxt.ui.client.event.SelectionListener;
import com.google.gwt.user.client.Element;
/**
* A {@link IconButton} that supports a set of predefined styles.
*
*
* - Supported Styles:
* - .x-tool-close
* - .x-tool-minimize
* - .x-tool-maximize
* - .x-tool-restore
* - .x-tool-gear
* - .x-tool-pin
* - .x-tool-unpin
* - .x-tool-right
* - .x-tool-left
* - .x-tool-up
* - .x-tool-down
* - .x-tool-refresh
* - .x-tool-minus
* - .x-tool-plus
* - .x-tool-search
* - .x-tool-save
* - .x-tool-help
*
*
*
* - Inherited Events:
* - IconButton Select
*
*/
public class ToolButton extends IconButton {
/**
* Creates a new tool button.
*
* @param style the button style
*/
public ToolButton(String style) {
super(style);
}
/**
* Creates a new tool button.
*
* @param style the button style
* @param listener the click listener
*/
public ToolButton(String style, SelectionListener listener) {
super(style, listener);
}
@Override
protected void onRender(Element parent, int pos) {
super.onRender(parent, pos);
removeStyleName("x-icon-btn");
addStyleName("x-tool");
// mark element to not start drags
addStyleName("x-nodrag");
}
}