Ejemplo n.º 1
0
  private void buildSingleApplicationPanel() {
    if (frame != null) {
      frame.clear();
      frame.add((Widget) getEuclidianViewpanel());
      // we need to make sure trace works after this, see #4373 or #4236
      this.getEuclidianView1().createImage();
      ((DockPanelW) getEuclidianViewpanel()).setVisible(true);
      ((DockPanelW) getEuclidianViewpanel())
          .setEmbeddedSize(getSettings().getEuclidian(1).getPreferredSize().getWidth());
      ((DockPanelW) getEuclidianViewpanel()).updatePanel(false);
      getEuclidianViewpanel()
          .setPixelSize(
              getSettings().getEuclidian(1).getPreferredSize().getWidth(),
              getSettings().getEuclidian(1).getPreferredSize().getHeight());

      // FIXME: temporary hack until it is found what causes
      // the 1px difference
      // getEuclidianViewpanel().getAbsolutePanel().getElement().getStyle().setLeft(1,
      // Style.Unit.PX);
      // getEuclidianViewpanel().getAbsolutePanel().getElement().getStyle().setTop(1,
      // Style.Unit.PX);
      getEuclidianViewpanel()
          .getAbsolutePanel()
          .getElement()
          .getStyle()
          .setBottom(-1, Style.Unit.PX);
      getEuclidianViewpanel()
          .getAbsolutePanel()
          .getElement()
          .getStyle()
          .setRight(-1, Style.Unit.PX);
      oldSplitLayoutPanel = null;
    }
  }
Ejemplo n.º 2
0
 /** Attach algebra input */
 public void attachAlgebraInput() {
   // inputbar's width varies,
   // so it's probably good to regenerate every time
   GGWCommandLine inputbar = new GGWCommandLine();
   inputbar.attachApp(this);
   frame.add(inputbar);
   this.getGuiManager().getAlgebraInput().setInputFieldWidth(this.appletWidth);
 }
Ejemplo n.º 3
0
  private void attachSplitLayoutPanel() {
    boolean oldSLPanelChanged = oldSplitLayoutPanel == getSplitLayoutPanel() ? false : true;
    oldSplitLayoutPanel = getSplitLayoutPanel();

    if (oldSplitLayoutPanel != null) {
      if (getArticleElement().getDataParamShowMenuBar(false)) {
        this.splitPanelWrapper = new HorizontalPanel();
        // TODO
        splitPanelWrapper.add(oldSplitLayoutPanel);
        if (this.menuShowing) {
          splitPanelWrapper.add(frame.getMenuBar(this));
        }
        frame.add(splitPanelWrapper);

      } else {
        frame.add(oldSplitLayoutPanel);
      }
      Browser.removeDefaultContextMenu(getSplitLayoutPanel().getElement());

      if (has(Feature.FIX_KEYBOARD_POSITION) && !oldSLPanelChanged) {
        return;
      }

      ClickStartHandler.init(
          oldSplitLayoutPanel,
          new ClickStartHandler() {
            @Override
            public void onClickStart(int x, int y, final PointerEventType type) {
              updateAVStylebar();

              if (!CancelEventTimer.cancelKeyboardHide()) {
                Timer timer =
                    new Timer() {
                      @Override
                      public void run() {
                        getAppletFrame().keyBoardNeeded(false, null);
                      }
                    };
                timer.schedule(0);
              }
            }
          });
    }
  }