Page 1 of 1

ChartMouseListener and zoom

Posted: Wed Sep 08, 2010 7:54 am
by 15351658
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
}

Re: ChartMouseListener and zoom

Posted: Fri Sep 10, 2010 7:38 am
by yeray
Hi Juergen,

I could reproduce it and I've added it to the defect list to be fixed in future releases (TJ71015144).