Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc for Elexis version 2.1.7.dev vom 17.03.2013

ag.ion.noa.graphic
Class GraphicInfo

java.lang.Object
  extended by ag.ion.noa.graphic.GraphicInfo

public class GraphicInfo
extends java.lang.Object

Information to be used for graphic operations.


Constructor Summary
GraphicInfo(java.io.InputStream imageInputStream, int width, boolean widthPixel, int height, boolean heightPixel, short verticalAlignment, short horizontalAlignment, com.sun.star.text.TextContentAnchorType anchor)
          Constructs new GraphicInfo.
GraphicInfo(java.lang.String url, int width, boolean widthPixel, int height, boolean heightPixel, short verticalAlignment, short horizontalAlignment, com.sun.star.text.TextContentAnchorType anchor)
          Constructs new GraphicInfo.
 
Method Summary
 void cleanUp()
          Cleans up the graphic info (i.e. deletes temporary file is it was used).
 com.sun.star.text.TextContentAnchorType getAnchor()
          Returns the anchor of the image, or null.
 int getHeight()
          Returns the height of the image in tenth millimeter.
 short getHorizontalAlignment()
          Returns the horizontal alignment of the image.
 java.lang.String getUrl()
          Returns the url of the image.
 short getVerticalAlignment()
          Returns the vertical alignment of the image.
 int getWidth()
          Returns the width of the image in tenth millimeter.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GraphicInfo

public GraphicInfo(java.io.InputStream imageInputStream,
                   int width,
                   boolean widthPixel,
                   int height,
                   boolean heightPixel,
                   short verticalAlignment,
                   short horizontalAlignment,
                   com.sun.star.text.TextContentAnchorType anchor)
            throws NOAException
Constructs new GraphicInfo. TODO this is just a workaround to support streams

Parameters:
imageInputStream - the input stream of the image (this will create a temporary file) Also closes the stream.
width - the width in pixel
widthPixel - if the width is described as pixels, otherwise it is assumed that the width is in thenth millimeter
height - the height in pixel
heightPixel - if the height is described as pixels, otherwise it is assumed that the height is in thenth millimeter
verticalAlignment - the vertical alignment. Possible values are described in VertOrientation
horizontalAlignment - the horizontal alignment. Possible values are described in HoriOrientation
anchor - the anchor type of the image. Possible values are described in TextContentAnchorType
Throws:
NOAException - if creation by input stream fails

GraphicInfo

public GraphicInfo(java.lang.String url,
                   int width,
                   boolean widthPixel,
                   int height,
                   boolean heightPixel,
                   short verticalAlignment,
                   short horizontalAlignment,
                   com.sun.star.text.TextContentAnchorType anchor)
Constructs new GraphicInfo.

Parameters:
url - the url of the image in the file system
width - the width in pixel
widthPixel - if the width is described as pixels, otherwise it is assumed that the width is in thenth millimeter
height - the height in pixel
heightPixel - if the height is described as pixels, otherwise it is assumed that the height is in thenth millimeter
verticalAlignment - the vertical alignment. Possible values are described in VertOrientation
horizontalAlignment - the horizontal alignment. Possible values are described in HoriOrientation
anchor - the anchor type of the image. Possible values are described in TextContentAnchorType
Method Detail

getUrl

public java.lang.String getUrl()
Returns the url of the image.

Returns:
the url of the image

getWidth

public int getWidth()
Returns the width of the image in tenth millimeter.

Returns:
the width of the image in tenth millimeter

getHeight

public int getHeight()
Returns the height of the image in tenth millimeter.

Returns:
the height of the image in tenth millimeter

getVerticalAlignment

public short getVerticalAlignment()
Returns the vertical alignment of the image. Possible values are described in VertOrientation

Returns:
the vertical alignment of the image

getHorizontalAlignment

public short getHorizontalAlignment()
Returns the horizontal alignment of the image. Possible values are described in HoriOrientation

Returns:
the horizontal alignment of the image

getAnchor

public com.sun.star.text.TextContentAnchorType getAnchor()
Returns the anchor of the image, or null. Possible values are described in TextContentAnchorType

Returns:
the anchor of the image, or null

cleanUp

public void cleanUp()
Cleans up the graphic info (i.e. deletes temporary file is it was used).


Elexis: Das führende OpenSource-Arztpraxisprogamm
im deutschsprachigen Raum
Java doc for Elexis version 2.1.7.dev vom 17.03.2013