コード例 #1
0
ファイル: Spielbrett.java プロジェクト: Home-GWT/Memory3
 public Spielbrett() {
   panel.setPixelSize(400, 300);
   // das Panel soll das eigentliche Widget sein
   // und wird nun eingehaengt
   initWidget(panel);
   // Spiel starten
   newGame();
 }
コード例 #2
0
  public void resize(int offsetWidth, int offsetHeight, boolean update) {
    int w = offsetWidth;
    int h = offsetHeight;

    int width = optionsPanel.isVisible() ? w - optionsPanel.getOffsetWidth() - PLOTPANEL_MARGIN : w;
    int height =
        (frequencyTable.isVisible() ? h - spFrequencyTable.getOffsetHeight() : h)
            - lbDisplayType.getOffsetHeight()
            - PLOTPANEL_MARGIN;

    if (daModel.isRegressionMode()) {
      height -= 2 * lblTitleX.getOffsetHeight();
      height -= lblTitleY.getOffsetHeight();
    }

    if (width < PLOTPANEL_MIN_WIDTH) {
      width = PLOTPANEL_MIN_WIDTH;
    }

    if (height < PLOTPANEL_MIN_HEIGHT) {
      height = PLOTPANEL_MIN_HEIGHT;
    }

    if (oldWidth == width && oldHeight == height) {
      return;
    }

    oldWidth = width;
    oldHeight = height;

    plotPanel.setPreferredSize(new GDimensionW(width, height));
    if (optionsPanel.isVisible()) {
      optionsPanel.resize(height);
    }
    plotPanel.updateSize();
    plotPanel.repaintView();
    plotPanel.getEuclidianController().calculateEnvironment();
    if (update) {
      getModel().updatePlot(false);
    }

    if (app.has(Feature.JLM_IN_WEB)) {
      imagePanel.setPixelSize(width, height);

    } else {
      imageContainer.setPixelSize(width, height);
    }
  }
コード例 #3
0
 public void setPanelSize(int width, int height) {
   targetPanel.setPixelSize(width, height);
 }