/** Update interface to reflect values of the current AstAxisLabel. */ protected void updateFromAstAxisLabels() { // Nothing in this method should change astAxisLabels, but // we'll switch off the ChangeListener anyway. astAxisLabels.removeChangeListener(this); xShowLabel.setSelected(astAxisLabels.getXShown()); if (!inhibitXDocumentListener) { xTextField.setText(astAxisLabels.getXLabel()); } yShowLabel.setSelected(astAxisLabels.getYShown()); if (!inhibitYDocumentListener) { yTextField.setText(astAxisLabels.getYLabel()); } xTextField.setTextFont(astAxisLabels.getFont()); yTextField.setTextFont(astAxisLabels.getFont()); fontControls.setFont(astAxisLabels.getFont()); xTextField.setTextColour(astAxisLabels.getColour()); yTextField.setTextColour(astAxisLabels.getColour()); colourIcon.setMainColour(astAxisLabels.getColour()); colourButton.repaint(); xSpinnerModel.setValue(new Double(astAxisLabels.getXGap())); ySpinnerModel.setValue(new Double(astAxisLabels.getYGap())); if (astAxisLabels.getXEdge() == AstAxisLabels.BOTTOM) { xEdge.setSelectedItem("BOTTOM"); } else { xEdge.setSelectedItem("TOP"); } if (astAxisLabels.getYEdge() == AstAxisLabels.LEFT) { yEdge.setSelectedItem("LEFT"); } else { yEdge.setSelectedItem("RIGHT"); } xUnits.setSelected(astAxisLabels.getShowXUnits()); yUnits.setSelected(astAxisLabels.getShowYUnits()); astAxisLabels.setXState(true); astAxisLabels.setYState(true); astAxisLabels.addChangeListener(this); }
/** Set the Y label. */ public void setYText(String text) { yTextField.setText(text); }
/** Set the X label. */ public void setXText(String text) { xTextField.setText(text); }