Search in sources :

Example 1 with ToggleButton

use of com.extjs.gxt.ui.client.widget.button.ToggleButton in project activityinfo by bedatadriven.

the class ChartTypeGroup method addButton.

private void addButton(Type type, AbstractImagePrototype icon) {
    ToggleButton button = new ToggleButton("", icon);
    button.setToggleGroup(TYPE_DATA);
    button.setData(TYPE_DATA, type);
    button.addSelectionListener(listener);
    buttons.add(button);
}
Also used : ToggleButton(com.extjs.gxt.ui.client.widget.button.ToggleButton)

Example 2 with ToggleButton

use of com.extjs.gxt.ui.client.widget.button.ToggleButton in project activityinfo by bedatadriven.

the class ActionToolBar method addToggleButton.

public ToggleButton addToggleButton(String actionId, String text, AbstractImagePrototype icon) {
    ToggleButton button = new ToggleButton(text, icon);
    button.setItemId(actionId);
    button.addListener(Events.Select, this);
    add(button);
    return button;
}
Also used : ToggleButton(com.extjs.gxt.ui.client.widget.button.ToggleButton)

Example 3 with ToggleButton

use of com.extjs.gxt.ui.client.widget.button.ToggleButton in project activityinfo by bedatadriven.

the class IndicatorLinkPage method addGalley.

private void addGalley() {
    linkButton = new ToggleButton("", IconImageBundle.ICONS.link());
    linkButton.disable();
    linkButton.setWidth(28);
    linkButton.setHeight(40);
    linkButton.addSelectionListener(new SelectionListener<ButtonEvent>() {

        @Override
        public void componentSelected(ButtonEvent ce) {
            onToggleLink();
        }
    });
    linkButtonTip = new ToolTip(linkButton);
    LayoutContainer container = new LayoutContainer();
    container.setWidth(35);
    container.add(linkButton);
    container.setLayout(new BoxLayout() {

        @Override
        protected void onLayout(Container<?> container, El target) {
            super.onLayout(container, target);
            Size size = target.getStyleSize();
            innerCt.setSize(size.width, size.height, true);
            Component c = container.getItem(0);
            int ch = c.getOffsetHeight();
            setPosition(c, 5, ((int) (size.height * 0.65)) - (ch / 2));
        }
    });
    add(container);
}
Also used : ToolTip(com.extjs.gxt.ui.client.widget.tips.ToolTip) ToggleButton(com.extjs.gxt.ui.client.widget.button.ToggleButton) Size(com.extjs.gxt.ui.client.util.Size) El(com.extjs.gxt.ui.client.core.El)

Aggregations

ToggleButton (com.extjs.gxt.ui.client.widget.button.ToggleButton)3 El (com.extjs.gxt.ui.client.core.El)1 Size (com.extjs.gxt.ui.client.util.Size)1 ToolTip (com.extjs.gxt.ui.client.widget.tips.ToolTip)1