org.eclipse.birt.chart.model.layout
Interface Block

All Superinterfaces:
org.eclipse.emf.ecore.EObject, org.eclipse.emf.common.notify.Notifier
All Known Subinterfaces:
LabelBlock, Legend, Plot, TitleBlock
All Known Implementing Classes:
BlockImpl, LabelBlockImpl, LegendImpl, PlotImpl, TitleBlockImpl

public interface Block
extends org.eclipse.emf.ecore.EObject

A representation of the model object ' Block'. This type defines a modular area of a chart that can be positioned within the chart bounds.

The following features are supported:

See Also:
LayoutPackage.getBlock()

Method Summary
 void add(Block bl)
          Adds a block into the children hierarchy
 java.util.Enumeration children(boolean bRecursive)
           
 Anchor getAnchor()
          Returns the value of the 'Anchor' attribute.
 Fill getBackground()
          Returns the value of the 'Background' containment reference.
 Bounds getBounds()
          Returns the value of the 'Bounds' containment reference.
 org.eclipse.emf.common.util.EList getChildren()
          Returns the value of the 'Children' containment reference list.
 int getColumn()
          Returns the value of the 'Column' attribute.
 int getColumnspan()
          Returns the value of the 'Columnspan' attribute.
 double getHeightHint()
          Returns the value of the 'Height Hint' attribute.
 Insets getInsets()
          Returns the value of the 'Insets' containment reference.
 Size getMinSize()
          Returns the value of the 'Min Size' containment reference.
 LineAttributes getOutline()
          Returns the value of the 'Outline' containment reference.
 Size getPreferredSize(IDisplayServer xs, Chart cm, RunTimeContext rtc)
          Computes and returns the size of the title block based on the text content and its attributes
 int getRow()
          Returns the value of the 'Row' attribute.
 int getRowspan()
          Returns the value of the 'Rowspan' attribute.
 Stretch getStretch()
          Returns the value of the 'Stretch' attribute.
 org.eclipse.emf.common.util.EList getTriggers()
          Returns the value of the 'Triggers' containment reference list.
 double getWidthHint()
          Returns the value of the 'Width Hint' attribute.
 boolean isCustom()
           
 boolean isLegend()
           
 boolean isPlot()
           
 boolean isSetAnchor()
          Returns whether the value of the 'Anchor' attribute is set.
 boolean isSetColumn()
          Returns whether the value of the 'Column' attribute is set.
 boolean isSetColumnspan()
          Returns whether the value of the 'Columnspan' attribute is set.
 boolean isSetHeightHint()
          Returns whether the value of the 'Height Hint' attribute is set.
 boolean isSetRow()
          Returns whether the value of the 'Row' attribute is set.
 boolean isSetRowspan()
          Returns whether the value of the 'Rowspan' attribute is set.
 boolean isSetStretch()
          Returns whether the value of the 'Stretch' attribute is set.
 boolean isSetVisible()
          Returns whether the value of the 'Visible' attribute is set.
 boolean isSetWidthHint()
          Returns whether the value of the 'Width Hint' attribute is set.
 boolean isText()
           
 boolean isTitle()
           
 boolean isVisible()
          Returns the value of the 'Visible' attribute.
 void remove(Block bl)
          Removes a block from the children hierarchy
 void setAnchor(Anchor value)
          Sets the value of the 'Anchor' attribute.
 void setBackground(Fill value)
          Sets the value of the 'Background' containment reference.
 void setBounds(Bounds value)
          Sets the value of the 'Bounds' containment reference.
 void setColumn(int value)
          Sets the value of the 'Column' attribute.
 void setColumnspan(int value)
          Sets the value of the 'Columnspan' attribute.
 void setHeightHint(double value)
          Sets the value of the 'Height Hint' attribute.
 void setInsets(Insets value)
          Sets the value of the 'Insets' containment reference.
 void setMinSize(Size value)
          Sets the value of the 'Min Size' containment reference.
 void setOutline(LineAttributes value)
          Sets the value of the 'Outline' containment reference.
 void setRow(int value)
          Sets the value of the 'Row' attribute.
 void setRowspan(int value)
          Sets the value of the 'Rowspan' attribute.
 void setStretch(Stretch value)
          Sets the value of the 'Stretch' attribute.
 void setVisible(boolean value)
          Sets the value of the 'Visible' attribute.
 void setWidthHint(double value)
          Sets the value of the 'Width Hint' attribute.
 void unsetAnchor()
          Unsets the value of the 'Anchor' attribute.
 void unsetColumn()
          Unsets the value of the 'Column' attribute.
 void unsetColumnspan()
          Unsets the value of the 'Columnspan' attribute.
 void unsetHeightHint()
          Unsets the value of the 'Height Hint' attribute.
 void unsetRow()
          Unsets the value of the 'Row' attribute.
 void unsetRowspan()
          Unsets the value of the 'Rowspan' attribute.
 void unsetStretch()
          Unsets the value of the 'Stretch' attribute.
 void unsetVisible()
          Unsets the value of the 'Visible' attribute.
 void unsetWidthHint()
          Unsets the value of the 'Width Hint' attribute.
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eIsProxy, eIsSet, eResource, eSet, eUnset
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 

Method Detail

getChildren

public org.eclipse.emf.common.util.EList getChildren()
Returns the value of the 'Children' containment reference list. The list contents are of type Block. Gets the blocks contained within this block. Specifies the block's children.

Returns:
the value of the 'Children' containment reference list.
See Also:
LayoutPackage.getBlock_Children()

getBounds

public Bounds getBounds()
Returns the value of the 'Bounds' containment reference. Gets the bounds for the block. Bounds of a block are only used if it is added to a block that has the Null layout. Defines the position and size of the block. (These will usually be relative to the TLC of the container block.

Returns:
the value of the 'Bounds' containment reference.
See Also:
setBounds(Bounds), LayoutPackage.getBlock_Bounds()

setBounds

public void setBounds(Bounds value)
Sets the value of the 'Bounds' containment reference.

Parameters:
value - the new value of the 'Bounds' containment reference.
See Also:
getBounds()

getAnchor

public Anchor getAnchor()
Returns the value of the 'Anchor' attribute. The default value is "North". The literals are from the enumeration Anchor. Specifies where the content of the block is anchored.

Returns:
the value of the 'Anchor' attribute.
See Also:
Anchor, isSetAnchor(), unsetAnchor(), setAnchor(Anchor), LayoutPackage.getBlock_Anchor()

setAnchor

public void setAnchor(Anchor value)
Sets the value of the 'Anchor' attribute.

Parameters:
value - the new value of the 'Anchor' attribute.
See Also:
Anchor, isSetAnchor(), unsetAnchor(), getAnchor()

unsetAnchor

public void unsetAnchor()
Unsets the value of the 'Anchor' attribute.

See Also:
isSetAnchor(), getAnchor(), setAnchor(Anchor)

isSetAnchor

public boolean isSetAnchor()
Returns whether the value of the 'Anchor' attribute is set.

Returns:
whether the value of the 'Anchor' attribute is set.
See Also:
unsetAnchor(), getAnchor(), setAnchor(Anchor)

getStretch

public Stretch getStretch()
Returns the value of the 'Stretch' attribute. The default value is "Horizontal". The literals are from the enumeration Stretch. Specifies how the content of the block fills up available space.

Returns:
the value of the 'Stretch' attribute.
See Also:
Stretch, isSetStretch(), unsetStretch(), setStretch(Stretch), LayoutPackage.getBlock_Stretch()

setStretch

public void setStretch(Stretch value)
Sets the value of the 'Stretch' attribute.

Parameters:
value - the new value of the 'Stretch' attribute.
See Also:
Stretch, isSetStretch(), unsetStretch(), getStretch()

unsetStretch

public void unsetStretch()
Unsets the value of the 'Stretch' attribute.

See Also:
isSetStretch(), getStretch(), setStretch(Stretch)

isSetStretch

public boolean isSetStretch()
Returns whether the value of the 'Stretch' attribute is set.

Returns:
whether the value of the 'Stretch' attribute is set.
See Also:
unsetStretch(), getStretch(), setStretch(Stretch)

getInsets

public Insets getInsets()
Returns the value of the 'Insets' containment reference. Defines the insets to be used for this block's contents.

Returns:
the value of the 'Insets' containment reference.
See Also:
setInsets(Insets), LayoutPackage.getBlock_Insets()

setInsets

public void setInsets(Insets value)
Sets the value of the 'Insets' containment reference.

Parameters:
value - the new value of the 'Insets' containment reference.
See Also:
getInsets()

getRow

public int getRow()
Returns the value of the 'Row' attribute. Defines the row index for the block.

Returns:
the value of the 'Row' attribute.
See Also:
isSetRow(), unsetRow(), setRow(int), LayoutPackage.getBlock_Row()

setRow

public void setRow(int value)
Sets the value of the 'Row' attribute.

Parameters:
value - the new value of the 'Row' attribute.
See Also:
isSetRow(), unsetRow(), getRow()

unsetRow

public void unsetRow()
Unsets the value of the 'Row' attribute.

See Also:
isSetRow(), getRow(), setRow(int)

isSetRow

public boolean isSetRow()
Returns whether the value of the 'Row' attribute is set.

Returns:
whether the value of the 'Row' attribute is set.
See Also:
unsetRow(), getRow(), setRow(int)

getColumn

public int getColumn()
Returns the value of the 'Column' attribute. Defines the column index for the block.

Returns:
the value of the 'Column' attribute.
See Also:
isSetColumn(), unsetColumn(), setColumn(int), LayoutPackage.getBlock_Column()

setColumn

public void setColumn(int value)
Sets the value of the 'Column' attribute.

Parameters:
value - the new value of the 'Column' attribute.
See Also:
isSetColumn(), unsetColumn(), getColumn()

unsetColumn

public void unsetColumn()
Unsets the value of the 'Column' attribute.

See Also:
isSetColumn(), getColumn(), setColumn(int)

isSetColumn

public boolean isSetColumn()
Returns whether the value of the 'Column' attribute is set.

Returns:
whether the value of the 'Column' attribute is set.
See Also:
unsetColumn(), getColumn(), setColumn(int)

getRowspan

public int getRowspan()
Returns the value of the 'Rowspan' attribute. Gets the rowspan value for the block. This specifies the number of rows that the block spans in its container's layout. Defines the rowspan value for the block.

Returns:
the value of the 'Rowspan' attribute.
See Also:
isSetRowspan(), unsetRowspan(), setRowspan(int), LayoutPackage.getBlock_Rowspan()

setRowspan

public void setRowspan(int value)
Sets the value of the 'Rowspan' attribute.

Parameters:
value - the new value of the 'Rowspan' attribute.
See Also:
isSetRowspan(), unsetRowspan(), getRowspan()

unsetRowspan

public void unsetRowspan()
Unsets the value of the 'Rowspan' attribute.

See Also:
isSetRowspan(), getRowspan(), setRowspan(int)

isSetRowspan

public boolean isSetRowspan()
Returns whether the value of the 'Rowspan' attribute is set.

Returns:
whether the value of the 'Rowspan' attribute is set.
See Also:
unsetRowspan(), getRowspan(), setRowspan(int)

getColumnspan

public int getColumnspan()
Returns the value of the 'Columnspan' attribute. Gets the columnspan value for the block. This specifies the number of columns that the block spans in its container's layout. Defines the columnspan value for the block.

Returns:
the value of the 'Columnspan' attribute.
See Also:
isSetColumnspan(), unsetColumnspan(), setColumnspan(int), LayoutPackage.getBlock_Columnspan()

setColumnspan

public void setColumnspan(int value)
Sets the value of the 'Columnspan' attribute.

Parameters:
value - the new value of the 'Columnspan' attribute.
See Also:
isSetColumnspan(), unsetColumnspan(), getColumnspan()

unsetColumnspan

public void unsetColumnspan()
Unsets the value of the 'Columnspan' attribute.

See Also:
isSetColumnspan(), getColumnspan(), setColumnspan(int)

isSetColumnspan

public boolean isSetColumnspan()
Returns whether the value of the 'Columnspan' attribute is set.

Returns:
whether the value of the 'Columnspan' attribute is set.
See Also:
unsetColumnspan(), getColumnspan(), setColumnspan(int)

getMinSize

public Size getMinSize()
Returns the value of the 'Min Size' containment reference. Gets the minimum size for the block. This used to determine the minimum size required to render this block without degradation in quality of output. It is used when the block is added to a container with Elastic layout. Defines the minimum size for the block.

Returns:
the value of the 'Min Size' containment reference.
See Also:
setMinSize(Size), LayoutPackage.getBlock_MinSize()

setMinSize

public void setMinSize(Size value)
Sets the value of the 'Min Size' containment reference.

Parameters:
value - the new value of the 'Min Size' containment reference.
See Also:
getMinSize()

getOutline

public LineAttributes getOutline()
Returns the value of the 'Outline' containment reference. Gets the line properties of the border for the block. Defines the outline for the chart element.

Returns:
the value of the 'Outline' containment reference.
See Also:
setOutline(LineAttributes), LayoutPackage.getBlock_Outline()

setOutline

public void setOutline(LineAttributes value)
Sets the value of the 'Outline' containment reference.

Parameters:
value - the new value of the 'Outline' containment reference.
See Also:
getOutline()

getBackground

public Fill getBackground()
Returns the value of the 'Background' containment reference. Background for the Block...Can be transparent, solid color, gradient, pattern OR image

Returns:
the value of the 'Background' containment reference.
See Also:
setBackground(Fill), LayoutPackage.getBlock_Background()

setBackground

public void setBackground(Fill value)
Sets the value of the 'Background' containment reference.

Parameters:
value - the new value of the 'Background' containment reference.
See Also:
getBackground()

isVisible

public boolean isVisible()
Returns the value of the 'Visible' attribute. Specifies whether the block is visible.

Returns:
the value of the 'Visible' attribute.
See Also:
isSetVisible(), unsetVisible(), setVisible(boolean), LayoutPackage.getBlock_Visible()

setVisible

public void setVisible(boolean value)
Sets the value of the 'Visible' attribute.

Parameters:
value - the new value of the 'Visible' attribute.
See Also:
isSetVisible(), unsetVisible(), isVisible()

unsetVisible

public void unsetVisible()
Unsets the value of the 'Visible' attribute.

See Also:
isSetVisible(), isVisible(), setVisible(boolean)

isSetVisible

public boolean isSetVisible()
Returns whether the value of the 'Visible' attribute is set.

Returns:
whether the value of the 'Visible' attribute is set.
See Also:
unsetVisible(), isVisible(), setVisible(boolean)

getTriggers

public org.eclipse.emf.common.util.EList getTriggers()
Returns the value of the 'Triggers' containment reference list. The list contents are of type Trigger. Holds the actions for the block.

Returns:
the value of the 'Triggers' containment reference list.
See Also:
LayoutPackage.getBlock_Triggers()

getWidthHint

public double getWidthHint()
Returns the value of the 'Width Hint' attribute. The default value is "-1". Specifies a hinted width for the block.

Returns:
the value of the 'Width Hint' attribute.
See Also:
isSetWidthHint(), unsetWidthHint(), setWidthHint(double), LayoutPackage.getBlock_WidthHint()

setWidthHint

public void setWidthHint(double value)
Sets the value of the 'Width Hint' attribute.

Parameters:
value - the new value of the 'Width Hint' attribute.
See Also:
isSetWidthHint(), unsetWidthHint(), getWidthHint()

unsetWidthHint

public void unsetWidthHint()
Unsets the value of the 'Width Hint' attribute.

See Also:
isSetWidthHint(), getWidthHint(), setWidthHint(double)

isSetWidthHint

public boolean isSetWidthHint()
Returns whether the value of the 'Width Hint' attribute is set.

Returns:
whether the value of the 'Width Hint' attribute is set.
See Also:
unsetWidthHint(), getWidthHint(), setWidthHint(double)

getHeightHint

public double getHeightHint()
Returns the value of the 'Height Hint' attribute. The default value is "-1". Specifies a hinted height for the block.

Returns:
the value of the 'Height Hint' attribute.
See Also:
isSetHeightHint(), unsetHeightHint(), setHeightHint(double), LayoutPackage.getBlock_HeightHint()

setHeightHint

public void setHeightHint(double value)
Sets the value of the 'Height Hint' attribute.

Parameters:
value - the new value of the 'Height Hint' attribute.
See Also:
isSetHeightHint(), unsetHeightHint(), getHeightHint()

unsetHeightHint

public void unsetHeightHint()
Unsets the value of the 'Height Hint' attribute.

See Also:
isSetHeightHint(), getHeightHint(), setHeightHint(double)

isSetHeightHint

public boolean isSetHeightHint()
Returns whether the value of the 'Height Hint' attribute is set.

Returns:
whether the value of the 'Height Hint' attribute is set.
See Also:
unsetHeightHint(), getHeightHint(), setHeightHint(double)

children

public java.util.Enumeration children(boolean bRecursive)
Parameters:
bRecursive -
Returns:

getPreferredSize

public Size getPreferredSize(IDisplayServer xs,
                             Chart cm,
                             RunTimeContext rtc)
                      throws ChartException
Computes and returns the size of the title block based on the text content and its attributes

Parameters:
xs - The Xserver used in computing the scaling factor (pixels => points)
cm - The chart model instance (if needed)
rtc -
Returns:
The preferred size of the title block 'in points'
Throws:
GenerationException
ChartException

isCustom

public boolean isCustom()
Returns:
'true' if this block type is 'a custom defined block'

isPlot

public boolean isPlot()
Returns:
'true' if this block type is 'the plot block'

isLegend

public boolean isLegend()
Returns:
'true' if this block type is 'the legend block'

isText

public boolean isText()
Returns:
'true' if this block type is 'a text block'

isTitle

public boolean isTitle()
Returns:
'true' if this block type is 'the title block'

add

public void add(Block bl)
Adds a block into the children hierarchy

Parameters:
bl -

remove

public void remove(Block bl)
Removes a block from the children hierarchy

Parameters:
bl -


Copyright © 2005-2007 Actuate Corp. All rights reserved.