|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.java4less.rreport.RImageFile
This class is used to load images from files. The default package for the images is com/java4less/images.
Example of use:
new RImageFile("file.gif"); // this will try to load the image from the package com/java4less/images/file.gif
new RImageFile("images/file.gif"); // this will try to load the image from the package images/file.gif
new RImageFile("file:/D:/file.gif"); // this will try to load the image from the url d:/file.gif
Field Summary | |
static java.lang.String |
defaultPath
Default location for images is "com/java4less/images" |
Constructor Summary | |
RImageFile(java.lang.String n)
create an image file. |
Method Summary | |
java.awt.Image |
getImage()
get Image object, loading the file if not loaded yet. |
boolean |
getLoaded()
returns whether the image has been loaded |
java.lang.String |
getName()
get file name |
java.lang.String |
getUrlLocation()
get url of the image |
boolean |
loadImage()
load image from file |
void |
setImage(java.awt.Image i)
set image object. |
void |
setImage(java.lang.String n,
java.awt.Image i)
set image object and name |
void |
setName(java.lang.String n)
set filename |
void |
setUrlLocation(java.lang.String u)
set url of the image |
Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
public static java.lang.String defaultPath
Constructor Detail |
public RImageFile(java.lang.String n)
Method Detail |
public java.lang.String getUrlLocation()
public void setUrlLocation(java.lang.String u)
public java.lang.String getName()
public boolean getLoaded()
public void setName(java.lang.String n)
public java.awt.Image getImage()
public void setImage(java.lang.String n, java.awt.Image i)
public void setImage(java.awt.Image i)
public boolean loadImage()
|
|||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |