|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--java.awt.Component | +--dog.gui.DComponent | +--dog.gui.DPicture
A component that can render an image in various ways.
Inner classes inherited from class java.awt.Component |
java.awt.Component.AccessibleAWTComponent |
Field Summary | |
protected java.awt.Image |
image
The image. |
protected int |
mode
The rendering mode for the image. |
Fields inherited from class dog.gui.DComponent |
CENTER, CENTER_TILE, changes, EAST, INTEGER_TILE, MAXIMIZE, MAXIMIZE_ASPECT, MAXIMIZE_HORIZONTAL, MAXIMIZE_VERTICAL, NORTH, NORTHEAST, NORTHWEST, reference, SOUTH, SOUTHEAST, SOUTHWEST, TILE, tooltip, WEST |
Fields inherited from class java.awt.Component |
BOTTOM_ALIGNMENT, CENTER_ALIGNMENT, LEFT_ALIGNMENT, RIGHT_ALIGNMENT, TOP_ALIGNMENT |
Fields inherited from interface java.awt.image.ImageObserver |
ABORT, ALLBITS, ERROR, FRAMEBITS, HEIGHT, PROPERTIES, SOMEBITS, WIDTH |
Constructor Summary | |
DPicture()
Constructs a picture with no image. |
|
DPicture(java.awt.Image image)
Constructs a picture with the specified image. |
|
DPicture(java.awt.Image image,
int mode)
Constructs a picture with the specified image and rendering mode. |
|
DPicture(java.lang.String image)
Constructs a picture with the specified image. |
|
DPicture(java.lang.String image,
int mode)
Constructs a picture with the specified image and rendering mode. |
|
DPicture(java.net.URL image)
Constructs a picture with the specified image. |
|
DPicture(java.net.URL image,
int mode)
Constructs a picture with the specified image and rendering mode. |
Method Summary | |
java.awt.Image |
getImage()
Returns the image. |
java.awt.Dimension |
getMinimumSize()
Returns the minimum size for this component (the image size). |
int |
getMode()
Returns the rendering mode for the background image. |
java.awt.Dimension |
getPreferredSize()
Returns the preferred size for this component (the image size). |
boolean |
imageUpdate(java.awt.Image image,
int flags,
int x,
int y,
int w,
int h)
The image has arrived... |
void |
paint(java.awt.Graphics g)
Paints this component. |
void |
setImage(java.awt.Image image)
Sets the image. |
void |
setImage(java.lang.String file)
Sets the image from a file. |
void |
setImage(java.net.URL url)
Sets the image from a URL. |
void |
setMode(int mode)
Sets the rendering mode for the background image. |
Methods inherited from class java.awt.Component |
action, add, addComponentListener, addFocusListener, addHierarchyBoundsListener, addHierarchyListener, addInputMethodListener, addKeyListener, addMouseListener, addMouseMotionListener, addNotify, addPropertyChangeListener, bounds, checkImage, checkImage, coalesceEvents, contains, contains, createImage, createImage, deliverEvent, disable, disableEvents, dispatchEvent, doLayout, enable, enable, enableEvents, enableInputMethods, firePropertyChange, getAccessibleContext, getAlignmentX, getAlignmentY, getBackground, getBounds, getBounds, getColorModel, getComponentAt, getComponentAt, getComponentOrientation, getCursor, getDropTarget, getFont, getFontMetrics, getForeground, getGraphics, getGraphicsConfiguration, getHeight, getInputContext, getInputMethodRequests, getListeners, getLocale, getLocation, getLocation, getLocationOnScreen, getMaximumSize, getName, getParent, getPeer, getSize, getSize, getToolkit, getTreeLock, getWidth, getX, getY, gotFocus, handleEvent, hasFocus, hide, inside, invalidate, isDisplayable, isDoubleBuffered, isEnabled, isFocusTraversable, isLightweight, isOpaque, isShowing, isValid, isVisible, keyDown, keyUp, layout, list, list, list, list, list, locate, location, lostFocus, minimumSize, mouseDown, mouseDrag, mouseEnter, mouseExit, mouseMove, mouseUp, move, nextFocus, paintAll, postEvent, preferredSize, prepareImage, prepareImage, print, printAll, processComponentEvent, processFocusEvent, processHierarchyBoundsEvent, processHierarchyEvent, processInputMethodEvent, processKeyEvent, remove, removeComponentListener, removeFocusListener, removeHierarchyBoundsListener, removeHierarchyListener, removeInputMethodListener, removeKeyListener, removeMouseListener, removeMouseMotionListener, removeNotify, removePropertyChangeListener, repaint, repaint, repaint, repaint, requestFocus, reshape, resize, resize, setBackground, setBounds, setBounds, setComponentOrientation, setCursor, setDropTarget, setFont, setForeground, setLocale, setLocation, setLocation, setName, setSize, setSize, setVisible, show, show, size, transferFocus, update, validate |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
protected java.awt.Image image
protected int mode
Constructor Detail |
public DPicture()
public DPicture(java.awt.Image image)
public DPicture(java.lang.String image)
public DPicture(java.net.URL image)
public DPicture(java.awt.Image image, int mode)
public DPicture(java.lang.String image, int mode)
public DPicture(java.net.URL image, int mode)
Method Detail |
public int getMode()
setMode(int)
public void setMode(int mode)
mode
- one of CENTER, TILE, INTEGER_TILE, CENTER_TILE, MAXIMIZE, MAXIMIZE_ASPECT, MAXIMIZE_VERTICAL, or MAXIMIZE_HORIZONTALgetMode()
public java.awt.Image getImage()
setImage(java.awt.Image)
public void setImage(java.awt.Image image)
image
- the image.getImage()
public void setImage(java.lang.String file)
file
- the image file.getImage()
public void setImage(java.net.URL url)
url
- the image URL.getImage()
public boolean imageUpdate(java.awt.Image image, int flags, int x, int y, int w, int h)
imageUpdate
in class java.awt.Component
public java.awt.Dimension getMinimumSize()
getMinimumSize
in class java.awt.Component
public java.awt.Dimension getPreferredSize()
getPreferredSize
in class java.awt.Component
public void paint(java.awt.Graphics g)
paint
in class java.awt.Component
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |