Package com.extjs.gxt.ui.client.widget.tips

Examples of com.extjs.gxt.ui.client.widget.tips.ToolTipConfig


    }
  }

  protected void showTooltip(String msg) {
    if (tooltip == null) {
      ToolTipConfig config = new ToolTipConfig();
      config.setAutoHide(false);
      config.setMouseOffset(new int[] {0, 0});
      config.setTitle(getMessages().getErrorTipTitleText());
      config.setAnchor("left");
      tooltip = new ToolTip(this, config);
      tooltip.setMaxWidth(600);
    }
    ToolTipConfig config = tooltip.getToolTipConfig();
    config.setText(msg);
    tooltip.update(config);
    tooltip.enable();
    if (!tooltip.isAttached()) {
      tooltip.show();
      tooltip.el().updateZIndex(0);
View Full Code Here


      return v == 0 ? w : ((double) w / v);
    }
  }

  protected ToolTipConfig getToolTipConfig(int value) {
    ToolTipConfig t = new ToolTipConfig();
    t.setDismissDelay(0);
    t.setText(onFormatValue(value));
    t.setMinWidth(0);
    return t;
  }
View Full Code Here

      }
    };
    item.setIcon(icon);
    item.setTabIndex(-1);

    ToolTipConfig cfg = new ToolTipConfig(toolTipTitle, tt);
    item.setToolTip(cfg);

    if (GXT.isAriaEnabled()) {
      item.setData("gxt-menutext", toolTipTitle);
    }
View Full Code Here

      Listener<ComponentEvent> listener) {
    Button item = new Button();
    item.setIcon(icon);
    item.setTabIndex(-1);

    ToolTipConfig cfg = new ToolTipConfig(toolTipTitle, toolTip);
    item.setToolTip(cfg);

    if (GXT.isAriaEnabled()) {
      item.setData("gxt-menutext", toolTipTitle);
    }
View Full Code Here

        if (GXT.isAriaEnabled()) buttonEl.dom.setTitle(tt);
      }
    };
    item.setTabIndex(-1);

    ToolTipConfig cfg = new ToolTipConfig(toolTipTitle, tt);
    item.setToolTip(cfg);

    if (GXT.isAriaEnabled()) {
      item.setData("gxt-menutext", toolTipTitle);
    }
View Full Code Here

   *
   * @param text the text
   */
  public void setToolTip(String text) {
    if (toolTipConfig == null) {
      toolTipConfig = new ToolTipConfig();
    }
    toolTipConfig.setText(text);
    setToolTip(toolTipConfig);
  }
View Full Code Here

    cp.setHeading("Async TreePanel");
    cp.setLayout(new FitLayout());
    cp.add(tree);
    cp.setSize(315, 400);

    ToolTipConfig config = new ToolTipConfig();
    config.setTitle("Example Information");
    config.setShowDelay(1);
    config.setText("In this example state has been enabled for the tree. When enabled, the expand state of the tree is "
        + "saved and restored using the StateManager. Try refreshing the browser after expanding some nodes in the "
        + "tree. Notice that this works with asynchronous loading of nodes.");

    ToolButton btn = new ToolButton("x-tool-help");
    btn.setToolTip(config);
View Full Code Here

    tree.setSize(400, 400);
    tree.setAutoExpandColumn("name");
    tree.setTrackMouseOver(false);
    cp.add(tree);

    ToolTipConfig config = new ToolTipConfig();
    config.setTitle("Example Information");
    config.setShowDelay(1);
    config.setText("In this example state has been enabled for the treegrid. When enabled, the expand state of the treegrid is "
        + "saved and restored using the StateManager. Try refreshing the browser after expanding some nodes in the "
        + "treegrid. Notice that this works with asynchronous loading of nodes.");

    ToolButton btn = new ToolButton("x-tool-help");
    btn.setToolTip(config);
View Full Code Here

    super.onRender(parent, pos);
    HorizontalPanel hp = new HorizontalPanel();
    hp.setSpacing(10);

    Button btn = new Button("Basic");
    btn.setToolTip(new ToolTipConfig("Information", "Prints the current document"));
    hp.add(btn);

    btn = new Button("Closable");
    ToolTipConfig config = new ToolTipConfig();
    config.setTitle("Information");
    config.setText("Prints the current document");
    config.setCloseable(true);
    btn.setToolTip(config);
    hp.add(btn);

    btn = new Button("Mouse Tracking");
    config = new ToolTipConfig();
    config.setTitle("Information");
    config.setText("Prints the current document");
    config.setTrackMouse(true);
    btn.setToolTip(config);
    hp.add(btn);

    btn = new Button("Anchor");
    config = new ToolTipConfig();
    config.setTitle("Information");
    config.setText("Prints the current document");
    config.setMouseOffset(new int[] {0, 0});
    config.setAnchor("left");
    btn.setToolTip(config);
    hp.add(btn);

    btn = new Button("Custom");
    config = new ToolTipConfig();
    config.setText("Prints the current document");
    config.setTitle("Template Tip");
    config.setMouseOffset(new int[] {0, 0});
    config.setAnchor("left");
    config.setTemplate(new Template(getTemplate(GWT.getHostPageBaseURL())));
    config.setCloseable(true);
    config.setMaxWidth(415);
    btn.setToolTip(config);
    hp.add(btn);

    add(hp);
  }
View Full Code Here

    }

    public void setNode(GWTJahiaNode node) {
        super.setNode(node);
        if (node.isShared()) {
            this.setToolTip(new ToolTipConfig(Messages.get("info_important", "Important"), Messages.get("info_sharednode", "This is a shared node")));
        }
    }
View Full Code Here

TOP

Related Classes of com.extjs.gxt.ui.client.widget.tips.ToolTipConfig

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.