org.lyra.Interface.Chart
Class DisplayPanel.Interact

java.lang.Object
  extended by org.lyra.Interface.Chart.DisplayPanel.Interact
All Implemented Interfaces:
java.awt.event.ActionListener, java.awt.event.WindowListener, java.util.EventListener
Enclosing class:
DisplayPanel

private class DisplayPanel.Interact
extends java.lang.Object
implements java.awt.event.ActionListener, java.awt.event.WindowListener

The code separation from the user interface. This Class handles all of the complexities of making the interface interactive.

Author:
Martin Foster

Field Summary
private static java.lang.String CLASS
           
(package private)  org.jfree.chart.ChartPanel myChart
           
 
Constructor Summary
private DisplayPanel.Interact()
           
 
Method Summary
 void actionPerformed(java.awt.event.ActionEvent evt)
           
private  void saveChartAsSVG(java.io.File svgFile, org.jfree.chart.JFreeChart chart, int width, int height)
          Exports a JFreeChart to a SVG file.
 void windowActivated(java.awt.event.WindowEvent e)
           
 void windowClosed(java.awt.event.WindowEvent e)
           
 void windowClosing(java.awt.event.WindowEvent e)
           
 void windowDeactivated(java.awt.event.WindowEvent e)
           
 void windowDeiconified(java.awt.event.WindowEvent e)
           
 void windowIconified(java.awt.event.WindowEvent evt)
           
 void windowOpened(java.awt.event.WindowEvent e)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

CLASS

private static final java.lang.String CLASS
See Also:
Constant Field Values

myChart

org.jfree.chart.ChartPanel myChart
Constructor Detail

DisplayPanel.Interact

private DisplayPanel.Interact()
Method Detail

actionPerformed

public void actionPerformed(java.awt.event.ActionEvent evt)
Specified by:
actionPerformed in interface java.awt.event.ActionListener

windowClosing

public void windowClosing(java.awt.event.WindowEvent e)
Specified by:
windowClosing in interface java.awt.event.WindowListener

windowClosed

public void windowClosed(java.awt.event.WindowEvent e)
Specified by:
windowClosed in interface java.awt.event.WindowListener

windowActivated

public void windowActivated(java.awt.event.WindowEvent e)
Specified by:
windowActivated in interface java.awt.event.WindowListener

windowDeactivated

public void windowDeactivated(java.awt.event.WindowEvent e)
Specified by:
windowDeactivated in interface java.awt.event.WindowListener

windowDeiconified

public void windowDeiconified(java.awt.event.WindowEvent e)
Specified by:
windowDeiconified in interface java.awt.event.WindowListener

windowIconified

public void windowIconified(java.awt.event.WindowEvent evt)
Specified by:
windowIconified in interface java.awt.event.WindowListener

windowOpened

public void windowOpened(java.awt.event.WindowEvent e)
Specified by:
windowOpened in interface java.awt.event.WindowListener

saveChartAsSVG

private void saveChartAsSVG(java.io.File svgFile,
                            org.jfree.chart.JFreeChart chart,
                            int width,
                            int height)
                     throws java.io.IOException
Exports a JFreeChart to a SVG file.

Parameters:
svgFile - the output file.
chart - JFreeChart to export.
width - Integer containing width dimension.
height - Integer containing height dimension.
Throws:
java.io.IOException - if writing the svgFile fails.