|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.sodius.mdw.core.model.diagram.DiagramFileImage
public class DiagramFileImage
A file-based diagram image implementation.
Clients may instantiate or subclass this class.
| Field Summary |
|---|
| Fields inherited from interface com.sodius.mdw.core.model.diagram.DiagramImage |
|---|
UNKNOWN_SIZE |
| Constructor Summary | |
|---|---|
DiagramFileImage(File file)
Creates a new diagram image based on the specified file. |
|
| Method Summary | |
|---|---|
void |
dispose()
This implementation does nothing. |
File |
getFile()
Returns the image file. |
int |
getHeight()
Returns the height of the image. |
int |
getWidth()
Returns the width of the image. |
InputStream |
openStream()
Opens a InputStream to read image bytes. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public DiagramFileImage(File file)
This constructor will try to determine the width and height of this image.
Supported image formats are: bmp, emf, gif, jpg, png, and wmf.
file - the image file.| Method Detail |
|---|
public final File getFile()
public InputStream openStream()
throws IOException
DiagramImageInputStream to read image bytes.
openStream in interface DiagramImageIOException - if the image contents is not accessible.public int getWidth()
DiagramImage
getWidth in interface DiagramImageUNKNOWN_SIZE if unknown).public int getHeight()
DiagramImage
getHeight in interface DiagramImageUNKNOWN_SIZE if unknown).public void dispose()
dispose in interface DiagramImage
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||