javalib.worldimages
Class FromURLImage

java.lang.Object
  extended by javalib.worldimages.AImage
      extended by javalib.worldimages.RasterImage
          extended by javalib.worldimages.FromURLImage
All Implemented Interfaces:
Drawable, WorldImage, tester.ISame<WorldImage>

public class FromURLImage
extends RasterImage

An image loaded from a URL over the network.

Version:
Dec. 25, 2012
Author:
Stephen Bloch

Field Summary
 
Fields inherited from class javalib.worldimages.RasterImage
id, rendering, transparent
 
Fields inherited from interface javalib.worldimages.WorldImage
LOOKS_SAME
 
Constructor Summary
FromURLImage(URL url)
          Constructor for objects of class FromURLImage
 
Method Summary
 boolean equals(Object other)
          Is this the same as another WorldImage, as expression trees? Define this at every level that has instance variables.
(package private) static WorldImage make(String urlString)
          Pseudo-constructor for objects of class FromURLImage
 String toIndentedString(String indent)
          Produce a String that represents this image, indented by the given indent.
 
Methods inherited from class javalib.worldimages.RasterImage
build, draw, frozen, getBottom, getPixelColor, getRight, hashCode, make, map, renderIfNecessary, save, setRendering
 
Methods inherited from class javalib.worldimages.AImage
above, aboveCentered, beside, besideCentered, build, centerMoved, centerMoved, cornerString, cropped, getCenter, getHeight, getLeft, getTop, getWidth, isApplet, makeCenteredCircle, makeCenteredCircle, makeCenteredCircle, makeCenteredCircle, makeCenteredCircle, makeCenteredCircle, makeCircle, makeCircle, makeCircle, makeCircle, makeCircle, makeCircle, makeEllipse, makeEllipse, makeEllipse, makeEllipse, makeEllipse, makeEllipse, makeFromFile, makeFromURL, makeImage, makeLine, makeLine, makeLine, makePolygon, makePolygon, makePolygon, makePolygon, makePolygon, makePolygon, makeRectangle, makeRectangle, makeRectangle, makeRectangle, makeRectangle, makeRectangle, makeText, makeText, makeText, makeText, makeText, makeText, makeText, makeText, makeText, makeText, makeText, makeText, makeTriangle, makeTriangle, makeTriangle, makeTriangle, makeTriangle, makeTriangle, makeTriangle, makeTriangle, makeTriangle, makeTriangle, makeTriangle, makeTriangle, map, moved, moved, normalized, overlay, overlayCentered, overlayImages, overlayXY, place, rotate, rotated, rotated, rotatedAround, rotatedAround, rotatedInPlace, rotatedInPlace, same, sameClass, scaled, scaled, show, toString, xReflected, yReflected
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FromURLImage

FromURLImage(URL url)
       throws IOException
Constructor for objects of class FromURLImage

Parameters:
url - the URL from which to get the image
urlString -
Throws:
IOException - if there's a problem opening the URL
Method Detail

equals

public boolean equals(Object other)
Description copied from interface: WorldImage
Is this the same as another WorldImage, as expression trees? Define this at every level that has instance variables.

Specified by:
equals in interface WorldImage
Overrides:
equals in class RasterImage
Parameters:
other - the object to compare with this
Returns:
true iff the images are isomorphic expression trees, with equal fields.

make

static WorldImage make(String urlString)
Pseudo-constructor for objects of class FromURLImage

Parameters:
urlString -

toIndentedString

public String toIndentedString(String indent)
Description copied from interface: WorldImage
Produce a String that represents this image, indented by the given indent.

Define this in all concrete subclasses.

Convention: The result of toIndentedString() will neither begin nor end with a newline; the specified indent will immediately follow each internal newline.

Specified by:
toIndentedString in interface WorldImage
Overrides:
toIndentedString in class RasterImage
Parameters:
indent - the given prefix representing the desired indentation
Returns:
the String representation of this image