com.java4less.rreport
Class RObject

java.lang.Object
  |
  +--com.java4less.rreport.RObject
Direct Known Subclasses:
RBarcoding, RCombo, RExampleUserObject, RField, RGraph, RLine, RPageBreak, RPicture, RRectangle, RTriangle, RUserComponent, RUserObject

public class RObject
extends java.lang.Object

All elements in a report are descendant from RObject. You can create new elements by extending RObject.


Field Summary
static int ALIGN_CENTER
           
static int ALIGN_LEFT
           
static int ALIGN_RIGHT
           
 boolean constant
          does this object has a constant value?
 java.lang.String DHTMLLink
          link for the element when exporting to DHTML
 java.lang.String fieldName
          name of associate field in the database
 double height
          position and size of the object in centimeters.
 java.lang.String name
          name of the object
 boolean selectable
          can this object be selected by the user in the preview window?
 java.lang.String tooltip
          tool tip for preview
 boolean triggerAction
          trigger action?
 boolean visible
          is this object going to be visible?
 double width
          position and size of the object in centimeters.
 double x
          position and size of the object in centimeters.
 double y
          position and size of the object in centimeters.
 
Constructor Summary
RObject()
           
 
Method Summary
 boolean canHTML()
          returns whether the class support HTML.
static java.awt.Color convertColor(java.lang.String c)
          convert a string to a color.
static double[] convertDoubleList(java.lang.String items)
          convert a string to a list of double.
static java.awt.Font convertFont(java.lang.String f)
          convert a string to a font.
static java.lang.String[] convertList(java.lang.String items)
          convert a string to a list of String.
 void convertToCM(int r)
          used by RReport only
 void convertToPixels(int r)
          used by RReport only
 void createFile(java.awt.Image image, java.lang.String file, java.lang.String format)
          create image file
 boolean getActivateAction()
          returns whether this object can trigger events if the user clicks on the object (in preview mode)
 java.lang.Object getdefaultValue()
          returns default value.
 java.lang.Object getruntimeValue()
          returns runtime value
 void importLine(java.lang.String key, java.lang.String val)
          read and process line.
 boolean isConstant()
          returns whether this object has a constant value.
 boolean isVisible()
          returns whether this object is visible
 void print(java.awt.Graphics g, double px, double py, java.lang.Object Value)
          print object at the specified location (in pixels) using the specified value.
 void setActivateAction(boolean b)
          sets whether this object can trigger events if the user clicks on the object (in preview mode)
 void setConstant(boolean b)
          sets whether this object has a constant value.
 void setdefaultValue(java.lang.Object Value)
          sets default value.
 void setruntimeValue(java.lang.Object Value)
          sets runtime value
 void setVisible(boolean b)
          sets whether this object is visible
 java.lang.String toHTML(java.lang.Object Value)
          returns the HTML version of the element.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ALIGN_RIGHT

public static final int ALIGN_RIGHT

ALIGN_LEFT

public static final int ALIGN_LEFT

ALIGN_CENTER

public static final int ALIGN_CENTER

x

public double x
position and size of the object in centimeters.

y

public double y
position and size of the object in centimeters.

width

public double width
position and size of the object in centimeters.

height

public double height
position and size of the object in centimeters.

DHTMLLink

public java.lang.String DHTMLLink
link for the element when exporting to DHTML

selectable

public boolean selectable
can this object be selected by the user in the preview window? (for tooltips and actions)

name

public java.lang.String name
name of the object

constant

public boolean constant
does this object has a constant value?

fieldName

public java.lang.String fieldName
name of associate field in the database

visible

public boolean visible
is this object going to be visible?

tooltip

public java.lang.String tooltip
tool tip for preview

triggerAction

public boolean triggerAction
trigger action?
Constructor Detail

RObject

public RObject()
Method Detail

isConstant

public boolean isConstant()
returns whether this object has a constant value.

setConstant

public void setConstant(boolean b)
sets whether this object has a constant value.

isVisible

public boolean isVisible()
returns whether this object is visible

setVisible

public void setVisible(boolean b)
sets whether this object is visible

getActivateAction

public boolean getActivateAction()
returns whether this object can trigger events if the user clicks on the object (in preview mode)

setActivateAction

public void setActivateAction(boolean b)
sets whether this object can trigger events if the user clicks on the object (in preview mode)

print

public void print(java.awt.Graphics g,
                  double px,
                  double py,
                  java.lang.Object Value)
print object at the specified location (in pixels) using the specified value.

toHTML

public java.lang.String toHTML(java.lang.Object Value)
returns the HTML version of the element.

canHTML

public boolean canHTML()
returns whether the class support HTML.

convertToPixels

public void convertToPixels(int r)
used by RReport only

convertToCM

public void convertToCM(int r)
used by RReport only

setdefaultValue

public void setdefaultValue(java.lang.Object Value)
sets default value.

getdefaultValue

public java.lang.Object getdefaultValue()
returns default value.

setruntimeValue

public void setruntimeValue(java.lang.Object Value)
sets runtime value

getruntimeValue

public java.lang.Object getruntimeValue()
returns runtime value

convertColor

public static java.awt.Color convertColor(java.lang.String c)
convert a string to a color. To be used when reading report from *.rep files.Internal use.

convertFont

public static java.awt.Font convertFont(java.lang.String f)
convert a string to a font. To be used when reading report from *.rep files.Internal use.

convertDoubleList

public static double[] convertDoubleList(java.lang.String items)
convert a string to a list of double. To be used when reading report from *.rep files.Internal use.

convertList

public static java.lang.String[] convertList(java.lang.String items)
convert a string to a list of String. To be used when reading report from *.rep files.Internal use.

importLine

public void importLine(java.lang.String key,
                       java.lang.String val)
read and process line. To be used when reading report from *.rep files. Internal use.

createFile

public void createFile(java.awt.Image image,
                       java.lang.String file,
                       java.lang.String format)
create image file