Class PdfComponent

java.lang.Object
overit.geocall.platform.ui.UINode
overit.geocall.basic.ui.report.PdfComponent
All Implemented Interfaces:
Serializable, overit.geocall.marks.MethodExposer, overit.geocall.marks.NameExposer, Identified
Direct Known Subclasses:
PdfBox

public abstract class PdfComponent extends UINode implements Identified, overit.geocall.marks.NameExposer, overit.geocall.marks.MethodExposer
This class extends UINode and implements Identified, NameExposer and MethodExposer.
This class implement and represent the basic functions and attributes for a pdf report.
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected Identity
     
    protected String
     
    protected boolean
     
  • Constructor Summary

    Constructors
    Constructor
    Description
     
  • Method Summary

    Modifier and Type
    Method
    Description
    final void
    drawInside(Report r, float x, float y, float w, float h)
    Draw the component
    abstract void
    drawInsideBack(Report r, float x, float y, float w, float h)
     
    abstract void
    drawInsideFront(Report r, float x, float y, float w, float h)
     
    protected static boolean
    getBoolean(String s, boolean def)
     
    static Color[]
    getColor(String key, int dim, Color[] cc)
    Gets a list of rgb values as string separated by comma, a dimension dim and a default Color array.
    Return an Color array with the first dim color in the string list.
    If the list of string contains a non color rgb value (represent as string, for example "255") will be put into the array a default Color object taken from cc deault Color array.
    static Color
    Gets a Color object from a string containg the integer rgb value.
    protected static float
    getfloat(String s, float def)
     
    static float[]
    getfloat(String key, int dim, float[] ff)
    Gets a list of Float represent as strings separated by comma, a dimension dim and a float array.
    Return a Float array with the first dim Float number of the string list.
    If the list of string contains a non Float number (represent as string, for example "3.4") will be put into the Float array a default Float value taken from ff deault Float array.
    static com.lowagie.text.Font
    getFont(String s, com.lowagie.text.Font def)
    Gets the font to use on text of the report
    Returns the Identity associated to the component
    protected static int
    getint(String s, int def)
     
    static int[]
    getint(String key, int dim, int[] ii)
    Gets a list of int represent as strings separated by comma, a dimension dim and a float array.
    Return a int array with the first dim int number of the string list.
    If the list of string contains a non integer number (represent as string, for example "3") will be put into the array a default integer value taken from ii deault integer array.
    Gets the report's name.
    static String[]
    getString(String s, int dim)
    Gets a list of string separated by comma and a dimension dim, return a string array with the first dim string of the list.
    void
    Sets the Identity to the component
    void
    Sets the report's name.
    void
    Sets if the instance is visible or not.

    Methods inherited from class overit.geocall.platform.ui.UINode

    addChild, addChildText, getChildren, getNodeId, getParent, getRoot, getSchema, setNodeId, setParent, setSchema

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • _visible

      protected boolean _visible
    • _name

      protected String _name
    • _identity

      protected Identity _identity
  • Constructor Details

    • PdfComponent

      public PdfComponent()
  • Method Details

    • getBoolean

      protected static boolean getBoolean(String s, boolean def)
    • getint

      protected static int getint(String s, int def)
    • getfloat

      protected static float getfloat(String s, float def)
    • setV

      public void setV(String s)
      Sets if the instance is visible or not.
      Parameters:
      s - 'true' or '1' if the instance must be visible, 'false' or '0' otherwise.
    • getString

      public static String[] getString(String s, int dim)
      Gets a list of string separated by comma and a dimension dim, return a string array with the first dim string of the list.
      Parameters:
      s - The list of string separated by comma.
      dim - The number of string to take into accaunting.
      Returns:
      A string array with the first dim string of the list.
    • getfloat

      public static float[] getfloat(String key, int dim, float[] ff)
      Gets a list of Float represent as strings separated by comma, a dimension dim and a float array.
      Return a Float array with the first dim Float number of the string list.
      If the list of string contains a non Float number (represent as string, for example "3.4") will be put into the Float array a default Float value taken from ff deault Float array.
      Parameters:
      key - The list of Float, represent as strings, separated by comma.
      dim - The number of Float number to take into accaunting.
      ff - The default Float array from which take float values ??in case there are none in the list passed in input.
      Returns:
      A Float array with the first dim, Float number, of the string list key.
    • getint

      public static int[] getint(String key, int dim, int[] ii)
      Gets a list of int represent as strings separated by comma, a dimension dim and a float array.
      Return a int array with the first dim int number of the string list.
      If the list of string contains a non integer number (represent as string, for example "3") will be put into the array a default integer value taken from ii deault integer array.
      Parameters:
      key - The list of integer, represent as strings, separated by comma.
      dim - The number of intger number to take into accaunting.
      ii - The default integer array from which take int values ??in case there are none in the list passed in input.
      Returns:
      An integer array with the first dim, intger number, of the string list key.
    • getColor

      public static Color getColor(String s, Color c)
      Gets a Color object from a string containg the integer rgb value.
      Parameters:
      s - The string with the rgb value.
      c - The Default value to return.
      Returns:
      S Color object from a string containg the integer rgb value.
    • getColor

      public static Color[] getColor(String key, int dim, Color[] cc)
      Gets a list of rgb values as string separated by comma, a dimension dim and a default Color array.
      Return an Color array with the first dim color in the string list.
      If the list of string contains a non color rgb value (represent as string, for example "255") will be put into the array a default Color object taken from cc deault Color array.
      Parameters:
      key - The list of rgb values separated by comma.
      dim - The number of rgb values to take into accaunting.
      cc - The default Color array from which take Color onject ??in case there are none rgb values in the list passed in input.
      Returns:
      An Color array with the first dim color in the string list.
    • getFont

      public static com.lowagie.text.Font getFont(String s, com.lowagie.text.Font def)
      Gets the font to use on text of the report
      Parameters:
      s - A string containg the font's name, size and style of the Font to use.
      def - The default Font to return.
      Returns:
      the Font to use on text of the report
    • getIdentity

      public Identity getIdentity()
      Description copied from interface: Identified
      Returns the Identity associated to the component
      Specified by:
      getIdentity in interface Identified
      Returns:
      The Identity of the user currently logged in the application
    • setIdentity

      public void setIdentity(Identity identity)
      Description copied from interface: Identified
      Sets the Identity to the component
      Specified by:
      setIdentity in interface Identified
      Parameters:
      identity - The Identity that must be associated to the component
    • setNAME

      public void setNAME(String s)
      Sets the report's name.
      Parameters:
      s - The name to set.
    • getNAME

      public String getNAME()
      Gets the report's name.
      Returns:
      The name of the report.
    • drawInside

      public final void drawInside(Report r, float x, float y, float w, float h)
      Draw the component
      Parameters:
      r - The report where draw the component
      x - The x coordinate from which start draw.
      y - The y coordinate from which start draw.
      w - The width of the box.
      h - The height of the box.
    • drawInsideBack

      public abstract void drawInsideBack(Report r, float x, float y, float w, float h)
    • drawInsideFront

      public abstract void drawInsideFront(Report r, float x, float y, float w, float h)