Class RMImageShape

All Implemented Interfaces:
Archivable, DeepChangeListener, RMPropertyChanger, RMTypes, PropertyChangeListener, Cloneable, EventListener

public class RMImageShape extends RMRectShape
This class is a shape representation of an image.
  • Constructor Details

    • RMImageShape

      public RMImageShape()
      Creates an RMImageShape.
    • RMImageShape

      public RMImageShape(Object aSource)
      Creates an RMImageShape from the image source provided.
  • Method Details

    • getKey

      public String getKey()
      Returns the report key used to load an image if none is provided.
    • setKey

      public void setKey(String aString)
      Sets the report key used to load an image if none is provided.
    • getImageData

      public RMImageData getImageData()
      Returns the image data.
    • setImageData

      public void setImageData(RMImageData anImageData)
      Sets the image data.
    • setImageData

      public void setImageData(Object aSource)
      Sets the image data from given source.
    • getPageIndex

      public int getPageIndex()
      Returns the page index.
    • setPageIndex

      public void setPageIndex(int anIndex)
      Sets the page index.
    • getPadding

      public int getPadding()
      Returns the padding.
    • setPadding

      public void setPadding(int aPadding)
      Sets the padding.
    • getAlignmentX

      public RMTypes.AlignX getAlignmentX()
      Returns the horizontal alignment.
      Overrides:
      getAlignmentX in class RMShape
    • setAlignmentX

      public void setAlignmentX(RMTypes.AlignX anAlignX)
      Sets the horizontal alignment.
      Overrides:
      setAlignmentX in class RMShape
    • getAlignmentY

      public RMTypes.AlignY getAlignmentY()
      Returns the vertical alignment.
      Overrides:
      getAlignmentY in class RMShape
    • setAlignmentY

      public void setAlignmentY(RMTypes.AlignY anAlignY)
      Sets the vertical alignment.
      Overrides:
      setAlignmentY in class RMShape
    • isGrowToFit

      public boolean isGrowToFit()
      Returns whether to grow image to fit available area if shape larger than image.
    • setGrowToFit

      public void setGrowToFit(boolean aValue)
      Sets whether to grow image to fit available area if shape larger than image.
    • getPreserveRatio

      public boolean getPreserveRatio()
      Returns whether to preserve the natural width to height ratio of image.
    • setPreserveRatio

      public void setPreserveRatio(boolean aValue)
      Sets whether to preserve the natural width to height ratio of image.
    • computePrefWidth

      public double computePrefWidth(double aHeight)
      Returns the preferred width.
      Overrides:
      computePrefWidth in class RMShape
    • computePrefHeight

      public double computePrefHeight(double aWidth)
      Returns the preferred height.
      Overrides:
      computePrefHeight in class RMShape
    • getPropertyNames

      protected void getPropertyNames(List<String> aList)
      Returns the property names for RMShape.
      Overrides:
      getPropertyNames in class RMShape
    • rpgShape

      @Nonnull public RMShape rpgShape(ReportOwner aRptOwner, RMShape aParent)
      Report generation method.
      Overrides:
      rpgShape in class RMShape
    • paintShape

      public void paintShape(RMShapePainter aPntr)
      Override to paint shape.
      Overrides:
      paintShape in class RMShape
    • getImageBounds

      public Rectangle2D getImageBounds()
      Returns the image bounds.
    • toXML

      public RXElement toXML(RXArchiver anArchiver)
      XML archival.
      Specified by:
      toXML in interface Archivable
      Overrides:
      toXML in class RMRectShape
    • fromXML

      public Object fromXML(RXArchiver anArchiver, RXElement anElement)
      XML unarchival.
      Specified by:
      fromXML in interface Archivable
      Overrides:
      fromXML in class RMRectShape