コード例 #1
0
  public void updateScatterPlot() {
    if (!daModel.isRegressionMode()) {
      return;
    }
    metaPlotPanel.clear();
    plotPanelNorth.clear();
    plotPanelSouth.clear();

    plotPanelSouth.add(LayoutUtil.panelRow(lblTitleX, fldTitleX));
    plotPanelNorth.add(LayoutUtil.panelRow(lblTitleY, fldTitleY));

    metaPlotPanel.add(plotPanelNorth);
    metaPlotPanel.add(plotPanel.getComponent());
    metaPlotPanel.add(plotPanelSouth);
  }
コード例 #2
0
  /** Sets the labels to the current language */
  public void setLabels() {

    createDisplayTypeComboBox();

    lblStart.setText(loc.getMenu("Start") + " ");
    lblWidth.setText(loc.getMenu("Width") + " ");
    if (daModel.isRegressionMode()) {
      lblTitleX.setText(loc.getMenu("Column.X") + ": ");
      lblTitleY.setText(loc.getMenu("Column.Y") + ": ");
    }
    lblAdjust.setText(loc.getMenu("Adjustment") + ": ");

    optionsPanel.setLabels();
    btnOptions.setToolTipText(loc.getMenu("Options"));
  }
コード例 #3
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);
    }
  }