Class ncsa.horizon.awt.ScrollerImageCanvas
All Packages Class Hierarchy This Package Previous Next Index
Class ncsa.horizon.awt.ScrollerImageCanvas
java.lang.Object
|
+----java.awt.Component
|
+----java.awt.Canvas
|
+----ncsa.horizon.awt.ScrollerImageCanvas
- public class ScrollerImageCanvas
- extends Canvas
Handle scrolling image display.
-
currentImage
- the currently displayed image
-
hScroll
- scrollbar of the image canvas
-
imageHeight
-
-
imageWidth
- image size
-
infoStr
- display string
-
offGraphics
-
-
offScreenImage
- variables for double buffering
-
tx
- image offset on panel
-
ty
-
-
vScroll
- scrollbar of the image canvas
-
ScrollerImageCanvas()
- new constructor
-
ScrollerImageCanvas(Image)
- Constructor with image
-
ScrollerImageCanvas(Image, Scrollbar, Scrollbar)
- Constructor with image
-
getImage()
- return the current image in the canvas
-
getImageHeight()
- return the current image height
-
getImageWidth()
- return the current image width
-
minimumSize()
- Returns the minimum size of this component.
-
paint(Graphics)
- Paints the component.
-
reshape(int, int, int, int)
- Reshapes the Component to the specified bounding box.
-
setImage(Image)
- set the current displayed image
-
setImageHeight(int)
- set the current image height
-
setImageSize(int, int)
- set the current image size
-
setImageWidth(int)
- set the current image width
-
setScrollbars(Scrollbar, Scrollbar)
- Set scrollbars for the canvas
-
setTx(int)
-
-
setTy(int)
-
-
update(Graphics)
- Updates the component.
currentImage
protected Image currentImage
- the currently displayed image
imageWidth
protected int imageWidth
- image size
imageHeight
protected int imageHeight
offScreenImage
protected Image offScreenImage
- variables for double buffering
offGraphics
protected Graphics offGraphics
infoStr
protected String infoStr
- display string
tx
protected int tx
- image offset on panel
ty
protected int ty
hScroll
protected Scrollbar hScroll
- scrollbar of the image canvas
vScroll
protected Scrollbar vScroll
- scrollbar of the image canvas
ScrollerImageCanvas
public ScrollerImageCanvas()
- new constructor
ScrollerImageCanvas
public ScrollerImageCanvas(Image image)
- Constructor with image
- Parameters:
- image - the image
ScrollerImageCanvas
public ScrollerImageCanvas(Image image,
Scrollbar v,
Scrollbar h)
- Constructor with image
- Parameters:
- image - the image
- v - the vertical scrollbar
- h - the horizontal scrollbar
setImage
public void setImage(Image img)
- set the current displayed image
- Parameters:
- img - the current image
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
setImageWidth
public void setImageWidth(int width)
- set the current image width
- Parameters:
- width - the width of the image
setImageHeight
public void setImageHeight(int height)
- set the current image height
- Parameters:
- height - the height of the image
reshape
public synchronized void reshape(int x,
int y,
int w,
int h)
- Reshapes the Component to the specified bounding box.
- Overrides:
- reshape in class Component
setScrollbars
public void setScrollbars(Scrollbar h,
Scrollbar v)
- Set scrollbars for the canvas
- Parameters:
- h - the horizontal scrollbar
- v - the vertical scrollbar
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
minimumSize
public Dimension minimumSize()
- Returns the minimum size of this component.
- Overrides:
- minimumSize 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
setTx
public void setTx(int tx)
setTy
public void setTy(int ty)
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
All Packages Class Hierarchy This Package Previous Next Index