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
}