JSci.instruments
Class TwoROI

java.lang.Object
  extended by java.awt.event.MouseMotionAdapter
      extended by JSci.instruments.ROIAdapter
          extended by JSci.instruments.TwoROI
All Implemented Interfaces:
java.awt.event.MouseListener, java.awt.event.MouseMotionListener, java.util.EventListener, Control, ROI

public class TwoROI
extends ROIAdapter
implements Control

A ROI made by two rectangular regions, one inside the other (two levels of interest)


Field Summary
(package private)  javax.swing.JPanel ccomp
           
 
Constructor Summary
TwoROI()
           
 
Method Summary
 java.awt.Component getControlComponent()
           
 java.awt.Rectangle getOuterRectangle()
           
 java.awt.Shape getShape()
           
static void main(java.lang.String[] args)
          Testing...
 void mouseDragged(java.awt.event.MouseEvent event)
           
 void mouseMoved(java.awt.event.MouseEvent event)
           
 void mousePressed(java.awt.event.MouseEvent event)
           
 void mouseReleased(java.awt.event.MouseEvent event)
           
 void paint(java.awt.Graphics g)
          draws the ROI.
 void setComponent(java.awt.Component c)
          Called by the Player: set the component where to display the ROI
 void setFactor(int f)
          Use this to select the behaviour of the outer rectangle
 void setUseFactor(boolean u)
          Use this to select the behaviour of the outer rectangle
 
Methods inherited from class JSci.instruments.ROIAdapter
mouseClicked, mouseEntered, mouseExited
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ccomp

javax.swing.JPanel ccomp
Constructor Detail

TwoROI

public TwoROI()
Method Detail

setComponent

public void setComponent(java.awt.Component c)
Description copied from interface: ROI
Called by the Player: set the component where to display the ROI

Specified by:
setComponent in interface ROI
Specified by:
setComponent in class ROIAdapter
Parameters:
c - The Component where to display the ROI

paint

public void paint(java.awt.Graphics g)
draws the ROI. Doesn't overwrite the background; call it after the other paint operations

Specified by:
paint in interface ROI
Specified by:
paint in class ROIAdapter
Parameters:
g - the Graphics where to paint the ROI

setUseFactor

public void setUseFactor(boolean u)
Use this to select the behaviour of the outer rectangle

Parameters:
u - The outer rectangle is n-times the inner one?

setFactor

public void setFactor(int f)
Use this to select the behaviour of the outer rectangle

Parameters:
f - The outer rectangle is f-times the inner one.

getShape

public java.awt.Shape getShape()
Specified by:
getShape in interface ROI
Specified by:
getShape in class ROIAdapter
Returns:
the inner rectangle

getOuterRectangle

public java.awt.Rectangle getOuterRectangle()
Returns:
the outer rectangle.

main

public static void main(java.lang.String[] args)
Testing...


getControlComponent

public java.awt.Component getControlComponent()
Specified by:
getControlComponent in interface Control
Returns:
a component that controls this ROI

mousePressed

public void mousePressed(java.awt.event.MouseEvent event)
Specified by:
mousePressed in interface java.awt.event.MouseListener
Overrides:
mousePressed in class ROIAdapter

mouseReleased

public void mouseReleased(java.awt.event.MouseEvent event)
Specified by:
mouseReleased in interface java.awt.event.MouseListener
Overrides:
mouseReleased in class ROIAdapter

mouseMoved

public void mouseMoved(java.awt.event.MouseEvent event)
Specified by:
mouseMoved in interface java.awt.event.MouseMotionListener
Overrides:
mouseMoved in class java.awt.event.MouseMotionAdapter

mouseDragged

public void mouseDragged(java.awt.event.MouseEvent event)
Specified by:
mouseDragged in interface java.awt.event.MouseMotionListener
Overrides:
mouseDragged in class java.awt.event.MouseMotionAdapter