< prev index next >
src/java.desktop/share/classes/java/awt/image/AbstractMultiResolutionImage.java
Print this page
@@ -62,31 +62,73 @@
* @since 9
*/
public abstract class AbstractMultiResolutionImage extends java.awt.Image
implements MultiResolutionImage {
+ /**
+ * This method simply delegates to the same method on the base image and
+ * it is equivalent to: {@code getBaseImage().getWidth(observer)}.
+ * @return returns an integer value of the image width
+ * @see #getBaseImage()
+ *
+ * @since 9
+ */
@Override
public int getWidth(ImageObserver observer) {
return getBaseImage().getWidth(observer);
}
+ /**
+ * This method simply delegates to the same method on the base image and
+ * it is equivalent to: {@code getBaseImage().getHeight(observer)}.
+ *
+ * @return returns an integer value of the image height
+ * @see #getBaseImage()
+ *
+ * @since 9
+ */
@Override
public int getHeight(ImageObserver observer) {
return getBaseImage().getHeight(observer);
}
+ /**
+ * This method simply delegates to the same method on the base image and
+ * it is equivalent to: {@code getBaseImage().getSource()}.
+ *
+ * @return returns an ImageProducer object reference to the source image
+ * @see #getBaseImage()
+ *
+ * @since 9
+ */
@Override
public ImageProducer getSource() {
return getBaseImage().getSource();
}
+ /**
+ * As per the contract of the base {@code Image#getGraphics()} method,
+ * this implementation will always throw {@code UnsupportedOperationException}
+ * since only off-screen images can return a {@code Graphics} object.
+ * @return Only {@code UnsupportedOperationException} is thrown
+ * @throws UnsupportedOperationException this method is not supported
+ */
@Override
public Graphics getGraphics() {
throw new UnsupportedOperationException("getGraphics() not supported"
+ " on Multi-Resolution Images");
}
+ /**
+ * This method simply delegates to the same method on the base image and
+ * it is equivalent to: {@code getBaseImage().getProperty(name, observer)}.
+ *
+ * @return returns an Object corresponding to the property of base image
+ * @see #getBaseImage()
+ *
+ * @since 9
+ */
@Override
public Object getProperty(String name, ImageObserver observer) {
return getBaseImage().getProperty(name, observer);
}
< prev index next >