|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--java.awt.Canvas | +--jm.jigl.ImageCanvas
ImageCanvas is a class made to facilitate the displaying of a JIGL image
Nested Class Summary |
Nested classes inherited from class java.awt.Canvas |
java.awt.Canvas.AccessibleAWTCanvas |
Nested classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent, java.awt.Component.BltBufferStrategy, java.awt.Component.FlipBufferStrategy |
Field Summary | |
boolean |
box_draw
Used as a toggle on the ImageCanvas |
protected java.awt.Image |
image
Java image |
protected Image |
jimage
JIGL image |
boolean |
mouse_clicked
Used as a toggle on the ImageCanvas |
int |
mouselx
Lower x corner of the selection box |
int |
mousely
Lower y corner of the selection box |
int |
mouseux
Upper x corner of the selection box |
int |
mouseuy
Upper y corner of the selection box |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
ImageCanvas()
Creates an empty ImageCanvas |
|
ImageCanvas(ComplexImage img)
Creates an ImageCanvas from a ComplexImage |
|
ImageCanvas(GrayImage img)
Creates an ImageCanvas from a GrayImage |
|
ImageCanvas(Image img)
Creates an ImageCanvas from a JIGL Image |
|
ImageCanvas(RealGrayImage img)
Creates an ImageCanvas from a RealGrayImage |
|
ImageCanvas(java.lang.String fname)
Creates an ImageCanvas from a file |
Method Summary | |
Image |
getImage()
Returns the JIGL image |
java.awt.Image |
getImageFromFile(java.lang.String fname)
Gets a JIGL image from a file. |
java.awt.Image |
getJavaImage()
Returns the Java image |
java.awt.Image |
getJavaImage(Image img)
Takes a jigl image as input, converts it to a java image, and returns the java image. |
int |
imHeight()
Returns the image height |
int |
imWidth()
Returns the image width |
void |
paint(java.awt.Graphics g)
Overrides the paint method for smoother redraw |
void |
setDrawBox(boolean value)
Sets the drawing of the Region of Interest box to true or false |
void |
setImage(java.awt.Image img)
Sets the JIGL image to img and Java Image to null |
void |
setImage(Image img)
Sets the JIGL Image and Java Image to img |
java.awt.Graphics |
setOffScreen()
Returns an instance of Graphics that, when modified, modifies the Java image |
java.awt.Graphics |
setOffScreen(double xfactor,
double yfactor)
Returns an instance of Graphics that, when modified, modifies the Java image |
void |
setVisible(boolean b)
Overrides Component.setVisible(boolean) |
void |
update(java.awt.Graphics g)
Repaints the ImageCanvas (including the selection box). |
Methods inherited from class java.awt.Canvas |
addNotify, createBufferStrategy, createBufferStrategy, getAccessibleContext, getBufferStrategy |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addMouseWheelListener, addPropertyChangeListener, addPropertyChangeListener, applyComponentOrientation, areFocusTraversalKeysSet, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, createVolatileImage, createVolatileImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, firePropertyChange, firePropertyChange, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentListeners, getComponentOrientation, getCursor, getDropTarget, getFocusCycleRootAncestor, getFocusListeners, getFocusTraversalKeys, getFocusTraversalKeysEnabled, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getHierarchyBoundsListeners, getHierarchyListeners, getIgnoreRepaint, getInputContext, getInputMethodListeners, getInputMethodRequests, getKeyListeners, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getMinimumSize, getMouseListeners, getMouseMotionListeners, getMouseWheelListeners, getName, getParent, getPeer, getPreferredSize, getPropertyChangeListeners, getPropertyChangeListeners, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, imageUpdate, inside, invalidate, isBackgroundSet, isCursorSet, isDisplayable, isDoubleBuffered, isEnabled, isFocusable, isFocusCycleRoot, isFocusOwner, isFocusTraversable, isFontSet, isForegroundSet, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, paramString, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, processMouseEvent, processMouseMotionEvent, processMouseWheelEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeMouseWheelListener, removeNotify, removePropertyChangeListener, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, requestFocus, requestFocusInWindow, requestFocusInWindow, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setEnabled, setFocusable, setFocusTraversalKeys, setFocusTraversalKeysEnabled, setFont, setForeground, setIgnoreRepaint, setLocale, setLocation, setLocation, setName, setSize, setSize, show, show, size, toString, transferFocus, transferFocusBackward, transferFocusUpCycle, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.awt.Image image
protected Image jimage
public int mouseux
public int mouseuy
public int mouselx
public int mousely
public boolean mouse_clicked
public boolean box_draw
Constructor Detail |
public ImageCanvas()
public ImageCanvas(java.lang.String fname) throws FileExtensionNotSupportedException, BadImageException, IllegalPBMFormatException, java.lang.InterruptedException, ImageNotSupportedException, java.io.FileNotFoundException, java.io.IOException
fname
- filenamepublic ImageCanvas(GrayImage img) throws BadImageException
img
- GrayImagepublic ImageCanvas(RealGrayImage img) throws BadImageException
img
- RealGrayImagepublic ImageCanvas(ComplexImage img) throws BadImageException
img
- CpmplexImagepublic ImageCanvas(Image img) throws BadImageException
img
- JIGL ImageMethod Detail |
public void setDrawBox(boolean value)
value
- sets the drawing of an xor box to true or falsepublic void setImage(java.awt.Image img)
public void setImage(Image img) throws BadImageException
BadImageException
public Image getImage()
public java.awt.Image getJavaImage()
public java.awt.Graphics setOffScreen()
public java.awt.Graphics setOffScreen(double xfactor, double yfactor)
xfactor
- zoom of x axisyfactor
- zoom of y axispublic void setVisible(boolean b)
setVisible
in class java.awt.Component
public int imHeight()
public int imWidth()
public java.awt.Image getJavaImage(Image img) throws BadImageException, java.lang.RuntimeException
img
- the JIGL image
BadImageException
java.lang.RuntimeException
public java.awt.Image getImageFromFile(java.lang.String fname) throws FileExtensionNotSupportedException, BadImageException, IllegalPBMFormatException, java.lang.InterruptedException, ImageNotSupportedException, java.io.IOException, java.io.FileNotFoundException
fname
- filename
FileExtensionNotSupportedException
BadImageException
IllegalPBMFormatException
java.lang.InterruptedException
ImageNotSupportedException
java.io.IOException
java.io.FileNotFoundException
public void update(java.awt.Graphics g)
update
in class java.awt.Canvas
public void paint(java.awt.Graphics g)
paint
in class java.awt.Canvas
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |