org.eclipse.birt.chart.model.layout.impl
Class LegendImpl

java.lang.Object
  extended byorg.eclipse.emf.common.notify.impl.BasicNotifierImpl
      extended byorg.eclipse.emf.ecore.impl.BasicEObjectImpl
          extended byorg.eclipse.emf.ecore.impl.EObjectImpl
              extended byorg.eclipse.birt.chart.model.layout.impl.BlockImpl
                  extended byorg.eclipse.birt.chart.model.layout.impl.LegendImpl
All Implemented Interfaces:
Block, org.eclipse.emf.ecore.EObject, org.eclipse.emf.ecore.InternalEObject, Legend, org.eclipse.emf.common.notify.Notifier

public class LegendImpl
extends BlockImpl
implements Legend

An implementation of the model object ' Legend'.

The following features are implemented:


Nested Class Summary
 
Nested classes inherited from class org.eclipse.emf.common.notify.impl.BasicNotifierImpl
org.eclipse.emf.common.notify.impl.BasicNotifierImpl.EAdapterList
 
Nested classes inherited from class 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
 org.eclipse.emf.common.notify.NotificationChain basicSetClientArea(ClientArea newClientArea, 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)
           
static Block create()
          A convenience method to create an initialized 'Legendt' instance
 java.lang.Object eGet(org.eclipse.emf.ecore.EStructuralFeature eFeature, boolean resolve)
           
 org.eclipse.emf.common.notify.NotificationChain eInverseRemove(org.eclipse.emf.ecore.InternalEObject otherEnd, int featureID, java.lang.Class baseClass, org.eclipse.emf.common.notify.NotificationChain msgs)
           
 boolean eIsSet(org.eclipse.emf.ecore.EStructuralFeature eFeature)
           
 void eSet(org.eclipse.emf.ecore.EStructuralFeature eFeature, java.lang.Object newValue)
           
 void eUnset(org.eclipse.emf.ecore.EStructuralFeature eFeature)
           
 ClientArea getClientArea()
           
 Direction getDirection()
           
 int getHorizontalSpacing()
           
 LegendItemType getItemType()
           
 Orientation getOrientation()
           
 Position getPosition()
           
 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()
           
 Position getTitlePosition()
           
 int getVerticalSpacing()
           
 boolean isCustom()
          Note: Manually written
 boolean isLegend()
          Note: Manually written
 boolean isSetDirection()
           
 boolean isSetHorizontalSpacing()
           
 boolean isSetItemType()
           
 boolean isSetOrientation()
           
 boolean isSetPosition()
           
 boolean isSetShowPercent()
           
 boolean isSetShowTotal()
           
 boolean isSetShowValue()
           
 boolean isSetTitlePosition()
           
 boolean isSetVerticalSpacing()
           
 boolean isShowPercent()
           
 boolean isShowTotal()
           
 boolean isShowValue()
           
 void setClientArea(ClientArea newClientArea)
           
 void setDirection(Direction newDirection)
           
 void setHorizontalSpacing(int newHorizontalSpacing)
           
 void setItemType(LegendItemType newItemType)
           
 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 setTitlePosition(Position newTitlePosition)
           
 void setVerticalSpacing(int newVerticalSpacing)
           
 java.lang.String toString()
           
 void unsetDirection()
           
 void unsetHorizontalSpacing()
           
 void unsetItemType()
           
 void unsetOrientation()
           
 void unsetPosition()
           
 void unsetShowPercent()
           
 void unsetShowTotal()
           
 void unsetShowValue()
           
 void unsetTitlePosition()
           
 void unsetVerticalSpacing()
           
 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, basicSetInsets, basicSetMinSize, basicSetOutline, children, getAnchor, getBackground, getBounds, getChildren, getColumn, getColumnspan, getInsets, getMinSize, getOutline, getRow, getRowspan, getStretch, getTriggers, isPlot, isSetAnchor, isSetColumn, isSetColumnspan, isSetRow, isSetRowspan, isSetStretch, isSetVisible, isText, isTitle, isVisible, remove, setAnchor, setBackground, setBounds, setColumn, setColumnspan, setInsets, setMinSize, setOutline, setRow, setRowspan, setStretch, setVisible, unsetAnchor, unsetColumn, unsetColumnspan, unsetRow, unsetRowspan, unsetStretch, unsetVisible
 
Methods inherited from class org.eclipse.emf.ecore.impl.EObjectImpl
eAdapters, eClass, eContainerFeatureID, eDeliver, eIsProxy, eSetClass, eSetDeliver, eSetProxyURI
 
Methods inherited from class org.eclipse.emf.ecore.impl.BasicEObjectImpl
eAllContents, eBaseStructuralFeatureID, eBasicRemoveFromContainer, eBasicSetContainer, eContainer, eContainingFeature, eContainmentFeature, eContains, eContents, eCrossReferences, eDerivedStructuralFeatureID, eDerivedStructuralFeatureID, eDynamicBasicRemoveFromContainer, eDynamicGet, eDynamicInverseAdd, eDynamicInverseRemove, eDynamicIsSet, eDynamicSet, eDynamicUnset, eGet, eInternalResource, eInverseAdd, eObjectForURIFragmentSegment, eOpenGet, eOpenIsSet, eOpenSet, eOpenUnset, eProxyURI, eResolveProxy, eResource, eSetResource, eSetStore, eSetting, eStore, eURIFragmentSegment
 
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, getInsets, getMinSize, getOutline, getRow, getRowspan, getStretch, getTriggers, isPlot, isSetAnchor, isSetColumn, isSetColumnspan, isSetRow, isSetRowspan, isSetStretch, isSetVisible, isText, isTitle, isVisible, remove, setAnchor, setBackground, setBounds, setColumn, setColumnspan, setInsets, setMinSize, setOutline, setRow, setRowspan, setStretch, setVisible, unsetAnchor, unsetColumn, unsetColumnspan, unsetRow, unsetRowspan, unsetStretch, unsetVisible
 
Methods inherited from interface org.eclipse.emf.ecore.EObject
eAllContents, eClass, eContainer, eContainingFeature, eContainmentFeature, eContents, eCrossReferences, eGet, eIsProxy, eResource
 
Methods inherited from interface org.eclipse.emf.common.notify.Notifier
eAdapters, eDeliver, eNotify, eSetDeliver
 
Methods inherited from interface org.eclipse.emf.ecore.InternalEObject
eNotificationRequired
 

Method Detail

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)

eInverseRemove

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

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

eGet

public java.lang.Object eGet(org.eclipse.emf.ecore.EStructuralFeature eFeature,
                             boolean resolve)

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

eSet

public void eSet(org.eclipse.emf.ecore.EStructuralFeature eFeature,
                 java.lang.Object newValue)

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

eUnset

public void eUnset(org.eclipse.emf.ecore.EStructuralFeature eFeature)

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

eIsSet

public boolean eIsSet(org.eclipse.emf.ecore.EStructuralFeature eFeature)

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

toString

public java.lang.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:

isCustom

public boolean isCustom()
Note: Manually written

Specified by:
isCustom in interface Block
Overrides:
isCustom in class BlockImpl
Returns:

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
Throws:
ChartException

create

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

Returns:

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 -


Copyright © 2005 Actuate Corp. All rights reserved.