net.sf.jasperreports.engine.design
Class JRDesignFrame

java.lang.Object
  extended by net.sf.jasperreports.engine.base.JRBaseElement
      extended by net.sf.jasperreports.engine.design.JRDesignElement
          extended by net.sf.jasperreports.engine.design.JRDesignFrame
All Implemented Interfaces:
java.io.Serializable, java.lang.Cloneable, JRChangeEventsSupport, JRBoxContainer, JRChild, JRCloneable, JRCommonElement, JRElement, JRElementGroup, JRFrame, JRIdentifiable, JRPropertiesHolder, JRStyleContainer, JRVisitable

public class JRDesignFrame
extends JRDesignElement
implements JRFrame

Implementation of JRFrame to be used at design time.

Version:
$Id: JRDesignFrame.java 5180 2012-03-29 13:23:12Z teodord $
Author:
Lucian Chirita (lucianc@users.sourceforge.net)
See Also:
Serialized Form

Field Summary
static java.lang.String PROPERTY_CHILDREN
           
 
Fields inherited from class net.sf.jasperreports.engine.design.JRDesignElement
PROPERTY_ELEMENT_GROUP, PROPERTY_HEIGHT, PROPERTY_KEY, PROPERTY_PARENT_STYLE, PROPERTY_PARENT_STYLE_NAME_REFERENCE, PROPERTY_PRINT_WHEN_EXPRESSION, PROPERTY_PRINT_WHEN_GROUP_CHANGES, PROPERTY_PROPERTY_EXPRESSIONS, PROPERTY_Y
 
Fields inherited from class net.sf.jasperreports.engine.base.JRBaseElement
backcolor, defaultStyleProvider, elementGroup, forecolor, height, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, key, modeValue, parentStyle, parentStyleNameReference, positionTypeValue, printWhenExpression, printWhenGroupChanges, PROPERTY_POSITION_TYPE, PROPERTY_PRINT_IN_FIRST_WHOLE_BAND, PROPERTY_PRINT_REPEATED_VALUES, PROPERTY_PRINT_WHEN_DETAIL_OVERFLOWS, PROPERTY_REMOVE_LINE_WHEN_BLANK, PROPERTY_STRETCH_TYPE, PROPERTY_WIDTH, PROPERTY_X, stretchTypeValue, uuid, width, x, y
 
Constructor Summary
JRDesignFrame()
          Creates a new frame object.
JRDesignFrame(JRDefaultStyleProvider defaultStyleProvider)
          Creates a new frame object.
 
Method Summary
 void addElement(int index, JRElement element)
          Inserts a sub element at specified position into the frame.
 void addElement(JRElement element)
          Adds a sub element to the frame.
 void addElementGroup(int index, JRElementGroup group)
          Inserts an element group at specified position into the frame.
 void addElementGroup(JRElementGroup group)
          Adds an element group to the frame.
 java.lang.Object clone()
           
 void collectExpressions(JRExpressionCollector collector)
           
 void copyBox(JRLineBox lineBox)
           
 java.util.List<JRChild> getChildren()
          Gets a list of all direct children elements or elements groups.
 java.awt.Color getDefaultLineColor()
           
 JRElement getElementByKey(java.lang.String elementKey)
          Gets an element from this group, based on its element key.
 JRElement[] getElements()
          Gets an array containing all the elements and element groups in the hierarchy.
 JRLineBox getLineBox()
           
 ModeEnum getModeValue()
          Returns the element transparency mode.
 boolean removeElement(JRElement element)
          Removes a sub element from the frame.
 boolean removeElementGroup(JRElementGroup group)
          Removes a group element from the frame.
 void visit(JRVisitor visitor)
           
 
Methods inherited from class net.sf.jasperreports.engine.design.JRDesignElement
addPropertyExpression, getPropertyExpressions, getPropertyExpressionsList, removePropertyExpression, removePropertyExpression, setElementGroup, setHeight, setKey, setPrintWhenExpression, setPrintWhenGroupChanges, setStyle, setStyleNameReference, setUUID, setY
 
Methods inherited from class net.sf.jasperreports.engine.base.JRBaseElement
clone, getBackcolor, getBaseStyle, getDefaultStyleProvider, getElementGroup, getEventSupport, getForecolor, getHeight, getKey, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getParentProperties, getPositionTypeValue, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertiesMap, getStretchTypeValue, getStyle, getStyleNameReference, getUUID, getWidth, getX, getY, hasProperties, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setBackcolor, setForecolor, setMode, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setWidth, setX
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface net.sf.jasperreports.engine.JRElement
getElementGroup, getKey, getPositionTypeValue, getPrintWhenExpression, getPrintWhenGroupChanges, getPropertyExpressions, getStretchTypeValue, getX, getY, isPrintInFirstWholeBand, isPrintRepeatedValues, isPrintWhenDetailOverflows, isRemoveLineWhenBlank, setPositionType, setPrintInFirstWholeBand, setPrintRepeatedValues, setPrintWhenDetailOverflows, setRemoveLineWhenBlank, setStretchType, setWidth, setX
 
Methods inherited from interface net.sf.jasperreports.engine.JRCommonElement
getBackcolor, getForecolor, getHeight, getOwnBackcolor, getOwnForecolor, getOwnModeValue, getWidth, setBackcolor, setForecolor, setMode
 
Methods inherited from interface net.sf.jasperreports.engine.JRStyleContainer
getDefaultStyleProvider, getStyle, getStyleNameReference
 
Methods inherited from interface net.sf.jasperreports.engine.JRIdentifiable
getUUID
 
Methods inherited from interface net.sf.jasperreports.engine.JRPropertiesHolder
getParentProperties, getPropertiesMap, hasProperties
 
Methods inherited from interface net.sf.jasperreports.engine.JRElementGroup
getElementGroup
 
Methods inherited from interface net.sf.jasperreports.engine.JRChild
clone
 

Field Detail

PROPERTY_CHILDREN

public static final java.lang.String PROPERTY_CHILDREN
See Also:
Constant Field Values
Constructor Detail

JRDesignFrame

public JRDesignFrame(JRDefaultStyleProvider defaultStyleProvider)
Creates a new frame object.

Parameters:
defaultStyleProvider - default style provider instance

JRDesignFrame

public JRDesignFrame()
Creates a new frame object.

Method Detail

collectExpressions

public void collectExpressions(JRExpressionCollector collector)
Specified by:
collectExpressions in interface JRElement

visit

public void visit(JRVisitor visitor)
Specified by:
visit in interface JRVisitable

getElements

public JRElement[] getElements()
Description copied from interface: JRElementGroup
Gets an array containing all the elements and element groups in the hierarchy.

Specified by:
getElements in interface JRElementGroup

addElement

public void addElement(JRElement element)
Adds a sub element to the frame.

Parameters:
element - the element to add

addElement

public void addElement(int index,
                       JRElement element)
Inserts a sub element at specified position into the frame.

Parameters:
index - the element position
element - the element to add

removeElement

public boolean removeElement(JRElement element)
Removes a sub element from the frame.

Parameters:
element - the element to remove
Returns:
true if this frame contained the specified element

addElementGroup

public void addElementGroup(JRElementGroup group)
Adds an element group to the frame.

Parameters:
group - the element group to add

addElementGroup

public void addElementGroup(int index,
                            JRElementGroup group)
Inserts an element group at specified position into the frame.

Parameters:
index - the element group position
group - the element group to add

removeElementGroup

public boolean removeElementGroup(JRElementGroup group)
Removes a group element from the frame.

Parameters:
group - the group to remove
Returns:
true if this frame contained the specified group

getChildren

public java.util.List<JRChild> getChildren()
Description copied from interface: JRElementGroup
Gets a list of all direct children elements or elements groups.

Specified by:
getChildren in interface JRElementGroup

getElementByKey

public JRElement getElementByKey(java.lang.String elementKey)
Description copied from interface: JRElementGroup
Gets an element from this group, based on its element key.

Specified by:
getElementByKey in interface JRElementGroup

getModeValue

public ModeEnum getModeValue()
Description copied from interface: JRCommonElement
Returns the element transparency mode. The default value depends on the type of the report element. Graphic elements like rectangles and lines are opaque by default, but the images are transparent. Both static texts and text fields are transparent by default, and so are the subreport elements.

Specified by:
getModeValue in interface JRCommonElement
Overrides:
getModeValue in class JRBaseElement

getLineBox

public JRLineBox getLineBox()
Specified by:
getLineBox in interface JRBoxContainer

copyBox

public void copyBox(JRLineBox lineBox)

getDefaultLineColor

public java.awt.Color getDefaultLineColor()
Specified by:
getDefaultLineColor in interface JRBoxContainer

clone

public java.lang.Object clone()
Specified by:
clone in interface JRCloneable
Overrides:
clone in class JRBaseElement


© 2001-2010 Jaspersoft Corporation www.jaspersoft.com