Class ImageObject

  • All Implemented Interfaces:
    java.lang.Cloneable, GeoObject

    public class ImageObject
    extends java.lang.Object
    implements GeoObject
    An image based feature to be rendered in canvas
    • Constructor Summary

      Constructors 
      Constructor Description
      ImageObject​(java.lang.Object key, java.awt.Image value)
      Creates a new instance with the given key and image
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      ImageObject clone()  
      Drawable getDrawable​(java.awt.geom.AffineTransform viewportTransform)
      This method returns a drawable Java2D shape or point that can be directly rendered onto a device.
      Drawable[] getDrawables​(java.awt.geom.AffineTransform viewportTransform)
      This method returns an array of drawable Java2D shape or point that can be directly rendered onto a device.
      java.awt.Image getImage()
      Gets the image associated with this geo-object.
      java.lang.Object getKey()
      Gets the key of the selected object.
      Layer getLayer()
      Gets the associated layer for this object.
      java.awt.geom.Rectangle2D getMBR()
      Gets the minimum bounding rectangle of this geo-object.
      boolean isSubElementOf​(GeoObject obj)
      Returns true if this GeoObject is a sub element of the provided GeoObject
      java.lang.Object setKey​(java.lang.Object key)
      Sets a new key on the object.
      void setLayer​(Layer layer)
      Sets the layer to be associated with this object.
      java.util.List<GeoObject> substract​(java.util.List<? extends GeoObject> obj)
      Returns a set of GeoObjects that represent the substraction of the provided GeoObjects from this GeoObject
      • Methods inherited from class java.lang.Object

        equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • ImageObject

        public ImageObject​(java.lang.Object key,
                           java.awt.Image value)
        Creates a new instance with the given key and image
        Parameters:
        key -
        value -
    • Method Detail

      • clone

        public ImageObject clone()
        Overrides:
        clone in class java.lang.Object
      • isSubElementOf

        public boolean isSubElementOf​(GeoObject obj)
        Description copied from interface: GeoObject
        Returns true if this GeoObject is a sub element of the provided GeoObject
        Specified by:
        isSubElementOf in interface GeoObject
        Returns:
      • substract

        public java.util.List<GeoObject> substract​(java.util.List<? extends GeoObject> obj)
        Description copied from interface: GeoObject
        Returns a set of GeoObjects that represent the substraction of the provided GeoObjects from this GeoObject
        Specified by:
        substract in interface GeoObject
        Returns:
      • getKey

        public java.lang.Object getKey()
        Gets the key of the selected object.
        Specified by:
        getKey in interface GeoObject
        Returns:
        the key
      • setKey

        public java.lang.Object setKey​(java.lang.Object key)
        Sets a new key on the object.
        Specified by:
        setKey in interface GeoObject
        Parameters:
        key - the new key to be set.
        Returns:
        previously set key
      • getLayer

        public Layer getLayer()
        Gets the associated layer for this object.
        Specified by:
        getLayer in interface GeoObject
        Returns:
        the Layer instance that owns this object.
      • setLayer

        public void setLayer​(Layer layer)
        Sets the layer to be associated with this object.
        Specified by:
        setLayer in interface GeoObject
        Parameters:
        layer - the layer to be associated.
      • getImage

        public java.awt.Image getImage()
        Gets the image associated with this geo-object.
        Returns:
      • getDrawable

        public Drawable getDrawable​(java.awt.geom.AffineTransform viewportTransform)
        This method returns a drawable Java2D shape or point that can be directly rendered onto a device. If a non-null viewportTransform is supplied, then it is applied and result returned.
        Specified by:
        getDrawable in interface GeoObject
        Parameters:
        viewportTransform -
        Returns:
        a Drawable instance that references either a Shape or a Point2D
      • getDrawables

        public Drawable[] getDrawables​(java.awt.geom.AffineTransform viewportTransform)
        This method returns an array of drawable Java2D shape or point that can be directly rendered onto a device. If a non-null viewportTransform is supplied, then it is applied and result returned. This can be used to get pieces of geometry collections or multi points.
        Parameters:
        viewportTransform -
        Returns:
        a Drawable instance that references either a Shape or a Point2D
      • getMBR

        public java.awt.geom.Rectangle2D getMBR()
        Description copied from interface: GeoObject
        Gets the minimum bounding rectangle of this geo-object. The rectangle is in the same coordinate system as the object value.
        Specified by:
        getMBR in interface GeoObject