/**
  * Sets the title.
  *
  * <p>The font names understood are those understood by java.awt.Font.decode(). If the font name
  * is null, the font remains unchanged.
  *
  * @param title
  * @param font_name an optional font name
  */
 public void setTitle(String title, String font_name) {
   axisLabel.setText(title);
   if ((font_name == null) || font_name.equals("")) { // $NON-NLS-1$
     return;
   }
   axisLabel.setFont(Font.decode(font_name));
 }
Exemple #2
0
 public static void main(String[] args) {
   PlotFrame frame =
       new PlotFrame(
           "$\\theta$", "$\\Psi$_{$\\theta$}", "Special Characters: $\\alpha$ to $\\Omega$");
   String inputStr = "Wave function $\\Psi$_{$\\theta$}";
   DrawableTextLine textLine = new DrawableTextLine(inputStr, -8, 0);
   frame.addDrawable(textLine);
   textLine.setFontSize(22);
   textLine.setFontStyle(java.awt.Font.BOLD);
   frame.setVisible(true);
   frame.setDefaultCloseOperation(javax.swing.JFrame.EXIT_ON_CLOSE);
 }
 /** Constructor XYAxis */
 public XYAxis() {
   axisLabel.setJustification(TextLine.CENTER);
   axisLabel.setFont(labelFont);
 }
 /**
  * Sets the title.
  *
  * @param title
  */
 public void setTitle(String title) {
   axisLabel.setText(title);
 }