コード例 #1
0
 public void setActiveToolbar(Integer viewID) {
   if (activeToolbar == viewID) {
     return;
   }
   activeToolbar = viewID;
   for (ToolBarW bar : toolbars) {
     bar.setActiveView(viewID);
   }
 }
コード例 #2
0
  /** Update toolbars. */
  public void updateToolbarPanel() {
    toolBPanel.clear();
    for (ToolBarW toolbar : toolbars) {
      if (toolbar != null) {
        toolbar.buildGui();
        // TODO
        // toolbarPanel.add(toolbar, Integer.toString(getViewId(toolbar)));
        toolBPanel.add(toolbar);
      }
    }

    // TODO
    // toolbarPanel.show(Integer.toString(activeToolbar));
    onResize();
    toolBPanel.setVisible(true);
  }
コード例 #3
0
  /**
   * Initialization of the GGWToolbar.
   *
   * @param app1 application
   */
  public void init(AppW app1) {

    this.inited = true;
    this.app = app1;
    toolbars = new ArrayList<ToolBarW>();
    toolBar = new ToolBarW(this);
    toolBPanel = new FlowPanel();
    toolBarPanel.add(toolBar);
    toolBarPanel.add(toolBPanel);
    toolBarPanel.addStyleName("toolbarPanel");
    if (app.isExam()) {
      toolBarPanel.addStyleName("toolbarPanelExam");
    }
    toolBPanel.setStyleName("toolBPanel");

    // toolBarPanel.setSize("100%", "100%");
    toolBar.init(app1);
    addToolbar(toolBar);

    // Adds the Open and Options Button for SMART

    addRightButtonPanel();
  }
コード例 #4
0
 /**
  * @param toolbar
  * @return The ID of the dock panel associated with the passed toolbar or -1
  */
 private static int getViewId(ToolBarW toolbar) {
   return (toolbar.getDockPanel() != null ? toolbar.getDockPanel().getViewId() : -1);
 }