Esempio n. 1
0
 /** Set the text colour. */
 protected void setTextColour(Color colour) {
   if (colour != null) {
     xTextField.setTextColour(colour);
     yTextField.setTextColour(colour);
     colourIcon.setMainColour(colour);
     colourButton.repaint();
     astAxisLabels.setColour(colour);
   }
 }
Esempio n. 2
0
  /** 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);
  }