Package org.eclipse.birt.chart.model.layout.impl

# Class LegendImpl

java.lang.Object
org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.ecore.impl.BasicEObjectImpl
org.eclipse.emf.ecore.impl.EObjectImpl
org.eclipse.birt.chart.model.layout.impl.BlockImpl
org.eclipse.birt.chart.model.layout.impl.LegendImpl

All Implemented Interfaces:
  `IChartObject`, `Block`, `Legend`, `org.eclipse.emf.common.notify.Notifier`, `org.eclipse.emf.ecore.EObject`, `org.eclipse.emf.ecore.InternalEObject`

public class LegendImpl extends BlockImpl implements Legend
An implementation of the model object ' Legend'.

The following features are implemented:

- `Horizontal Spacing`
- `Vertical Spacing`
- `Client Area`
- `Text`
- `Orientation`
- `Direction`
- `Separator`
- `Position`
- `Item Type`
- `Title`
- `Title Position`
- `Show Value`
- `Show Percent`
- `Show Total`
- `Wrapping Size`
- `Max Percent`
- `Title Percent`
- `Ellipsis`
- `Format Specifier`

## Nested Class Summary

## Nested classes/interfaces inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl

`org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList<E extends Object & org.eclipse.emf.common.notify.Adapter>, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EObservableAdapterList, org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EScannableAdapterList`

## Nested classes/interfaces inherited from interface org.eclipse.emf.ecore.InternalEObject

`org.eclipse.emf.ecore.InternalEObject.EStore`

## Field Summary

### Fields inherited from class org.eclipse.emf.ecore.impl.EObjectImpl

`ELAST_EOBJECT_FLAG`

### Fields inherited from interface org.eclipse.emf.ecore.InternalEObject

`EOPPOSITE_FEATURE_BASE`

## Method Summary

Modifier and Type
Method
Description
`org.eclipse.emf.common.notify.NotificationChain`
`basicSetClientArea(ClientArea newClientArea, org.eclipse.emf.common.notify.NotificationChain msgs)`
`org.eclipse.emf.common.notify.NotificationChain`
`basicSetFormatSpecifier(FormatSpecifier newFormatSpecifier, org.eclipse.emf.common.notify.NotificationChain msgs)`
`org.eclipse.emf.common.notify.NotificationChain`
`basicSetSeparator(LineAttributes newSeparator, org.eclipse.emf.common.notify.NotificationChain msgs)`
`org.eclipse.emf.common.notify.NotificationChain`
`basicSetText(Text newText, org.eclipse.emf.common.notify.NotificationChain msgs)`
`org.eclipse.emf.common.notify.NotificationChain`
`basicSetTitle(Label newTitle, org.eclipse.emf.common.notify.NotificationChain msgs)`
`Legend`
`copyInstance()`
`static final Block`
`create()`
A convenience method to create an initialized 'Legend' instance
`static final Block`
`createDefault()`
A convenience method to create an initialized 'Legend' instance
`Object`
`eGet(int featureID, boolean resolve, boolean coreType)`
`org.eclipse.emf.common.notify.NotificationChain`
`eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)`
`boolean`
`eIsSet(int featureID)`
`void`
`eSet(int featureID, Object newValue)`
`void`
`eUnset(int featureID)`
`ClientArea`
`getClientArea()`
`Direction`
`getDirection()`
`int`
`getEllipsis()`
`FormatSpecifier`
`getFormatSpecifier()`
`int`
`getHorizontalSpacing()`
`LegendItemType`
`getItemType()`
`double`
`getMaxPercent()`
`Orientation`
`getOrientation()`
`Position`
`getPosition()`
`final 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
`LineAttributes`
`getSeparator()`
`Text`
`getText()`
`Label`
`getTitle()`
`double`
`getTitlePercent()`
`Position`
`getTitlePosition()`
`int`
`getVerticalSpacing()`
`double`
`getWrappingSize()`
`boolean`
`isCustom()`
Note: Manually written
`boolean`
`isLegend()`
Note: Manually written
`boolean`
`isSetDirection()`
`boolean`
`isSetEllipsis()`
`boolean`
`isSetHorizontalSpacing()`
`boolean`
`isSetItemType()`
`boolean`
`isSetMaxPercent()`
`boolean`
`isSetOrientation()`
`boolean`
`isSetPosition()`
`boolean`
`isSetShowPercent()`
`boolean`
`isSetShowTotal()`
`boolean`
`isSetShowValue()`
`boolean`
`isSetTitlePercent()`
`boolean`
`isSetTitlePosition()`
`boolean`
`isSetVerticalSpacing()`
`boolean`
`isSetWrappingSize()`
`boolean`
`isShowPercent()`
`boolean`
`isShowTotal()`
`boolean`
`isShowValue()`
`void`
`setClientArea(ClientArea newClientArea)`
`void`
`setDirection(Direction newDirection)`
`void`
`setEllipsis(int newEllipsis)`
`void`
`setFormatSpecifier(FormatSpecifier newFormatSpecifier)`
`void`
`setHorizontalSpacing(int newHorizontalSpacing)`
`void`
`setItemType(LegendItemType newItemType)`
`void`
`setMaxPercent(double newMaxPercent)`
`void`
`setOrientation(Orientation newOrientation)`
`void`
`setPosition(Position newPosition)`
`void`
`setSeparator(LineAttributes newSeparator)`
`void`
`setShowPercent(boolean newShowPercent)`
`void`
`setShowTotal(boolean newShowTotal)`
`void`
`setShowValue(boolean newShowValue)`
`void`
`setText(Text newText)`
`void`
`setTitle(Label newTitle)`
`void`
`setTitlePercent(double newTitlePercent)`
`void`
`setTitlePosition(Position newTitlePosition)`
`void`
`setVerticalSpacing(int newVerticalSpacing)`
`void`
`setWrappingSize(double newWrappingSize)`
`String`
`toString()`
`void`
`unsetDirection()`
`void`
`unsetEllipsis()`
`void`
`unsetHorizontalSpacing()`
`void`
`unsetItemType()`
`void`
`unsetMaxPercent()`
`void`
`unsetOrientation()`
`void`
`unsetPosition()`
`void`
`unsetShowPercent()`
`void`
`unsetShowTotal()`
`void`
`unsetShowValue()`
`void`
`unsetTitlePercent()`
`void`
`unsetTitlePosition()`
`void`
`unsetVerticalSpacing()`
`void`
`unsetWrappingSize()`
`final void`
`updateLayout(Chart cm)`
Update the legend's block relationship in the hierarchy w.r.t.

### Methods inherited from class org.eclipse.birt.chart.model.layout.impl.BlockImpl

`add, basicSetBackground, basicSetBounds, basicSetCursor, basicSetInsets, basicSetMinSize, basicSetOutline, children, getAnchor, getBackground, getBounds, getChildren, getColumn, getColumnspan, getCursor, getHeightHint, getInsets, getMinSize, getOutline, getRow, getRowspan, getStretch, getTriggers, getWidthHint, isPlot, isSetAnchor, isSetColumn, isSetColumnspan, isSetHeightHint, isSetRow, isSetRowspan, isSetStretch, isSetVisible, isSetWidthHint, isText, isTitle, isVisible, remove, setAnchor, setBackground, setBounds, setColumn, setColumnspan, setCursor, setHeightHint, setInsets, setMinSize, setOutline, setRow, setRowspan, setStretch, setVisible, setWidthHint, unsetAnchor, unsetColumn, unsetColumnspan, unsetHeightHint, unsetRow, unsetRowspan, unsetStretch, unsetVisible, unsetWidthHint`

### Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl

`eAdapters, eClass, eContainerFeatureID, eDeliver, eInternalContainer, eInvoke, eIsProxy, eSetClass, eSetDeliver, eSetProxyURI`

### Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl

`eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicRemoveFromContainerFeature, eBasicSetContainer, eContainer, eContainingFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedOperationID, eDerivedOperationID, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDirectResource, eDynamicBasicRemoveFromContainer, eDynamicGet, eDynamicGet, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicInvoke, eDynamicIsSet, eDynamicIsSet, eDynamicSet, eDynamicSet, eDynamicUnset, eDynamicUnset, eGet, eGet, eGet, eInternalResource, eInverseAdd, eInverseAdd, eInverseRemove, eInvoke, eIsSet, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eResolveProxy, eResource, eSet, eSetResource, eSetStore, eSetting, eStore, eUnset, eURIFragmentSegment, eVirtualGet, eVirtualGet, eVirtualIsSet, eVirtualSet, eVirtualUnset`

### Methods inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl

`eNotificationRequired, eNotify`

### Methods inherited from class java.lang.Object

`equals, getClass, hashCode, notify, notifyAll, wait, wait, wait`

### Methods inherited from interface org.eclipse.birt.chart.model.layout.Block

`add, children, getAnchor, getBackground, getBounds, getChildren, getColumn, getColumnspan, getCursor, getHeightHint, getInsets, getMinSize, getOutline, getRow, getRowspan, getStretch, getTriggers, getWidthHint, isPlot, isSetAnchor, isSetColumn, isSetColumnspan, isSetHeightHint, isSetRow, isSetRowspan, isSetStretch, isSetVisible, isSetWidthHint, isText, isTitle, isVisible, remove, setAnchor, setBackground, setBounds, setColumn, setColumnspan, setCursor, setHeightHint, setInsets, setMinSize, setOutline, setRow, setRowspan, setStretch, setVisible, setWidthHint, unsetAnchor, unsetColumn, unsetColumnspan, unsetHeightHint, unsetRow, unsetRowspan, unsetStretch, unsetVisible, unsetWidthHint`

### Methods inherited from interface org.eclipse.emf.ecore.EObject

`eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eGet, eInvoke, eIsProxy, eIsSet, eResource, eSet, eUnset`

### Methods inherited from interface org.eclipse.emf.ecore.InternalEObject

`eNotificationRequired`

### Methods inherited from interface org.eclipse.emf.common.notify.Notifier

`eAdapters, eDeliver, eNotify, eSetDeliver`

## Method Details

### getHorizontalSpacing

public int getHorizontalSpacing()

Specified by:
  `getHorizontalSpacing` in interface `Legend`
Returns:
  the value of the 'Horizontal Spacing' attribute.
See Also:
  - `Legend.isSetHorizontalSpacing()`
  - `Legend.unsetHorizontalSpacing()`
  - `Legend.setHorizontalSpacing(int)`
  - `LayoutPackage.getLegend_HorizontalSpacing()`

### setHorizontalSpacing

public void setHorizontalSpacing(int newHorizontalSpacing)

Specified by:
  `setHorizontalSpacing` in interface `Legend`
Parameters:
  `newHorizontalSpacing` - the new value of the 'Horizontal Spacing' attribute.
See Also:
  - `Legend.isSetHorizontalSpacing()`
  - `Legend.unsetHorizontalSpacing()`
  - `Legend.getHorizontalSpacing()`

### unsetHorizontalSpacing

public void unsetHorizontalSpacing()

Specified by:
  `unsetHorizontalSpacing` in interface `Legend`
See Also:
  - `Legend.isSetHorizontalSpacing()`
  - `Legend.getHorizontalSpacing()`
  - `Legend.setHorizontalSpacing(int)`

### isSetHorizontalSpacing

public boolean isSetHorizontalSpacing()

Specified by:
  `isSetHorizontalSpacing` in interface `Legend`
Returns:
  whether the value of the 'Horizontal Spacing' attribute is set.
See Also:
  - `Legend.unsetHorizontalSpacing()`
  - `Legend.getHorizontalSpacing()`
  - `Legend.setHorizontalSpacing(int)`

### getVerticalSpacing

public int getVerticalSpacing()

Specified by:
  `getVerticalSpacing` in interface `Legend`
Returns:
  the value of the 'Vertical Spacing' attribute.
See Also:
  - `Legend.isSetVerticalSpacing()`
  - `Legend.unsetVerticalSpacing()`
  - `Legend.setVerticalSpacing(int)`
  - `LayoutPackage.getLegend_VerticalSpacing()`

### setVerticalSpacing

public void setVerticalSpacing(int newVerticalSpacing)

Specified by:
  `setVerticalSpacing` in interface `Legend`
Parameters:
  `newVerticalSpacing` - the new value of the 'Vertical Spacing' attribute.
See Also:
  - `Legend.isSetVerticalSpacing()`
  - `Legend.unsetVerticalSpacing()`
  - `Legend.getVerticalSpacing()`

### unsetVerticalSpacing

public void unsetVerticalSpacing()

Specified by:
  `unsetVerticalSpacing` in interface `Legend`
See Also:
  - `Legend.isSetVerticalSpacing()`
  - `Legend.getVerticalSpacing()`
  - `Legend.setVerticalSpacing(int)`

### isSetVerticalSpacing

public boolean isSetVerticalSpacing()

Specified by:
  `isSetVerticalSpacing` in interface `Legend`
Returns:
  whether the value of the 'Vertical Spacing' attribute is set.
See Also:
  - `Legend.unsetVerticalSpacing()`
  - `Legend.getVerticalSpacing()`
  - `Legend.setVerticalSpacing(int)`

### getClientArea

public ClientArea getClientArea()

Specified by:
  `getClientArea` in interface `Legend`
Returns:
  the value of the 'Client Area' containment reference.
See Also:
  - `Legend.setClientArea(ClientArea)`
  - `LayoutPackage.getLegend_ClientArea()`

### basicSetClientArea

public org.eclipse.emf.common.notify.NotificationChain basicSetClientArea(ClientArea newClientArea, org.eclipse.emf.common.notify.NotificationChain msgs)

### setClientArea

public void setClientArea(ClientArea newClientArea)

Specified by:
  `setClientArea` in interface `Legend`
Parameters:
  `newClientArea` - the new value of the 'Client Area' containment reference.
See Also:
  - `Legend.getClientArea()`

### getText

public Text getText()

Specified by:
  `getText` in interface `Legend`
Returns:
  the value of the 'Text' containment reference.
See Also:
  - `Legend.setText(Text)`
  - `LayoutPackage.getLegend_Text()`

### basicSetText

public org.eclipse.emf.common.notify.NotificationChain basicSetText(Text newText, org.eclipse.emf.common.notify.NotificationChain msgs)

### setText

public void setText(Text newText)

Specified by:
  `setText` in interface `Legend`
Parameters:
  `newText` - the new value of the 'Text' containment reference.
See Also:
  - `Legend.getText()`

### getOrientation

public Orientation getOrientation()

Specified by:
  `getOrientation` in interface `Legend`
Returns:
  the value of the 'Orientation' attribute.
See Also:
  - `Orientation`
  - `Legend.isSetOrientation()`
  - `Legend.unsetOrientation()`
  - `Legend.setOrientation(Orientation)`
  - `LayoutPackage.getLegend_Orientation()`

### setOrientation

public void setOrientation(Orientation newOrientation)

Specified by:
  `setOrientation` in interface `Legend`
Parameters:
  `newOrientation` - the new value of the 'Orientation' attribute.
See Also:
  - `Orientation`
  - `Legend.isSetOrientation()`
  - `Legend.unsetOrientation()`
  - `Legend.getOrientation()`

### unsetOrientation

public void unsetOrientation()

Specified by:
  `unsetOrientation` in interface `Legend`
See Also:
  - `Legend.isSetOrientation()`
  - `Legend.getOrientation()`
  - `Legend.setOrientation(Orientation)`

### isSetOrientation

public boolean isSetOrientation()

Specified by:
  `isSetOrientation` in interface `Legend`
Returns:
  whether the value of the 'Orientation' attribute is set.
See Also:
  - `Legend.unsetOrientation()`
  - `Legend.getOrientation()`
  - `Legend.setOrientation(Orientation)`

### getDirection

public Direction getDirection()

Specified by:
  `getDirection` in interface `Legend`
Returns:
  the value of the 'Direction' attribute.
See Also:
  - `Direction`
  - `Legend.isSetDirection()`
  - `Legend.unsetDirection()`
  - `Legend.setDirection(Direction)`
  - `LayoutPackage.getLegend_Direction()`

### setDirection

public void setDirection(Direction newDirection)

Specified by:
  `setDirection` in interface `Legend`
Parameters:
  `newDirection` - the new value of the 'Direction' attribute.
See Also:
  - `Direction`
  - `Legend.isSetDirection()`
  - `Legend.unsetDirection()`
  - `Legend.getDirection()`

### unsetDirection

public void unsetDirection()

Specified by:
  `unsetDirection` in interface `Legend`
See Also:
  - `Legend.isSetDirection()`
  - `Legend.getDirection()`
  - `Legend.setDirection(Direction)`

### isSetDirection

public boolean isSetDirection()

Specified by:
  `isSetDirection` in interface `Legend`
Returns:
  whether the value of the 'Direction' attribute is set.
See Also:
  - `Legend.unsetDirection()`
  - `Legend.getDirection()`
  - `Legend.setDirection(Direction)`

### getSeparator

public LineAttributes getSeparator()

Specified by:
  `getSeparator` in interface `Legend`
Returns:
  the value of the 'Separator' containment reference.
See Also:
  - `Legend.setSeparator(LineAttributes)`
  - `LayoutPackage.getLegend_Separator()`

### basicSetSeparator

public org.eclipse.emf.common.notify.NotificationChain basicSetSeparator(LineAttributes newSeparator, org.eclipse.emf.common.notify.NotificationChain msgs)

### setSeparator

public void setSeparator(LineAttributes newSeparator)

Specified by:
  `setSeparator` in interface `Legend`
Parameters:
  `newSeparator` - the new value of the 'Separator' containment reference.
See Also:
  - `Legend.getSeparator()`

### getPosition

public Position getPosition()

Specified by:
  `getPosition` in interface `Legend`
Returns:
  the value of the 'Position' attribute.
See Also:
  - `Position`
  - `Legend.isSetPosition()`
  - `Legend.unsetPosition()`
  - `Legend.setPosition(Position)`
  - `LayoutPackage.getLegend_Position()`

### setPosition

public void setPosition(Position newPosition)

Specified by:
  `setPosition` in interface `Legend`
Parameters:
  `newPosition` - the new value of the 'Position' attribute.
See Also:
  - `Position`
  - `Legend.isSetPosition()`
  - `Legend.unsetPosition()`
  - `Legend.getPosition()`

### unsetPosition

public void unsetPosition()

Specified by:
  `unsetPosition` in interface `Legend`
See Also:
  - `Legend.isSetPosition()`
  - `Legend.getPosition()`
  - `Legend.setPosition(Position)`

### isSetPosition

public boolean isSetPosition()

Specified by:
  `isSetPosition` in interface `Legend`
Returns:
  whether the value of the 'Position' attribute is set.
See Also:
  - `Legend.unsetPosition()`
  - `Legend.getPosition()`
  - `Legend.setPosition(Position)`

### getItemType

public LegendItemType getItemType()

Specified by:
  `getItemType` in interface `Legend`
Returns:
  the value of the 'Item Type' attribute.
See Also:
  - `LegendItemType`
  - `Legend.isSetItemType()`
  - `Legend.unsetItemType()`
  - `Legend.setItemType(LegendItemType)`
  - `LayoutPackage.getLegend_ItemType()`

### setItemType

public void setItemType(LegendItemType newItemType)

Specified by:
  `setItemType` in interface `Legend`
Parameters:
  `newItemType` - the new value of the 'Item Type' attribute.
See Also:
  - `LegendItemType`
  - `Legend.isSetItemType()`
  - `Legend.unsetItemType()`
  - `Legend.getItemType()`

### unsetItemType

public void unsetItemType()

Specified by:
  `unsetItemType` in interface `Legend`
See Also:
  - `Legend.isSetItemType()`
  - `Legend.getItemType()`
  - `Legend.setItemType(LegendItemType)`

### isSetItemType

public boolean isSetItemType()

Specified by:
  `isSetItemType` in interface `Legend`
Returns:
  whether the value of the 'Item Type' attribute is set.
See Also:
  - `Legend.unsetItemType()`
  - `Legend.getItemType()`
  - `Legend.setItemType(LegendItemType)`

### getTitle

public Label getTitle()

Specified by:
  `getTitle` in interface `Legend`
Returns:
  the value of the 'Title' containment reference.
See Also:
  - `Legend.setTitle(Label)`
  - `LayoutPackage.getLegend_Title()`

### basicSetTitle

public org.eclipse.emf.common.notify.NotificationChain basicSetTitle(Label newTitle, org.eclipse.emf.common.notify.NotificationChain msgs)

### setTitle

public void setTitle(Label newTitle)

Specified by:
  `setTitle` in interface `Legend`
Parameters:
  `newTitle` - the new value of the 'Title' containment reference.
See Also:
  - `Legend.getTitle()`

### getTitlePosition

public Position getTitlePosition()

Specified by:
  `getTitlePosition` in interface `Legend`
Returns:
  the value of the 'Title Position' attribute.
See Also:
  - `Position`
  - `Legend.isSetTitlePosition()`
  - `Legend.unsetTitlePosition()`
  - `Legend.setTitlePosition(Position)`
  - `LayoutPackage.getLegend_TitlePosition()`

### setTitlePosition

public void setTitlePosition(Position newTitlePosition)

Specified by:
  `setTitlePosition` in interface `Legend`
Parameters:
  `newTitlePosition` - the new value of the 'Title Position' attribute.
See Also:
  - `Position`
  - `Legend.isSetTitlePosition()`
  - `Legend.unsetTitlePosition()`
  - `Legend.getTitlePosition()`

### unsetTitlePosition

public void unsetTitlePosition()

Specified by:
  `unsetTitlePosition` in interface `Legend`
See Also:
  - `Legend.isSetTitlePosition()`
  - `Legend.getTitlePosition()`
  - `Legend.setTitlePosition(Position)`

### isSetTitlePosition

public boolean isSetTitlePosition()

Specified by:
  `isSetTitlePosition` in interface `Legend`
Returns:
  whether the value of the 'Title Position' attribute is set.
See Also:
  - `Legend.unsetTitlePosition()`
  - `Legend.getTitlePosition()`
  - `Legend.setTitlePosition(Position)`

### isShowValue

public boolean isShowValue()

Specified by:
  `isShowValue` in interface `Legend`
Returns:
  the value of the 'Show Value' attribute.
See Also:
  - `Legend.isSetShowValue()`
  - `Legend.unsetShowValue()`
  - `Legend.setShowValue(boolean)`
  - `LayoutPackage.getLegend_ShowValue()`

### setShowValue

public void setShowValue(boolean newShowValue)

Specified by:
  `setShowValue` in interface `Legend`
Parameters:
  `newShowValue` - the new value of the 'Show Value' attribute.
See Also:
  - `Legend.isSetShowValue()`
  - `Legend.unsetShowValue()`
  - `Legend.isShowValue()`

### unsetShowValue

public void unsetShowValue()

Specified by:
  `unsetShowValue` in interface `Legend`
See Also:
  - `Legend.isSetShowValue()`
  - `Legend.isShowValue()`
  - `Legend.setShowValue(boolean)`

### isSetShowValue

public boolean isSetShowValue()

Specified by:
  `isSetShowValue` in interface `Legend`
Returns:
  whether the value of the 'Show Value' attribute is set.
See Also:
  - `Legend.unsetShowValue()`
  - `Legend.isShowValue()`
  - `Legend.setShowValue(boolean)`

### isShowPercent

public boolean isShowPercent()

Specified by:
  `isShowPercent` in interface `Legend`
Returns:
  the value of the 'Show Percent' attribute.
See Also:
  - `Legend.isSetShowPercent()`
  - `Legend.unsetShowPercent()`
  - `Legend.setShowPercent(boolean)`
  - `LayoutPackage.getLegend_ShowPercent()`

### setShowPercent

public void setShowPercent(boolean newShowPercent)

Specified by:
  `setShowPercent` in interface `Legend`
Parameters:
  `newShowPercent` - the new value of the 'Show Percent' attribute.
See Also:
  - `Legend.isSetShowPercent()`
  - `Legend.unsetShowPercent()`
  - `Legend.isShowPercent()`

### unsetShowPercent

public void unsetShowPercent()

Specified by:
  `unsetShowPercent` in interface `Legend`
See Also:
  - `Legend.isSetShowPercent()`
  - `Legend.isShowPercent()`
  - `Legend.setShowPercent(boolean)`

### isSetShowPercent

public boolean isSetShowPercent()

Specified by:
  `isSetShowPercent` in interface `Legend`
Returns:
  whether the value of the 'Show Percent' attribute is set.
See Also:
  - `Legend.unsetShowPercent()`
  - `Legend.isShowPercent()`
  - `Legend.setShowPercent(boolean)`

### isShowTotal

public boolean isShowTotal()

Specified by:
  `isShowTotal` in interface `Legend`
Returns:
  the value of the 'Show Total' attribute.
See Also:
  - `Legend.isSetShowTotal()`
  - `Legend.unsetShowTotal()`
  - `Legend.setShowTotal(boolean)`
  - `LayoutPackage.getLegend_ShowTotal()`

### setShowTotal

public void setShowTotal(boolean newShowTotal)

Specified by:
  `setShowTotal` in interface `Legend`
Parameters:
  `newShowTotal` - the new value of the 'Show Total' attribute.
See Also:
  - `Legend.isSetShowTotal()`
  - `Legend.unsetShowTotal()`
  - `Legend.isShowTotal()`

### unsetShowTotal

public void unsetShowTotal()

Specified by:
  `unsetShowTotal` in interface `Legend`
See Also:
  - `Legend.isSetShowTotal()`
  - `Legend.isShowTotal()`
  - `Legend.setShowTotal(boolean)`

### isSetShowTotal

public boolean isSetShowTotal()

Specified by:
  `isSetShowTotal` in interface `Legend`
Returns:
  whether the value of the 'Show Total' attribute is set.
See Also:
  - `Legend.unsetShowTotal()`
  - `Legend.isShowTotal()`
  - `Legend.setShowTotal(boolean)`

### getWrappingSize

public double getWrappingSize()

Specified by:
  `getWrappingSize` in interface `Legend`
Returns:
  the value of the 'Wrapping Size' attribute.
See Also:
  - `Legend.isSetWrappingSize()`
  - `Legend.unsetWrappingSize()`
  - `Legend.setWrappingSize(double)`
  - `LayoutPackage.getLegend_WrappingSize()`

### setWrappingSize

public void setWrappingSize(double newWrappingSize)

Specified by:
  `setWrappingSize` in interface `Legend`
Parameters:
  `newWrappingSize` - the new value of the 'Wrapping Size' attribute.
See Also:
  - `Legend.isSetWrappingSize()`
  - `Legend.unsetWrappingSize()`
  - `Legend.getWrappingSize()`

### unsetWrappingSize

public void unsetWrappingSize()

Specified by:
  `unsetWrappingSize` in interface `Legend`
See Also:
  - `Legend.isSetWrappingSize()`
  - `Legend.getWrappingSize()`
  - `Legend.setWrappingSize(double)`

### isSetWrappingSize

public boolean isSetWrappingSize()

Specified by:
  `isSetWrappingSize` in interface `Legend`
Returns:
  whether the value of the 'Wrapping Size' attribute is set.
See Also:
  - `Legend.unsetWrappingSize()`
  - `Legend.getWrappingSize()`
  - `Legend.setWrappingSize(double)`

### getMaxPercent

public double getMaxPercent()

Specified by:
  `getMaxPercent` in interface `Legend`
Returns:
  the value of the 'Max Percent' attribute.
See Also:
  - `Legend.isSetMaxPercent()`
  - `Legend.unsetMaxPercent()`
  - `Legend.setMaxPercent(double)`
  - `LayoutPackage.getLegend_MaxPercent()`

### setMaxPercent

public void setMaxPercent(double newMaxPercent)

Specified by:
  `setMaxPercent` in interface `Legend`
Parameters:
  `newMaxPercent` - the new value of the 'Max Percent' attribute.
See Also:
  - `Legend.isSetMaxPercent()`
  - `Legend.unsetMaxPercent()`
  - `Legend.getMaxPercent()`

### unsetMaxPercent

public void unsetMaxPercent()

Specified by:
  `unsetMaxPercent` in interface `Legend`
See Also:
  - `Legend.isSetMaxPercent()`
  - `Legend.getMaxPercent()`
  - `Legend.setMaxPercent(double)`

### isSetMaxPercent

public boolean isSetMaxPercent()

Specified by:
  `isSetMaxPercent` in interface `Legend`
Returns:
  whether the value of the 'Max Percent' attribute is set.
See Also:
  - `Legend.unsetMaxPercent()`
  - `Legend.getMaxPercent()`
  - `Legend.setMaxPercent(double)`

### getTitlePercent

public double getTitlePercent()

Specified by:
  `getTitlePercent` in interface `Legend`
Returns:
  the value of the 'Title Percent' attribute.
See Also:
  - `Legend.isSetTitlePercent()`
  - `Legend.unsetTitlePercent()`
  - `Legend.setTitlePercent(double)`
  - `LayoutPackage.getLegend_TitlePercent()`

### setTitlePercent

public void setTitlePercent(double newTitlePercent)

Specified by:
  `setTitlePercent` in interface `Legend`
Parameters:
  `newTitlePercent` - the new value of the 'Title Percent' attribute.
See Also:
  - `Legend.isSetTitlePercent()`
  - `Legend.unsetTitlePercent()`
  - `Legend.getTitlePercent()`

### unsetTitlePercent

public void unsetTitlePercent()

Specified by:
  `unsetTitlePercent` in interface `Legend`
See Also:
  - `Legend.isSetTitlePercent()`
  - `Legend.getTitlePercent()`
  - `Legend.setTitlePercent(double)`

### isSetTitlePercent

public boolean isSetTitlePercent()

Specified by:
  `isSetTitlePercent` in interface `Legend`
Returns:
  whether the value of the 'Title Percent' attribute is set.
See Also:
  - `Legend.unsetTitlePercent()`
  - `Legend.getTitlePercent()`
  - `Legend.setTitlePercent(double)`

### getEllipsis

public int getEllipsis()

Specified by:
  `getEllipsis` in interface `Legend`
Returns:
  the value of the 'Ellipsis' attribute.
See Also:
  - `Legend.isSetEllipsis()`
  - `Legend.unsetEllipsis()`
  - `Legend.setEllipsis(int)`
  - `LayoutPackage.getLegend_Ellipsis()`

### setEllipsis

public void setEllipsis(int newEllipsis)

Specified by:
  `setEllipsis` in interface `Legend`
Parameters:
  `newEllipsis` - the new value of the 'Ellipsis' attribute.
See Also:
  - `Legend.isSetEllipsis()`
  - `Legend.unsetEllipsis()`
  - `Legend.getEllipsis()`

### unsetEllipsis

public void unsetEllipsis()

Specified by:
  `unsetEllipsis` in interface `Legend`
See Also:
  - `Legend.isSetEllipsis()`
  - `Legend.getEllipsis()`
  - `Legend.setEllipsis(int)`

### isSetEllipsis

public boolean isSetEllipsis()

Specified by:
  `isSetEllipsis` in interface `Legend`
Returns:
  whether the value of the 'Ellipsis' attribute is set.
See Also:
  - `Legend.unsetEllipsis()`
  - `Legend.getEllipsis()`
  - `Legend.setEllipsis(int)`

### getFormatSpecifier

public FormatSpecifier getFormatSpecifier()

Specified by:
  `getFormatSpecifier` in interface `Legend`
Returns:
  the value of the 'Format Specifier' containment reference.
See Also:
  - `Legend.setFormatSpecifier(FormatSpecifier)`
  - `LayoutPackage.getLegend_FormatSpecifier()`

### basicSetFormatSpecifier

public org.eclipse.emf.common.notify.NotificationChain basicSetFormatSpecifier(FormatSpecifier newFormatSpecifier, org.eclipse.emf.common.notify.NotificationChain msgs)

### setFormatSpecifier

public void setFormatSpecifier(FormatSpecifier newFormatSpecifier)

Specified by:
  `setFormatSpecifier` in interface `Legend`
Parameters:
  `newFormatSpecifier` - the new value of the 'Format Specifier' containment reference.
See Also:
  - `Legend.getFormatSpecifier()`

### eInverseRemove

public org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, org.eclipse.emf.common.notify.NotificationChain msgs)

Overrides:
  `eInverseRemove` in class `BlockImpl`

### eGet

public Object eGet(int featureID, boolean resolve, boolean coreType)

Specified by:
  `eGet` in interface `org.eclipse.emf.ecore.InternalEObject`
Overrides:
  `eGet` in class `BlockImpl`

### eSet

public void eSet(int featureID, Object newValue)

Specified by:
  `eSet` in interface `org.eclipse.emf.ecore.InternalEObject`
Overrides:
  `eSet` in class `BlockImpl`

### eUnset

public void eUnset(int featureID)

Specified by:
  `eUnset` in interface `org.eclipse.emf.ecore.InternalEObject`
Overrides:
  `eUnset` in class `BlockImpl`

### eIsSet

public boolean eIsSet(int featureID)

Specified by:
  `eIsSet` in interface `org.eclipse.emf.ecore.InternalEObject`
Overrides:
  `eIsSet` in class `BlockImpl`

### toString

public String toString()

Overrides:
  `toString` in class `BlockImpl`

### isLegend

public boolean isLegend()
Note: Manually written

Specified by:
  `isLegend` in interface `Block`
Overrides:
  `isLegend` in class `BlockImpl`
Returns:
  true if this block is legend.

### isCustom

public boolean isCustom()
Note: Manually written

Specified by:
  `isCustom` in interface `Block`
Overrides:
  `isCustom` in class `BlockImpl`
Returns:
  true if this is custom block.

### getPreferredSize

public final Size getPreferredSize(IDisplayServer xs, Chart cm, RunTimeContext rtc) throws ChartException
Description copied from interface: `Block`
Computes and returns the size of the title block based on the text content and its attributes

Specified by:
  `getPreferredSize` in interface `Block`
Overrides:
  `getPreferredSize` in class `BlockImpl`
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:
  `ChartException`

### create

public static final Block create()
A convenience method to create an initialized 'Legend' instance

Returns:
  legend instance with setting 'isSet' flag.

### createDefault

public static final Block createDefault()
A convenience method to create an initialized 'Legend' instance

Returns:
  legend instance without setting 'isSet' flag.

### updateLayout

public final void updateLayout(Chart cm)
Description copied from interface: `Legend`
Update the legend's block relationship in the hierarchy w.r.t. the chart model

Specified by:
  `updateLayout` in interface `Legend`
Parameters:
  `cm` -

### copyInstance

public Legend copyInstance()

Specified by:
  `copyInstance` in interface `Block`
Specified by:
  `copyInstance` in interface `IChartObject`
Specified by:
  `copyInstance` in interface `Legend`
Overrides:
  `copyInstance` in class `BlockImpl`