Revision 10885 trunk/libraries/libUIComponent/src/org/gvsig/gui/beans/graphic/listeners/GraphicListener.java
GraphicListener.java | ||
---|---|---|
25 | 25 |
import java.awt.event.MouseMotionListener; |
26 | 26 |
|
27 | 27 |
import javax.swing.JLabel; |
28 |
import javax.swing.event.TableModelEvent; |
|
29 | 28 |
|
30 |
import org.gvsig.gui.beans.graphic.GraphicContainer; |
|
31 |
import org.jfree.chart.ChartPanel; |
|
32 |
|
|
33 | 29 |
/** |
34 | 30 |
* |
35 | 31 |
* @author Nacho Brodin <brodin_ign@gva.es> |
36 | 32 |
* |
37 | 33 |
*/ |
38 | 34 |
public class GraphicListener implements MouseListener, ActionListener, MouseMotionListener{ |
39 |
|
|
40 |
private GraphicContainer graphicContainer = null; |
|
41 | 35 |
private boolean move = false; |
42 | 36 |
private JLabel left = null; |
43 | 37 |
private JLabel right = null; |
44 | 38 |
|
45 |
public GraphicListener(GraphicContainer graphicContainer){ |
|
46 |
this.graphicContainer = graphicContainer; |
|
47 |
} |
|
48 |
|
|
49 | 39 |
public void mouseDragged(MouseEvent e) { |
50 | 40 |
if(move){ |
51 | 41 |
if(e.getSource() == left) |
... | ... | |
54 | 44 |
if(e.getSource() == right) |
55 | 45 |
right.setLocation(right.getLocation().x + e.getX(), right.getLocation().y); |
56 | 46 |
} |
57 |
ChartPanel cp = graphicContainer.getPGraphic().getChart(); |
|
47 |
//ChartPanel cp = graphicContainer.getPGraphic().getChart();
|
|
58 | 48 |
|
59 | 49 |
//System.out.println(cp.getScaleX()); |
60 | 50 |
|
... | ... | |
72 | 62 |
this.left = left; |
73 | 63 |
this.right = right; |
74 | 64 |
} |
75 |
|
|
76 |
public void mouseMoved(MouseEvent e) { |
|
77 |
|
|
78 |
} |
|
79 | 65 |
|
80 |
private void initialize(){ |
|
81 |
|
|
82 |
} |
|
83 |
|
|
84 |
public void actionPerformed(ActionEvent e) { |
|
85 |
|
|
86 |
} |
|
87 |
|
|
88 |
public void tableChanged(TableModelEvent e) { |
|
89 |
|
|
90 |
} |
|
91 |
|
|
92 | 66 |
public void mouseClicked(MouseEvent e) { |
67 |
// TODO Auto-generated method stub |
|
93 | 68 |
|
94 | 69 |
} |
95 | 70 |
|
96 | 71 |
public void mouseEntered(MouseEvent e) { |
97 |
|
|
72 |
// TODO Auto-generated method stub |
|
73 |
|
|
98 | 74 |
} |
99 | 75 |
|
100 | 76 |
public void mouseExited(MouseEvent e) { |
101 |
|
|
77 |
// TODO Auto-generated method stub |
|
78 |
|
|
102 | 79 |
} |
103 | 80 |
|
81 |
public void actionPerformed(ActionEvent e) { |
|
82 |
// TODO Auto-generated method stub |
|
83 |
|
|
84 |
} |
|
104 | 85 |
|
105 |
|
|
106 |
} |
|
86 |
public void mouseMoved(MouseEvent e) { |
|
87 |
// TODO Auto-generated method stub |
|
88 |
|
|
89 |
} |
|
90 |
} |
Also available in: Unified diff