Style Intelligence v12.0

inetsoft.report
Interface ReportElement

All Superinterfaces:
Cloneable, Serializable
All Known Subinterfaces:
AreaBreakElement, BeanElement, inetsoft.report.internal.BindableElement, inetsoft.report.internal.BindableTabularElement, ButtonElement, ChartElement, CheckBoxElement, ChoiceElement, CompositeElement, CondPageBreakElement, DateComboElement, EditRegionElement, FieldElement, FormElement, HeadingElement, ImageButtonElement, ListElement, NewlineElement, inetsoft.report.internal.NonScalar, PageBreakElement, PageLayoutElement, PainterElement, ParameterElement, RadioButtonElement, SectionElement, SeparatorElement, SpaceElement, SubreportElement, TabElement, TableElement, TextAreaElement, TextBoxElement, TextElement, TextFieldElement, TOCElement
All Known Implementing Classes:
inetsoft.report.internal.BaseElement, Context, PageLayout.InfoText, inetsoft.report.internal.TabSupport, inetsoft.report.internal.TextElementDef

public interface ReportElement
extends Serializable, Cloneable

This is the base class of all document element classes. It contains all common attributes. The attributes are copied from the document when the element is created, so if the attributes change after the element is created, the element is not affected.


Field Summary
static String AGGREGATE
          Property name of an aggregate function to apply to the query and selection result.
static String AUTOSIZE
          Property used to control if an element is autosize.
static String GROW
          Property used to control if an element can grow inside a section.
static String LOCAL_QUERY
          Property name of a query if the local query binding is defined for this element.
static String QUERY
          Property name of a query if the query binding is defined for this element.
static String XNODEPATH
          Property name of a node path selection specification.
 
Method Summary
 Object clone()
          Create a clone of this object.
 int getAlignment()
          Get the horizontal alignment.
 Color getBackground()
          Get element background color.
 String getCSSClass()
          Get the css class of the element
 Font getFont()
          Get element font.
 Color getForeground()
          Get element foreground color.
 String getFullName()
          Get the full name of this element.
 String getID()
          Get the id of this element.
 double getIndent()
          Get the element indentation in inches.
 String getOnClick()
          Get the Javascript onClick event handler.
 Size getPreferredSize()
          Return the size that is needed for this element.
 String getProperty(String name)
          Get an property of this element.
 Enumeration getPropertyNames()
          Get all attribute names.
 String getScript()
          Get the script associated with this element.
 int getSpacing()
          Get element line spacing in pixels.
 String getTarget()
          Get the hyperlink target (anchor) of this element.
 String getType()
          Return the element type.
 Object getUserObject()
          Get the user object.
 boolean isHideOnPrint()
          Check if the element should be hidden for printing and exporting.
 boolean isKeepWithNext()
          Check if this element should be kept on the same page as the next element.
 boolean isVisible()
          Check if this element is visible.
 void setAlignment(int alignment)
          Set the horizontal alignment.
 void setBackground(Color background)
          Set element background color.
 void setContext(ReportElement elem)
          Set the attributes of this element.
 void setCSSClass(String elementClass)
          Set the css class of the element.
 void setFont(Font font)
          Set element font.
 void setForeground(Color foreground)
          Set element foreground color.
 void setFullName(String name)
          Set the full name of this element.
 void setHideOnPrint(boolean hide)
          Set if the element should be hidden for printing and exporting.
 void setID(String id)
          Set the id of this element.
 void setIndent(double indent)
          Set the element indentation in inches.
 void setKeepWithNext(boolean keep)
          Set the keep with next flag of this element.
 void setOnClick(String cmd)
          Set the Javascript onClick event handler.
 void setProperty(String name, String attr)
          Set an property value.
 void setScript(String cmd)
          Set the script associated with this element.
 void setSpacing(int spacing)
          Set element line spacing in pixels.
 void setTarget(String target)
          Define the hyperlink target (anchor) of this element.
 void setUserObject(Object obj)
          Set an user object.
 void setVisible(boolean vis)
          Set the visibility of this element.
 

Field Detail

QUERY

static final String QUERY
Property name of a query if the query binding is defined for this element. This is normally set by the designer. For programmatic report creation, data query and aggregation can be done through API directly.

See Also:
Constant Field Values

LOCAL_QUERY

static final String LOCAL_QUERY
Property name of a query if the local query binding is defined for this element. This is normally set by the designer. For programmatic report creation, data query and aggregation can be done through API directly.

See Also:
Constant Field Values

XNODEPATH

static final String XNODEPATH
Property name of a node path selection specification. This is normally set by the designer. For programmatic report creation, data query and aggregation can be done through API directly.

See Also:
Constant Field Values

AGGREGATE

static final String AGGREGATE
Property name of an aggregate function to apply to the query and selection result. This is normally set by the designer. For programmatic report creation, data query and aggregation can be done through API directly.

See Also:
Constant Field Values

GROW

static final String GROW
Property used to control if an element can grow inside a section. It can be set to "true" or "false".

See Also:
Constant Field Values

AUTOSIZE

static final String AUTOSIZE
Property used to control if an element is autosize. It can be set to "true" or "false".

See Also:
Constant Field Values
Method Detail

getID

String getID()
Get the id of this element.


setID

void setID(String id)
Set the id of this element. The element ID must be unique across an entire report. The default ID generated for each element is always unique. If the ID is manually changed, the caller must make sure the new ID is unique.


getFullName

String getFullName()
Get the full name of this element. If this element is inside a bean, the name contains the bean ID appended with the element ID. It can be used together with element ID to uniquely identify an element in a report (elements in a bean may have same ID as the element in the report that uses the bean).


setFullName

void setFullName(String name)
Set the full name of this element. If the beans are nested, the name of the bean (bean element ID) are concatenated using a dot, e.g. Bean1.Bean2.Text1.


getAlignment

int getAlignment()
Get the horizontal alignment. The alignment is defined in StyleConstants H_LEFT, H_CENTER, H_RIGHT, and V_TOP, V_CENTER, V_RIGHT.


setAlignment

void setAlignment(int alignment)
Set the horizontal alignment. The value is one of H_LEFT, H_CENTER, H_RIGHT, and V_TOP, V_CENTER, V_RIGHT.


getIndent

double getIndent()
Get the element indentation in inches.


setIndent

void setIndent(double indent)
Set the element indentation in inches.


getFont

Font getFont()
Get element font.


setFont

void setFont(Font font)
Set element font.


getForeground

Color getForeground()
Get element foreground color.


setForeground

void setForeground(Color foreground)
Set element foreground color.


getBackground

Color getBackground()
Get element background color.


setBackground

void setBackground(Color background)
Set element background color.


getSpacing

int getSpacing()
Get element line spacing in pixels.


setSpacing

void setSpacing(int spacing)
Set element line spacing in pixels.


isVisible

boolean isVisible()
Check if this element is visible. Non-visible elements are not printed.

Returns:
true if element is visible.

setVisible

void setVisible(boolean vis)
Set the visibility of this element.

Parameters:
vis - false to hide an element.

isHideOnPrint

boolean isHideOnPrint()
Check if the element should be hidden for printing and exporting.


setHideOnPrint

void setHideOnPrint(boolean hide)
Set if the element should be hidden for printing and exporting.


isKeepWithNext

boolean isKeepWithNext()
Check if this element should be kept on the same page as the next element.


setKeepWithNext

void setKeepWithNext(boolean keep)
Set the keep with next flag of this element. If this is true, This element is always printed on the same page as the next element.


getScript

String getScript()
Get the script associated with this element.


setScript

void setScript(String cmd)
Set the script associated with this element. The script must be a valid Javascript script. The script is executed before this element is rendered.


getOnClick

String getOnClick()
Get the Javascript onClick event handler.


setOnClick

void setOnClick(String cmd)
Set the Javascript onClick event handler. This must be a valid Javascript script. It is invoked when this element is clicked on. This is only used in Style Report/EE.


getTarget

String getTarget()
Get the hyperlink target (anchor) of this element.


setTarget

void setTarget(String target)
Define the hyperlink target (anchor) of this element. If the target is defined, hyperlinks can refered to the location of this element using "#target" notation. This navigation is only used in Style Report Enterprise Edition.


getProperty

String getProperty(String name)
Get an property of this element. The properties are used to extend the report elements and allows additional information to be attached to the elements.

Parameters:
name - property name.
Returns:
property value.

setProperty

void setProperty(String name,
                 String attr)
Set an property value.

Parameters:
name - property name.
attr - property value. Use null value to remove an property.

getPropertyNames

Enumeration getPropertyNames()
Get all attribute names.


setContext

void setContext(ReportElement elem)
Set the attributes of this element.


getType

String getType()
Return the element type.


getPreferredSize

Size getPreferredSize()
Return the size that is needed for this element.


setUserObject

void setUserObject(Object obj)
Set an user object. The object must be serializable.


getUserObject

Object getUserObject()
Get the user object.


setCSSClass

void setCSSClass(String elementClass)
Set the css class of the element.

Parameters:
elementClass - class name as defined in the css style sheet.

getCSSClass

String getCSSClass()
Get the css class of the element


clone

Object clone()
Create a clone of this object.


Copyright © 1996-2014 InetSoft Technology Corp. All Rights Reserved.