|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.fit.cssbox.layout.ReplacedContent
org.fit.cssbox.layout.ContentImage
public abstract class ContentImage
Generic image used in the page content (used by ReplacedImage and BackgroundImage).
Field Summary | |
---|---|
protected boolean |
abort
|
protected boolean |
caching
|
protected Container |
container
|
protected int |
DEFAULT_IMAGE_HEIGHT
Used when there are no image data |
protected int |
DEFAULT_IMAGE_WIDTH
Used when there are no image data |
protected int |
height
|
protected Image |
image
|
protected boolean |
loadImages
|
protected int |
loadTimeout
Image loading timeout [ms] |
protected ImageObserver |
observer
|
protected Toolkit |
toolkit
|
protected URL |
url
|
protected int |
width
|
Fields inherited from class org.fit.cssbox.layout.ReplacedContent |
---|
def_height, def_width, owner |
Fields inherited from interface java.awt.image.ImageObserver |
---|
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
---|---|
ContentImage(ElementBox owner)
|
Method Summary | |
---|---|
void |
abort()
Aborts waiting for image data to determine width and/or height. |
void |
dispose()
Releases the image resources. |
BufferedImage |
getBufferedImage()
Gets the loaded image as BufferedImage object. |
Container |
getContainer()
Gets the container. |
Image |
getImage()
Gets the image. |
ImageObserver |
getImageObserver()
Gets the image observer. |
float |
getIntrinsicRatio()
|
int |
getIntrinsicWidth()
|
int |
getIntrinsicHeight()
|
URL |
getUrl()
Gets the url. |
boolean |
imageUpdate(Image img,
int flags,
int x,
int y,
int newWidth,
int newHeight)
|
boolean |
isCaching()
Checks if caching is used when loading images. |
protected Image |
loadImage(boolean cache)
|
protected void |
repaint(int t)
Fires repaint event within t milliseconds. |
void |
reset()
Resets all data to default state, releases the image resources. |
void |
setCaching(boolean val)
Sets the caching. |
void |
setContainer(Container container)
Sets the component's container used by internal ImageObserver
when there is need to repaint (e.g. animated gif). |
void |
setImageObserver(ImageObserver observer)
Sets the image observer. |
Methods inherited from class org.fit.cssbox.layout.ReplacedContent |
---|
absolutePositions, doLayout, draw, getOwner, loadSizeDefs, setOwner |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected final int DEFAULT_IMAGE_WIDTH
protected final int DEFAULT_IMAGE_HEIGHT
protected int loadTimeout
protected boolean loadImages
protected boolean caching
protected URL url
protected Image image
protected int width
protected int height
protected ImageObserver observer
protected Container container
protected Toolkit toolkit
protected boolean abort
Constructor Detail |
---|
public ContentImage(ElementBox owner)
Method Detail |
---|
public void setContainer(Container container)
ImageObserver
when there is need to repaint (e.g. animated gif). If not set, rendering
may not work correctly. Null does not cause NullPointerException
container
- the new containerImageObserver
,
Container
public Container getContainer()
protected void repaint(int t)
t
- the time to repaint within.Component.repaint(long, int, int, int, int)
protected Image loadImage(boolean cache)
public boolean isCaching()
setCaching(boolean)
public void setCaching(boolean val)
val
- indicates, whether use cache. Default is true.Toolkit.getImage(URL)
,
Toolkit.createImage(URL)
public URL getUrl()
public Image getImage()
public BufferedImage getBufferedImage()
public void setImageObserver(ImageObserver observer)
observer
- the new image observer.ImageObserver
public ImageObserver getImageObserver()
ImageObserver
public int getIntrinsicHeight()
getIntrinsicHeight
in class ReplacedContent
public int getIntrinsicWidth()
getIntrinsicWidth
in class ReplacedContent
public float getIntrinsicRatio()
getIntrinsicRatio
in class ReplacedContent
public void dispose()
public void reset()
public void abort()
ImageObserver
,
ImageObserver.ABORT
,
ImageObserver.ERROR
public boolean imageUpdate(Image img, int flags, int x, int y, int newWidth, int newHeight)
imageUpdate
in interface ImageObserver
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |