Example #1
0
  /**
   * Creates the tool bar of myjobs grid
   *
   * @return tool bar
   */
  private ToolBar createToolBar() {
    ToolBar tb = new ToolBar();

    tb.add(createClearAllButton());
    tb.add(new FillToolItem());

    ToolButton info = new ToolButton(ToolButton.QUESTION);
    ToolTipConfig config = new ToolTipConfig(AppPropertiesManager.CONSTANTS.myjobs_grid_tooltip());
    config.setMaxWidth(225);
    info.setToolTipConfig(config);
    tb.add(info);

    return tb;
  }
 @UiHandler({"portlet1Close", "portlet2Close", "portlet3Close", "portlet4Close"})
 protected void onClosePortlet(SelectEvent event) {
   ToolButton tool = (ToolButton) event.getSource();
   Portlet portlet = tool.getData("portlet");
   portlet.removeFromParent();
 }
 @UiFactory
 protected ToolButton createToolButton(ToolConfig icon, Portlet portlet) {
   ToolButton toolButton = new ToolButton(icon.config);
   toolButton.setData("portlet", portlet);
   return toolButton;
 }