insensa.view.image
Class ScatterPlotViewer

java.lang.Object
  extended by insensa.view.image.AbstractImageView
      extended by insensa.view.image.ScatterPlotViewer
All Implemented Interfaces:
IImageView, IRasterFileImageView

public class ScatterPlotViewer
extends AbstractImageView
implements IRasterFileImageView


Nested Class Summary
private  class ScatterPlotViewer.FormularComponent
           
 class ScatterPlotViewer.legendMotionListener
           
 class ScatterPlotViewer.legendMouseAdapter
           
 
Field Summary
private  org.jfree.chart.ChartPanel chartPanel
           
private  java.awt.Dimension dimension
           
private  javax.swing.JComponent formularComponent
           
private  ImageFrame imageFrame
           
private  javax.swing.JLabel label
           
private  double maxValue
           
private  javax.swing.JCheckBoxMenuItem menuItemFormular
           
private  javax.swing.JCheckBoxMenuItem menuItemRegLine
           
private  double minValue
           
private  java.awt.Point offset
           
private  javax.swing.JPanel panel
           
private  org.jfree.chart.plot.XYPlot plot
           
private  int pointCount
           
private  java.awt.Point position
           
private  javax.swing.JProgressBar progressBar
           
private  java.util.List<CRasterFileInformation> rasterFileList
           
private  org.jfree.data.xy.XYDataset regDataset
           
private  double[] regValues
           
 
Fields inherited from class insensa.view.image.AbstractImageView
title, view
 
Constructor Summary
ScatterPlotViewer()
           
 
Method Summary
 void addRasterFileInformation(CRasterFileInformation rasterFile)
           
 void addrasterFileinformation(java.util.List<CRasterFileInformation> rasterFileList)
           
 java.awt.image.BufferedImage createBufferedImage(javax.swing.JComponent component, int imageType)
           
private  void createChart()
           
private  org.jfree.data.xy.XYDataset createData()
           
 ImageComponent[] getChildComponents()
          This method will be used by the ImageFrame to put Components in separate Layers.
 javax.swing.JComponent getComponent()
          returns the main JComponent (parent JComponent).
 javax.swing.JComponent getDropTargetComponent()
          Return a JComponent that can be used as a target for Drop actions
 javax.swing.ImageIcon getFrameIcon()
           
 ImageFrame getImageFrame()
           
 void initImage(java.awt.Dimension componentDim)
          This method will be executed by the Controller.
 void onDropObjects(java.util.List<java.lang.Object> objectList)
          This method allows to deal with Objects droped on the JComponent previsiuly defined in IImageView.getDropTargetComponent().
 void refresh(java.awt.Dimension dim)
          Gets called if the refresh button is pressed or if a refresh is necessary
 void resizeImage(java.awt.Dimension dim)
          Gets called whenever the ImageFrame is resizing.
 void setImageFrame(ImageFrame parent)
          Reference to the ImageFrame
 void startView(java.awt.Dimension dim, java.awt.Dimension componentDimension)
          This is a secondary starting progress.
 
Methods inherited from class insensa.view.image.AbstractImageView
setCView, setTitle
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface insensa.view.image.IImageView
setCView, setTitle
 

Field Detail

rasterFileList

private java.util.List<CRasterFileInformation> rasterFileList

pointCount

private int pointCount

position

private java.awt.Point position

offset

private java.awt.Point offset

chartPanel

private org.jfree.chart.ChartPanel chartPanel

panel

private javax.swing.JPanel panel

label

private javax.swing.JLabel label

progressBar

private javax.swing.JProgressBar progressBar

dimension

private java.awt.Dimension dimension

minValue

private double minValue

maxValue

private double maxValue

regDataset

private org.jfree.data.xy.XYDataset regDataset

plot

private org.jfree.chart.plot.XYPlot plot

formularComponent

private javax.swing.JComponent formularComponent

imageFrame

private ImageFrame imageFrame

menuItemRegLine

private javax.swing.JCheckBoxMenuItem menuItemRegLine

menuItemFormular

private javax.swing.JCheckBoxMenuItem menuItemFormular

regValues

private double[] regValues
Constructor Detail

ScatterPlotViewer

public ScatterPlotViewer()
Method Detail

addrasterFileinformation

public void addrasterFileinformation(java.util.List<CRasterFileInformation> rasterFileList)
Specified by:
addrasterFileinformation in interface IRasterFileImageView
See Also:
IRasterFileImageView.addrasterFileinformation(java.util.List)

addRasterFileInformation

public void addRasterFileInformation(CRasterFileInformation rasterFile)
Specified by:
addRasterFileInformation in interface IRasterFileImageView
See Also:
IRasterFileImageView.addRasterFileInformation(insensa.CRasterFileInformation)

createBufferedImage

public java.awt.image.BufferedImage createBufferedImage(javax.swing.JComponent component,
                                                        int imageType)
Parameters:
component -
imageType -
Returns:

createChart

private void createChart()

createData

private org.jfree.data.xy.XYDataset createData()
                                        throws java.io.IOException
Returns:
Throws:
java.io.IOException

getChildComponents

public ImageComponent[] getChildComponents()
Description copied from interface: IImageView
This method will be used by the ImageFrame to put Components in separate Layers. The Image Frame will do this automatically. The order in the array will be the same as the corresponding layer

Specified by:
getChildComponents in interface IImageView
Returns:
any child components that should be put in different layers of an ImageFrame
See Also:
IImageView.getChildComponents()

getComponent

public javax.swing.JComponent getComponent()
Description copied from interface: IImageView
returns the main JComponent (parent JComponent). (eg JPanel, JScrollPane...)

Specified by:
getComponent in interface IImageView
Returns:
the main (parent) JComponent
See Also:
IImageView.getComponent()

getDropTargetComponent

public javax.swing.JComponent getDropTargetComponent()
Description copied from interface: IImageView
Return a JComponent that can be used as a target for Drop actions

Specified by:
getDropTargetComponent in interface IImageView
Returns:
a JComponent uses as DropTarget
See Also:
IImageView.getDropTargetComponent()

getFrameIcon

public javax.swing.ImageIcon getFrameIcon()
Specified by:
getFrameIcon in interface IImageView
Returns:
Frame icon, displayed in the internal frame
See Also:
IImageView.getFrameIcon()

getImageFrame

public ImageFrame getImageFrame()
Specified by:
getImageFrame in interface IImageView
Returns:
the stored ImageFrame
See Also:
IImageView.getImageFrame()

initImage

public void initImage(java.awt.Dimension componentDim)
               throws java.io.IOException
Description copied from interface: IImageView
This method will be executed by the Controller. All initial functions, e.g. Creating Component and View Components should take place here. This method should never be empty. initImage is the first method in the creation process and gets called before startView or any resizing method

Specified by:
initImage in interface IImageView
Parameters:
componentDim - the dimension of the parent ImageFrame
Throws:
java.io.IOException
See Also:
IImageView.initImage(java.awt.Dimension)

onDropObjects

public void onDropObjects(java.util.List<java.lang.Object> objectList)
                   throws java.io.IOException
Description copied from interface: IImageView
This method allows to deal with Objects droped on the JComponent previsiuly defined in IImageView.getDropTargetComponent().
For example, it could be a List of IInfoReader or CRasterFileInformation

Specified by:
onDropObjects in interface IImageView
Throws:
java.io.IOException
See Also:
IImageView.onDropObjects(java.util.List)

refresh

public void refresh(java.awt.Dimension dim)
             throws java.io.IOException
Description copied from interface: IImageView
Gets called if the refresh button is pressed or if a refresh is necessary

Specified by:
refresh in interface IImageView
Parameters:
dim - The inner dimension of the ImageFrame
Throws:
java.io.IOException
See Also:
IImageView.refresh(java.awt.Dimension)

resizeImage

public void resizeImage(java.awt.Dimension dim)
                 throws java.io.IOException
Description copied from interface: IImageView
Gets called whenever the ImageFrame is resizing.

It gets also called ones after this View is placed into the ImageFrame.
(after the initImage and startView processes)

Specified by:
resizeImage in interface IImageView
Parameters:
dim - The inner dimension of the ImageFrame
Throws:
java.io.IOException
See Also:
IImageView.resizeImage(java.awt.Dimension)

setImageFrame

public void setImageFrame(ImageFrame parent)
Description copied from interface: IImageView
Reference to the ImageFrame

Specified by:
setImageFrame in interface IImageView
See Also:
IImageView.setImageFrame(insensa.view.image.ImageFrame)

startView

public void startView(java.awt.Dimension dim,
                      java.awt.Dimension componentDimension)
               throws java.io.IOException
Description copied from interface: IImageView
This is a secondary starting progress. Could be useful for starting new Threads. Functions that do not need a secondary starting progress, this method can left empty. In that case you only have to use the method IImageView.initImage(Dimension)

Specified by:
startView in interface IImageView
Parameters:
dim - The Dimension of the Internal Frame
componentDimension - The Component Dimension
Throws:
java.io.IOException - IImageView.initImage(Dimension)
See Also:
IImageView.startView(java.awt.Dimension, java.awt.Dimension)