Footer and setText()

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
Chen
Newbie
Newbie
Posts: 43
Joined: Tue Mar 11, 2008 12:00 am
Contact:

Footer and setText()

Post by Chen » Thu Nov 20, 2008 4:19 pm

Hi,

Why I can not use Tab character in setText() of Footer?

Code: Select all

import javax.swing.JFrame;
import javax.swing.JPanel;

import com.steema.teechart.Footer;
import com.steema.teechart.TChart;
import com.steema.teechart.drawing.Color;
import com.steema.teechart.drawing.StringAlignment;
import com.steema.teechart.legend.LegendStyle;
import com.steema.teechart.styles.Bar;
import com.steema.teechart.styles.CustomBar;

public class Test {

   public static void main(String[] args) {
      JFrame frame = new JFrame();
      JPanel panel = new JPanel();
      panel.setSize(600, 600);
      TChart chart = new TChart();
      chart.getLegend().setVisible(true);
      chart.getLegend().setLegendStyle(LegendStyle.VALUES);
      Footer footer = chart.getFooter();
      footer.setVisible(true);
      footer.setAlignment(StringAlignment.NEAR);
      footer.setAdjustFrame(true);
      footer.setText("Sample Size:12                         "+"\n" +
    		  		 "Std Dev:12.0                 Width:23.4"+"\n"+
    		  		 "Median:10.0                    Min:20.0"+"\n"+
    		  		 "Mean:22                          Max:45"+"\n");
      
//      footer.setText("Sample Size:12\t\t\t\t\t\t"+"\n" +
//		  		 "Std Dev:12.0\t\t\t\tWidth:23.4"+"\n"+
//		  		 "Median:10.0\t\t\t\tMin:20.0"+"\n"+
//		  		 "Mean:22\t\t\t\tMax:45"+"\n");

      footer.getFont().setColor(Color.BLUE);
      footer.getFont().setSize(13);
      footer.getFont().setBold(true);
      CustomBar pareto = new Bar(chart.getChart());
      pareto.add(50, "a");
      pareto.add(50, "b");
      pareto.add(50, "c");
      
      panel.add(chart);
      chart.getChart().getTitle().setText("");
      frame.add(panel);
      frame.setSize(600, 600);
      frame.setVisible(true);
   }
} 
Thanks,
Varun

Narcís
Site Admin
Site Admin
Posts: 14730
Joined: Mon Jun 09, 2003 4:00 am
Location: Banyoles, Catalonia
Contact:

Post by Narcís » Fri Nov 21, 2008 11:09 am

Hi Varun,

I've added your request to the wish-list to be considered for inclusion in next releases.
Best Regards,
Narcís Calvet / Development & Support
Steema Software
Avinguda Montilivi 33, 17003 Girona, Catalonia
Tel: 34 972 218 797
http://www.steema.com
Image Image Image Image Image Image
Instructions - How to post in this forum

Post Reply