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);
}
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;
}
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);
}
Aggregations