Search in sources :

Example 1 with ToolTip

use of com.extjs.gxt.ui.client.widget.tips.ToolTip 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)

Example 2 with ToolTip

use of com.extjs.gxt.ui.client.widget.tips.ToolTip in project activityinfo by bedatadriven.

the class OutOfSyncStatus method createToolTip.

private void createToolTip() {
    if (this.tip == null) {
        ToolTipConfig config = new ToolTipConfig();
        config.setTitle("Out of Sync");
        config.setText("You have recently sent an update directly to the server.<br>" + "Your change will not be visible locally until you synchronize.");
        config.setShowDelay(1);
        this.tip = new ToolTip(this, config);
    }
}
Also used : ToolTip(com.extjs.gxt.ui.client.widget.tips.ToolTip) ToolTipConfig(com.extjs.gxt.ui.client.widget.tips.ToolTipConfig)

Example 3 with ToolTip

use of com.extjs.gxt.ui.client.widget.tips.ToolTip in project activityinfo by bedatadriven.

the class OutOfSyncStatus method createTip.

private ToolTip createTip() {
    ToolTipConfig config = new ToolTipConfig();
    config.setAnchor("top");
    config.setCloseable(false);
    config.setText("Your local database is out of sync with the server. Please wait while synchronization " + "completes");
    ToolTip tip = new ToolTip();
    tip.update(config);
    return tip;
}
Also used : ToolTip(com.extjs.gxt.ui.client.widget.tips.ToolTip) ToolTipConfig(com.extjs.gxt.ui.client.widget.tips.ToolTipConfig)

Aggregations

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