Hello,
Can anyone tell me how to change the color of the Zoom Rectangle? Is it possible without having to override the mouse events?
Thanks in Advance,
Chris
Changing the Color of the Zoom Rectangle
-
- Posts: 13
- Joined: Thu May 18, 2006 6:01 pm
- Location: Washington DC
This is from org/jfree/chart/ChartPanel.java
Code: Select all
2024 private void drawZoomRectangle(Graphics2D g2) {
2025 // Set XOR mode to draw the zoom rectangle
2026 g2.setXORMode(Color.gray);
2027 if (this.zoomRectangle != null) {
2028 if (this.fillZoomRectangle) {
2029 g2.fill(this.zoomRectangle);
2030 }
2031 else {
2032 g2.draw(this.zoomRectangle);
2033 }
2034 }
2035 // Reset to the default 'overwrite' mode
2036 g2.setPaintMode();
2037 }