コード例 #1
0
 /**
  * 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));
 }
コード例 #2
0
ファイル: GreekCharApp.java プロジェクト: M0nd4/guide
 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);
 }
コード例 #3
0
 /** Constructor XYAxis */
 public XYAxis() {
   axisLabel.setJustification(TextLine.CENTER);
   axisLabel.setFont(labelFont);
 }
コード例 #4
0
 /**
  * Sets the title.
  *
  * @param title
  */
 public void setTitle(String title) {
   axisLabel.setText(title);
 }