Squiz Matrix  4.12.2
 All Data Structures Namespaces Functions Variables Pages
ImageCanvas Class Reference
Inheritance diagram for ImageCanvas:

Public Member Functions

 ImageCanvas (ImagePlus imp)
 
ImagePlus getImagePlus ()
 
void setImageUpdated ()
 
void update (Graphics g)
 
void paintComponent (Graphics g)
 
Point getCursorLoc ()
 
int getModifiers ()
 
void setCursor (int sx, int sy, int ox, int oy)
 
int offScreenX (int x)
 
int offScreenY (int y)
 
int screenX (int x)
 
int screenY (int y)
 
double getMagnification ()
 
void setMagnification (double magnification)
 
Rectangle getSrcRect ()
 
void zoomIn (int x, int y)
 
void zoomOut (int x, int y)
 
void mousePressed (MouseEvent e)
 
void mouseExited (MouseEvent e)
 
void mouseDragged (MouseEvent e)
 
void mouseReleased (MouseEvent e)
 
void mouseMoved (MouseEvent e)
 
void mouseClicked (MouseEvent e)
 
void mouseEntered (MouseEvent e)
 
void copy (boolean cut)
 
void paste ()
 

Static Public Attributes

static boolean usePointer = Prefs.usePointerCursor
 

Protected Member Functions

void setDrawingColor (int ox, int oy, boolean setBackground)
 
void handlePopupMenu (MouseEvent e)
 

Protected Attributes

ImagePlus imp
 
boolean imageUpdated
 
Rectangle srcRect
 
int imageWidth
 
int xMouse
 
int yMouse
 

Static Protected Attributes

static Cursor defaultCursor = new Cursor(Cursor.DEFAULT_CURSOR)
 
static Cursor handCursor = new Cursor(Cursor.HAND_CURSOR)
 
static Cursor moveCursor = new Cursor(Cursor.MOVE_CURSOR)
 
static Cursor crosshairCursor = new Cursor(Cursor.CROSSHAIR_CURSOR)
 
static ImagePlus clipboard
 

Detailed Description

This is a Canvas used to display images in a Window.

Definition at line 15 of file ImageCanvas.java.

Member Function Documentation

void copy ( boolean  cut)
inline

Copies the current ROI to the clipboard. The entire image is copied if there is no ROI.

Definition at line 518 of file ImageCanvas.java.

Point getCursorLoc ( )
inline

Returns the current cursor location.

Definition at line 115 of file ImageCanvas.java.

int getModifiers ( )
inline

Returns the mouse event modifiers.

Definition at line 120 of file ImageCanvas.java.

int offScreenX ( int  x)
inline

Converts a screen x-coordinate to an offscreen x-coordinate.

Definition at line 154 of file ImageCanvas.java.

int offScreenY ( int  y)
inline

Converts a screen y-coordinate to an offscreen y-coordinate.

Definition at line 159 of file ImageCanvas.java.

int screenX ( int  x)
inline

Converts an offscreen x-coordinate to a screen x-coordinate.

Definition at line 164 of file ImageCanvas.java.

int screenY ( int  y)
inline

Converts an offscreen y-coordinate to a screen y-coordinate.

Definition at line 169 of file ImageCanvas.java.

void setCursor ( int  sx,
int  sy,
int  ox,
int  oy 
)
inline

Sets the cursor based on the current tool and cursor location.

Definition at line 125 of file ImageCanvas.java.

void setImageUpdated ( )
inline

ImagePlus.updateAndDraw calls this method to get paint to update the image from the ImageProcessor.

Definition at line 81 of file ImageCanvas.java.

void zoomIn ( int  x,
int  y 
)
inline

Zooms in by making the window bigger. If we can't make it bigger, then make the srcRect smaller.

Definition at line 219 of file ImageCanvas.java.

void zoomOut ( int  x,
int  y 
)
inline

Zooms out by making srcRect bigger. If we can't make it bigger, then make the window smaller.

Definition at line 233 of file ImageCanvas.java.


The documentation for this class was generated from the following file: