insensa.view.image
Interface IImageView

All Known Subinterfaces:
IConnectionImageView, IFileImageView, IInfoReaderImageView, IRasterFileImageView
All Known Implementing Classes:
AbstractImageView, AbstractInfoReaderImageMap, ImageChartTestPlugin, ImageMapBreaks, ScatterPlotViewer

public interface IImageView

Interface for Creating a new Window by Drop Down Action. This Interface can be used by every view that uses a JComponent as main frame (eg. JPanel,JScrollPane...)!
Usually you don't implement this Interface directly but use the Sub-Interfaces for a specific object.

Author:
dennis
See Also:
IInfoReaderImageView, IConnectionImageView, IRasterFileImageView

Method Summary
 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()
          Deprecated. this should't be usefull
 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 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 setCView(CView view)
          Reference to the CView
 void setImageFrame(ImageFrame parent)
          Reference to the ImageFrame
 void setTitle(java.lang.String title)
          Sets the title for this ImageFrame.
 void startView(java.awt.Dimension dim, java.awt.Dimension componentDimension)
          This is a secondary starting progress.
 

Method Detail

getChildComponents

ImageComponent[] getChildComponents()
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

Returns:
any child components that should be put in different layers of an ImageFrame

getComponent

javax.swing.JComponent getComponent()
returns the main JComponent (parent JComponent). (eg JPanel, JScrollPane...)

Returns:
the main (parent) JComponent

getDropTargetComponent

javax.swing.JComponent getDropTargetComponent()
Return a JComponent that can be used as a target for Drop actions

Returns:
a JComponent uses as DropTarget

getFrameIcon

javax.swing.ImageIcon getFrameIcon()
Returns:
Frame icon, displayed in the internal frame

getImageFrame

ImageFrame getImageFrame()
Deprecated. this should't be usefull

Returns:
the stored ImageFrame

initImage

void initImage(java.awt.Dimension componentDim)
               throws java.io.IOException
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

Parameters:
componentDim - the dimension of the parent ImageFrame
Throws:
java.io.IOException
See Also:
ImageFrame, Dimension

onDropObjects

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

Parameters:
objectList -
Throws:
java.io.IOException

refresh

void refresh(java.awt.Dimension dim)
             throws java.io.IOException
Gets called if the refresh button is pressed or if a refresh is necessary

Parameters:
dim - The inner dimension of the ImageFrame
Throws:
java.io.IOException

resizeImage

void resizeImage(java.awt.Dimension dim)
                 throws java.io.IOException
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)

Parameters:
dim - The inner dimension of the ImageFrame
Throws:
java.io.IOException

setCView

void setCView(CView view)
Reference to the CView

Parameters:
insensa.view -
See Also:
CView

setImageFrame

void setImageFrame(ImageFrame parent)
Reference to the ImageFrame

Parameters:
parent -
See Also:
ImageFrame

setTitle

void setTitle(java.lang.String title)
Sets the title for this ImageFrame.

Parameters:
title -

startView

void startView(java.awt.Dimension dim,
               java.awt.Dimension componentDimension)
               throws java.io.IOException
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 initImage(Dimension)

Parameters:
dim - The Dimension of the Internal Frame
componentDimension - The Component Dimension
Throws:
java.io.IOException - initImage(Dimension)