All Packages Class Hierarchy This Package Previous Next Index
Class ncsa.hdf.jhv.JHVCanvas
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----ncsa.hdf.jhv.JHVCanvas
- public class JHVCanvas
- extends Canvas
- implements MouseListener, MouseMotionListener
This class define the image canvas. When click the hdf node, the image can
be painted on this canvas
-
JHVCanvas(JHV)
- use the applet to construct the HDFCanvas
-
checkMousePosition(int, int)
-
-
getImage()
- return the current image in the canvas
-
getImageHeight()
- return the current image height
-
getImageWidth()
- return the current image width
-
getMaxValue()
-
-
getMinimumSize()
- Returns the minimum size of this component.
-
getMinValue()
-
-
getSliceInfo()
-
-
getSliceWindow()
-
-
mouseClicked(MouseEvent)
-
-
mouseDragged(MouseEvent)
-
-
mouseEntered(MouseEvent)
- Called when the mouse enters the component.
-
mouseExited(MouseEvent)
- Called when the mouse exits the component.
-
mouseMoved(MouseEvent)
- Called if the mouse moves (the mouse button is up)
-
mousePressed(MouseEvent)
-
-
mouseReleased(MouseEvent)
-
Called if the mouse is up.
-
paint(Graphics)
- Paints the component.
-
setCanvasSize(int, int)
- reset the Canvas size
-
setDataRange(double[])
-
-
setImage(Image)
- set the current image displayed
-
setImage(Image, Image)
- set the current image displayed
-
setImageSize(int, int)
- set the current image size
-
setObject(HDFObjectNode)
- set the current HDF Object node
-
setOriginalImageSize(int, int)
-
-
setPaletteImage(Image)
- set the current palette Palette image displayed
-
setSliceInfo(SDSDimInfo)
-
-
setSliceWindow(SliceSelection)
-
-
update(Graphics)
- Updates the component.
-
writeInfo(Graphics, int, int, String)
- Write the information on the top of the image
JHVCanvas
public JHVCanvas(JHV app)
- use the applet to construct the HDFCanvas
setImage
public void setImage(Image img)
- set the current image displayed
- Parameters:
- img - the current image
setImage
public void setImage(Image img,
Image palImage)
- set the current image displayed
- Parameters:
- img - the current image,
- palImage - the palette image
setPaletteImage
public void setPaletteImage(Image img)
- set the current palette Palette image displayed
- Parameters:
- img - the current image
setObject
public void setObject(HDFObjectNode node)
- set the current HDF Object node
- Parameters:
- node - the HDF Object Node
setImageSize
public void setImageSize(int width,
int height)
- set the current image size
- Parameters:
- width - the width of the image
- height - the height of the image
setOriginalImageSize
public void setOriginalImageSize(int width,
int height)
getImage
public Image getImage()
- return the current image in the canvas
getImageWidth
public int getImageWidth()
- return the current image width
getImageHeight
public int getImageHeight()
- return the current image height
getMinimumSize
public Dimension getMinimumSize()
- Returns the minimum size of this component.
- Overrides:
- getMinimumSize in class Component
- See Also:
- preferredSize, LayoutManager
paint
public void paint(Graphics g)
- Paints the component.
- Parameters:
- g - the specified Graphics window
- Overrides:
- paint in class Canvas
- See Also:
- paint
writeInfo
public void writeInfo(Graphics g,
int x,
int y,
String info)
- Write the information on the top of the image
- Parameters:
- g - the graphics
- x - the x coordinate
- y - the y coordinate
- info - the string
setCanvasSize
public void setCanvasSize(int w,
int h)
- reset the Canvas size
- Parameters:
- w - the width of the Canvas
- h - the height of the Canvas
update
public void update(Graphics g)
- Updates the component. This method is called in
response to a call to repaint. You can assume that
the background is not cleared.
- Parameters:
- g - the specified Graphics window
- Overrides:
- update in class Component
- See Also:
- update
mouseEntered
public void mouseEntered(MouseEvent me)
- Called when the mouse enters the component.
- Parameters:
- evt - the event
- x - the x coordinate
- y - the y coordinate
- See Also:
- mouseEnter
mouseExited
public void mouseExited(MouseEvent me)
- Called when the mouse exits the component.
- Parameters:
- evt - the event
- x - the x coordinate
- y - the y coordinate
- See Also:
- mouseExit
mouseDragged
public void mouseDragged(MouseEvent me)
mouseMoved
public void mouseMoved(MouseEvent me)
- Called if the mouse moves (the mouse button is up)
- Parameters:
- evt - the event
- x - the x coordinate
- y - the y coordinate
- See Also:
- mouseMove
mouseClicked
public void mouseClicked(MouseEvent me)
mousePressed
public void mousePressed(MouseEvent me)
mouseReleased
public void mouseReleased(MouseEvent me)
- Called if the mouse is up.
checkMousePosition
public void checkMousePosition(int x,
int y)
setDataRange
public void setDataRange(double range[])
getMaxValue
public double getMaxValue()
getMinValue
public double getMinValue()
setSliceInfo
public void setSliceInfo(SDSDimInfo info)
setSliceWindow
public void setSliceWindow(SliceSelection select)
getSliceInfo
public SDSDimInfo getSliceInfo()
getSliceWindow
public SliceSelection getSliceWindow()
All Packages Class Hierarchy This Package Previous Next Index