private void updateGUI() { // set updating flag so we don't have to add/remove action listeners isUpdating = true; // histogram/barchart ckManual.setSelected(settings.isUseManualClasses()); rbFreq.setSelected(settings.getFrequencyType() == StatPanelSettings.TYPE_COUNT); rbRelative.setSelected(settings.getFrequencyType() == StatPanelSettings.TYPE_RELATIVE); rbNormalized.setSelected(settings.getFrequencyType() == StatPanelSettings.TYPE_NORMALIZED); rbLeftRule.setSelected(settings.isLeftRule()); ckCumulative.setSelected(settings.isCumulative()); ckOverlayNormal.setSelected(settings.isHasOverlayNormal()); ckOverlayPolygon.setSelected(settings.isHasOverlayPolygon()); ckShowGrid.setSelected(settings.showGrid); ckAutoWindow.setSelected(settings.isAutomaticWindow()); ckShowFrequencyTable.setSelected(settings.isShowFrequencyTable()); ckShowHistogram.setSelected(settings.isShowHistogram()); if (settings.dataSource != null) { ckManual.setVisible(settings.getDataSource().getGroupType() != GroupType.CLASS); freqPanel.setVisible(settings.getDataSource().getGroupType() == GroupType.RAWDATA); } // normal overlay ckOverlayNormal.setEnabled(settings.getFrequencyType() == StatPanelSettings.TYPE_NORMALIZED); // bar chart width ckAutoBarWidth.setSelected(settings.isAutomaticBarWidth()); fldBarWidth.setText("" + settings.getBarWidth()); fldBarWidth.setEnabled(!ckAutoBarWidth.isSelected()); // window dimension lblYMin.setVisible(showYAxisSettings); fldYMin.setVisible(showYAxisSettings); lblYMax.setVisible(showYAxisSettings); fldYMax.setVisible(showYAxisSettings); lblYInterval.setVisible(showYAxisSettings); fldYInterval.setVisible(showYAxisSettings); dimPanel.setEnabled(!ckAutoWindow.isSelected()); fldXMin.setEnabled(!ckAutoWindow.isSelected()); fldXMax.setEnabled(!ckAutoWindow.isSelected()); fldXInterval.setEnabled(!ckAutoWindow.isSelected()); fldYMin.setEnabled(!ckAutoWindow.isSelected()); fldYMax.setEnabled(!ckAutoWindow.isSelected()); fldYInterval.setEnabled(!ckAutoWindow.isSelected()); lblXMin.setEnabled(!ckAutoWindow.isSelected()); lblXMax.setEnabled(!ckAutoWindow.isSelected()); lblXInterval.setEnabled(!ckAutoWindow.isSelected()); lblYMin.setEnabled(!ckAutoWindow.isSelected()); lblYMax.setEnabled(!ckAutoWindow.isSelected()); lblYInterval.setEnabled(!ckAutoWindow.isSelected()); // coordinate mode rbStandToStand.setSelected(settings.getCoordMode() == StatPanelSettings.CoordMode.STANDTOSTAND); rbLogToStand.setSelected(settings.getCoordMode() == StatPanelSettings.CoordMode.LOGTOSTAND); rbStandToLog.setSelected(settings.getCoordMode() == StatPanelSettings.CoordMode.STANDTOLOG); rbLogToLog.setSelected(settings.getCoordMode() == StatPanelSettings.CoordMode.LOGTOLOG); // update automatic dimensions fldXMin.setText("" + daModel.format(settings.xMin)); fldXMax.setText("" + daModel.format(settings.xMax)); fldXInterval.setText("" + daModel.format(settings.xAxesInterval)); fldYMin.setText("" + daModel.format(settings.yMin)); fldYMax.setText("" + daModel.format(settings.yMax)); fldYInterval.setText("" + daModel.format(settings.yAxesInterval)); // show outliers ckShowOutliers.setSelected(settings.isShowOutliers()); isUpdating = false; repaint(); }
/** Clears the X and Y fields of the prediction panel */ public void clearPredictionPanel() { fldInputX.setText(""); fldOutputY.setText(""); }