public void setLabels() { // titled borders classesPanel.setBorder(BorderFactory.createTitledBorder(loc.getMenu("Classes"))); showPanel.setBorder(BorderFactory.createTitledBorder(loc.getMenu("Show"))); freqPanel.setBorder(BorderFactory.createTitledBorder(loc.getMenu("FrequencyType"))); dimPanel.setBorder(BorderFactory.createTitledBorder(loc.getPlain("Dimensions"))); coordPanel.setBorder(BorderFactory.createTitledBorder(loc.getMenu("Coordinate Mode"))); // histogram options ckManual.setText(loc.getMenu("SetClasssesManually")); lblFreqType.setText(loc.getMenu("FrequencyType") + ":"); rbFreq.setText(loc.getMenu("Count")); rbNormalized.setText(loc.getMenu("Normalized")); rbRelative.setText(loc.getMenu("Relative")); ckCumulative.setText(loc.getMenu("Cumulative")); lblOverlay.setText(loc.getMenu("Overlay")); ckOverlayNormal.setText(loc.getMenu("NormalCurve")); ckOverlayPolygon.setText(loc.getMenu("FrequencyPolygon")); ckShowFrequencyTable.setText(loc.getMenu("FrequencyTable")); ckShowHistogram.setText(loc.getMenu("Histogram")); lblClassRule.setText(loc.getMenu("ClassRule") + ":"); rbRightRule.setText(loc.getMenu("RightClassRule")); rbLeftRule.setText(loc.getMenu("LeftClassRule")); // bar chart lblBarWidth.setText(loc.getMenu("Width")); ckAutoBarWidth.setText(loc.getMenu("AutoDimension")); // graph options ckAutoWindow.setText(loc.getMenu("AutoDimension")); ckShowGrid.setText(loc.getMenu("ShowGrid")); lblXMin.setText(loc.getMenu("xmin") + ":"); lblXMax.setText(loc.getMenu("xmax") + ":"); lblYMin.setText(loc.getMenu("ymin") + ":"); lblYMax.setText(loc.getMenu("ymax") + ":"); lblXInterval.setText(loc.getMenu("xstep") + ":"); lblYInterval.setText(loc.getMenu("ystep") + ":"); rbStandToStand.setText(loc.getMenu("Standard To Standard")); rbLogToStand.setText(loc.getMenu("Logarithmic To Standard")); rbStandToLog.setText(loc.getMenu("Standard To Logarithmic")); rbLogToLog.setText(loc.getMenu("Logarithmic To Logarithmic")); // scatterplot options ckShowLines.setText(loc.getMenu("LineGraph")); // boxplot options ckShowOutliers.setText(loc.getMenu("ShowOutliers")); repaint(); }
/** Draws the regression equation into the regression equation JLabel icon */ public void setRegressionEquationLabel() { // get the LaTeX string for the regression equation String eqn; // GeoElement geoRegression = statDialog.getRegressionModel(); try { // prepare number format StringTemplate highPrecision; if (daModel.getPrintDecimals() >= 0) highPrecision = StringTemplate.printDecimals(StringType.LATEX, daModel.getPrintDecimals(), false); else highPrecision = StringTemplate.printFigures(StringType.LATEX, daModel.getPrintFigures(), false); // no regression if (daModel.getRegressionMode().equals(Regression.NONE) || statDialog.getRegressionModel() == null) { eqn = ""; } // nonlinear else { eqn = "y = " + statDialog.getRegressionModel().getFormulaString(highPrecision, true); } } catch (Exception e) { e.printStackTrace(); eqn = "\\text{" + loc.getPlain("NotAvailable") + "}"; } // create an icon with the LaTeX string ImageIcon icon = GeoGebraIconD.createLatexIcon(app, eqn, this.getFont(), false, Color.RED, null); // set the label icon with our equation string lblRegEquation.setIcon(icon); lblRegEquation.revalidate(); updateGUI(); }
/** * create the focus panel (composed of titleLabel, and, for EuclidianDockPanels, focus icon) * * @return the focus panel */ protected JComponent createFocusPanel() { titleLabel = new JLabel(loc.getPlain(title)); titleLabel.setFont(app.getPlainFont()); titleLabel.setForeground(Color.darkGray); JPanel p = new JPanel(new FlowLayout(app.flowLeft(), 2, 1)); if (app.getLocalization().isRightToLeftReadingOrder()) { p.add(titleLabel); p.add(Box.createHorizontalStrut(2)); if (this.hasStyleBar) { p.add(this.toggleStyleBarButton); } } else { if (this.hasStyleBar) { p.add(this.toggleStyleBarButton); } p.add(Box.createHorizontalStrut(2)); p.add(titleLabel); } return p; }
/** @return title in plain style */ protected String getPlainTitle() { return loc.getPlain(title); }