ChartMouseListener and zoom

TeeChart for Java (NetBeans, Eclipse, Android Studio, etc)
Post Reply
Juergen
Newbie
Newbie
Posts: 6
Joined: Fri Feb 06, 2009 12:00 am

ChartMouseListener and zoom

Post by Juergen » Wed Sep 08, 2010 7:54 am

Hi,
after adding ChartMouseListener i can't zoom with mouse. Is there a possibility still to use it?

juergen

for example part of code:

Code: Select all

public class myTChart extends TChart
{
	public myTChart()
	{
		super();

		// .... blablabla

		initialize();
	}



	private boolean initialize()
	{
		boolean bSuccess = false;

		// ... some settings
		
		this.setVisible(true);
		
		// -----------------------------------------------------------------
		// Mouse-Events ...

		this.addMouseListener(new MouseListener()
		{
			@Override // Mouseclick (|-> Fkt. mousePressed(...))
			public void mouseClicked(MouseEvent m)
			{
				// ... do something ...
			}
			@Override
			public void mouseEntered(MouseEvent m){}
			@Override
			public void mouseExited(MouseEvent m){}
			@Override // Mousebutton-down ...
			public void mousePressed(MouseEvent m)
			{
				// ... do something ...
			}
			@Override // Mousebutton up ...
			public void mouseReleased(MouseEvent m)
			{
				//  ... do something ...
			}
		});
		
		this.addMouseMotionListener(new MouseMotionListener()
		{
			@Override
			public void mouseDragged(MouseEvent e)
			{
				// ... do something ...
			}
			@Override
			public void mouseMoved(MouseEvent e)
			{
				// ... do something ...
			}
		});
		
		this.addChartMotionListener(new ChartMotionListener() 
		{
			@Override
         		public void scrolled(ChartEvent e) {}
			@Override
			public void zoomed(ChartEvent e) {}
			@Override
			public void unzoomed(ChartEvent e) 
			{
			 	// ... do something ...
			}
	           
   	     });
		
//	*** PROBLEM IS HERE ******************************************************************************************

		this.addChartMouseListener(new ChartMouseListener()
		{

			@Override
			public void axesClicked(ChartMouseEvent e){}
			@Override
			public void backgroundClicked(ChartMouseEvent e)
			{
				// ... do something ...
			}
			@Override
			public void legendClicked(ChartMouseEvent e){}
			@Override
			public void titleClicked(ChartMouseEvent e){}
		});
// *********************************************************************************************************		
 
		return bSuccess;
	}


	// ... blablabla
}

Yeray
Site Admin
Site Admin
Posts: 8746
Joined: Tue Dec 05, 2006 12:00 am
Location: Girona, Catalonia
Contact:

Re: ChartMouseListener and zoom

Post by Yeray » Fri Sep 10, 2010 7:38 am

Hi Juergen,

I could reproduce it and I've added it to the defect list to be fixed in future releases (TJ71015144).
Best Regards,
ImageYeray Alonso
Development & Support
Steema Software
Av. Montilivi 33, 17003 Girona, Catalonia (SP)
Image Image Image Image Image Image Please read our Bug Fixing Policy

Post Reply