Style Intelligence v12.0

inetsoft.report
Class Context

java.lang.Object
  extended by inetsoft.report.Context
All Implemented Interfaces:
ReportElement, Serializable, Cloneable

public class Context
extends Object
implements ReportElement, Serializable

Report context (all attributes affecting the elements). This is mostly used internally to handle the report context setting. Applications should call ReportSheet methods to change the current context when populating a report.

See Also:
Serialized Form

Field Summary
 
Fields inherited from interface inetsoft.report.ReportElement
AGGREGATE, AUTOSIZE, GROW, LOCAL_QUERY, QUERY, XNODEPATH
 
Constructor Summary
Context(ReportElement elem)
          Save the current context from an element.
Context(ReportSheet report)
          Save the current context of a report.
 
Method Summary
 Object clone()
          Create a clone of this object.
 int getAlignment()
          Get alignment setting.
 Color getBackground()
          Get background color.
 Insets getCellPadding()
          Get cell padding space.
 String getCSSClass()
          Get the css class of the element
 Font getFont()
          Get font setting.
 Color getForeground()
          Get foreground color.
 String getFullName()
          Get the id of this element.
 String getID()
          Get the id of this element.
 double getIndent()
          Get indent in inches.
 String getOnClick()
          Get the Javascript onClick event handler.
 int getPainterLayout()
          Get painter layout setting.
 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 line spacing.
 int getTableLayout()
          Get table layout setting.
 double getTableWidth()
          Get table width setting.
 double[] getTabStops()
          Get tab stops.
 String getTarget()
          Get the hyperlink target (anchor) of this element.
 int getTextAdvance()
          Get text advance amount in pixels.
 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 isOrphanControl()
          Check if widow/orphan control is on.
 boolean isVisible()
          This method is ignored.
 void restore()
          Restore the context in its associated report.
 void setAlignment(int align)
          Set alignment setting.
 void setBackground(Color bg)
          Set background color.
 void setCellPadding(Insets padding)
          Set cell padding space.
 void setContext(ReportElement elem)
          Set the attributes.
 void setCSSClass(String elementClass)
          Set the css class of the element.
 void setFont(Font font)
          Set font setting.
 void setForeground(Color fg)
          Set foreground color.
 void setFullName(String id)
          This method is ignored.
 void setHideOnPrint(boolean hide)
          Set if the element should be hidden for printing and exporting.
 void setID(String id)
          This method is ignored.
 void setIndent(double indent)
          Set indent in inches.
 void setKeepWithNext(boolean keep)
          Set keep with next.
 void setOnClick(String cmd)
          Set the Javascript onClick event handler.
 void setOrphanControl(boolean orphan)
          Set widow/orphan control.
 void setPainterLayout(int policy)
          Set painter layout setting.
 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 line spacing.
 void setTableLayout(int autosize)
          Set table layout setting.
 void setTableWidth(double tblwidth)
          Set table width setting.
 void setTabStops(double[] tabstops)
          Set tab stops.
 void setTarget(String target)
          Define the hyperlink target (anchor) of this element.
 void setTextAdvance(int adv)
          Set text advance.
 void setUserObject(Object obj)
          Set an user object.
 void setVisible(boolean vis)
          This method is ignored.
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Context

public Context(ReportSheet report)
Save the current context of a report.


Context

public Context(ReportElement elem)
Save the current context from an element.

Method Detail

setContext

public void setContext(ReportElement elem)
Set the attributes. All attribute values are copied from the element.

Specified by:
setContext in interface ReportElement

restore

public void restore()
Restore the context in its associated report.


getID

public String getID()
Get the id of this element.

Specified by:
getID in interface ReportElement

setID

public void setID(String id)
This method is ignored.

Specified by:
setID in interface ReportElement

getFullName

public String getFullName()
Get the id of this element.

Specified by:
getFullName in interface ReportElement

setFullName

public void setFullName(String id)
This method is ignored.

Specified by:
setFullName in interface ReportElement

isVisible

public boolean isVisible()
This method is ignored.

Specified by:
isVisible in interface ReportElement
Returns:
true if element is visible.

setVisible

public void setVisible(boolean vis)
This method is ignored.

Specified by:
setVisible in interface ReportElement
Parameters:
vis - false to hide an element.

getType

public String getType()
Return the element type.

Specified by:
getType in interface ReportElement

getAlignment

public int getAlignment()
Get alignment setting.

Specified by:
getAlignment in interface ReportElement

setAlignment

public void setAlignment(int align)
Set alignment setting.

Specified by:
setAlignment in interface ReportElement

getIndent

public double getIndent()
Get indent in inches.

Specified by:
getIndent in interface ReportElement

setIndent

public void setIndent(double indent)
Set indent in inches.

Specified by:
setIndent in interface ReportElement

getSpacing

public int getSpacing()
Get line spacing.

Specified by:
getSpacing in interface ReportElement

setSpacing

public void setSpacing(int spacing)
Set line spacing.

Specified by:
setSpacing in interface ReportElement

getFont

public Font getFont()
Get font setting.

Specified by:
getFont in interface ReportElement

setFont

public void setFont(Font font)
Set font setting.

Specified by:
setFont in interface ReportElement

getForeground

public Color getForeground()
Get foreground color.

Specified by:
getForeground in interface ReportElement

setForeground

public void setForeground(Color fg)
Set foreground color.

Specified by:
setForeground in interface ReportElement

getBackground

public Color getBackground()
Get background color.

Specified by:
getBackground in interface ReportElement

setBackground

public void setBackground(Color bg)
Set background color.

Specified by:
setBackground in interface ReportElement

getTableLayout

public int getTableLayout()
Get table layout setting.


setTableLayout

public void setTableLayout(int autosize)
Set table layout setting.


getPainterLayout

public int getPainterLayout()
Get painter layout setting.


setPainterLayout

public void setPainterLayout(int policy)
Set painter layout setting.


getCellPadding

public Insets getCellPadding()
Get cell padding space.


setCellPadding

public void setCellPadding(Insets padding)
Set cell padding space.


getTableWidth

public double getTableWidth()
Get table width setting.


setTableWidth

public void setTableWidth(double tblwidth)
Set table width setting.


getTabStops

public double[] getTabStops()
Get tab stops.


setTabStops

public void setTabStops(double[] tabstops)
Set tab stops.


getTextAdvance

public int getTextAdvance()
Get text advance amount in pixels.


setTextAdvance

public void setTextAdvance(int adv)
Set text advance.


isOrphanControl

public boolean isOrphanControl()
Check if widow/orphan control is on.


setOrphanControl

public void setOrphanControl(boolean orphan)
Set widow/orphan control.


isKeepWithNext

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

Specified by:
isKeepWithNext in interface ReportElement

setKeepWithNext

public void setKeepWithNext(boolean keep)
Set keep with next.

Specified by:
setKeepWithNext in interface ReportElement

getScript

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

Specified by:
getScript in interface ReportElement

setScript

public void setScript(String cmd)
Set the script associated with this element.

Specified by:
setScript in interface ReportElement

getOnClick

public String getOnClick()
Get the Javascript onClick event handler.

Specified by:
getOnClick in interface ReportElement

setOnClick

public void setOnClick(String cmd)
Set the Javascript onClick event handler.

Specified by:
setOnClick in interface ReportElement

getTarget

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

Specified by:
getTarget in interface ReportElement

setTarget

public 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.

Specified by:
setTarget in interface ReportElement

isHideOnPrint

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

Specified by:
isHideOnPrint in interface ReportElement

setHideOnPrint

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

Specified by:
setHideOnPrint in interface ReportElement

getProperty

public 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.

Specified by:
getProperty in interface ReportElement
Parameters:
name - property name.
Returns:
property value.

setProperty

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

Specified by:
setProperty in interface ReportElement
Parameters:
name - property name.
attr - property value. Use null value to remove an property.

getPropertyNames

public Enumeration getPropertyNames()
Get all attribute names.

Specified by:
getPropertyNames in interface ReportElement

setUserObject

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

Specified by:
setUserObject in interface ReportElement

getUserObject

public Object getUserObject()
Get the user object.

Specified by:
getUserObject in interface ReportElement

clone

public Object clone()
Description copied from interface: ReportElement
Create a clone of this object.

Specified by:
clone in interface ReportElement
Overrides:
clone in class Object

getPreferredSize

public Size getPreferredSize()
Description copied from interface: ReportElement
Return the size that is needed for this element.

Specified by:
getPreferredSize in interface ReportElement

setCSSClass

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

Specified by:
setCSSClass in interface ReportElement
Parameters:
elementClass - the name of the class as defined in the css style sheet.

getCSSClass

public String getCSSClass()
Get the css class of the element

Specified by:
getCSSClass in interface ReportElement

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