Class DcsChartReferenceBandGridModel
- java.lang.Object
-
- com._1c.g5.aef2.validators.Validable
-
- com._1c.g5.aef2.models.Model
-
- com._1c.g5.aef2.models.EditableModel
-
- com._1c.g5.v8.dt.dcs.ui.aef.models.chart.reference.DcsChartReferenceBandGridModel
-
- All Implemented Interfaces:
IEditableModel
,IModel
,IValidable
,IModelApiAwareModel
,IChartReferenceBandGridModel
,IGridModel<IndexedChartReferenceBand>
public class DcsChartReferenceBandGridModel extends EditableModel implements IChartReferenceBandGridModel
Grid model forChartReferenceBand
-
-
Constructor Summary
Constructors Constructor Description DcsChartReferenceBandGridModel(ChartReferenceBands chartReferenceBands, org.eclipse.emf.ecore.EStructuralFeature feature, IV8Project v8project, IEditingLanguageManager languageManager, IModelEditingSupport modelEditingSupport, IColorProvider colorProvider, IFontProvider fontProvider, IBorderProvider borderProvider, IModelObjectFactory chartObjectsFactory, Version version)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ChartReferenceBand
addReferenceBand()
Creates new chart reference band and adds it to array.void
dispose()
Disposes this model.IChange
getChange()
Chart
getChart()
Gets the chart object.IndexedChartReferenceBand[]
getChildren(IndexedChartReferenceBand element)
Returns the array of children for a givenelement
.IndexedChartReferenceBand[]
getElements()
Returns the array of top level objects.IEditingLanguageManager
getLanguageManager()
Gets the language manager.IModelApi
getModelApi()
Returns the model API.IndexedChartReferenceBand
getParent(IndexedChartReferenceBand element)
Returns the parent of the givenelement
.IV8Project
getProject()
Gets the project.ChartReferenceBands
getReferenceBands()
Gets the modelled chart reference band.IValue<IndexedChartReferenceBand>
getSelectedElementModel()
Returns the model of currently selected element in grid.boolean
hasChildren(IndexedChartReferenceBand element)
Returnstrue
if the element has children.boolean
isReadOnly()
Checks if this model is read only.void
removeReferenceBand(ChartReferenceBand referenceBand)
Removes chart reference band from array.void
setChartReferenceBands(ChartReferenceBands bands)
void
setModelApi(IModelApi modelApi)
Sets the specified API to the model.-
Methods inherited from class com._1c.g5.aef2.models.EditableModel
isEditable, setEditable
-
Methods inherited from class com._1c.g5.aef2.models.Model
addModelListener, beginExternalUpdate, checkOffline, checkOnline, commit, createWorkingCopy, discard, endExternalUpdate, getComponent, getCurrentChangeOrigin, getRunnableQueue, isOnline, notifyModelChanged, notifyModelCommitted, removeModelListener, setComponent, setOnline, toString
-
Methods inherited from class com._1c.g5.aef2.validators.Validable
addValidator, getValidatorTarget, removeValidator, validate, validate
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface com._1c.g5.aef2.models.IEditableModel
isEditable, setEditable
-
Methods inherited from interface com._1c.g5.aef2.models.IModel
addModelListener, commit, createWorkingCopy, discard, getComponent, isOnline, removeModelListener, setComponent
-
Methods inherited from interface com._1c.g5.aef2.validators.IValidable
addValidator, removeValidator, validate, validate
-
-
-
-
Constructor Detail
-
DcsChartReferenceBandGridModel
public DcsChartReferenceBandGridModel(ChartReferenceBands chartReferenceBands, org.eclipse.emf.ecore.EStructuralFeature feature, IV8Project v8project, IEditingLanguageManager languageManager, IModelEditingSupport modelEditingSupport, IColorProvider colorProvider, IFontProvider fontProvider, IBorderProvider borderProvider, IModelObjectFactory chartObjectsFactory, Version version)
The constructor.- Parameters:
chartObjectsFactory
- The chart objects factory, cannot benull
colorProvider
- The color provider, cannot benull
fontProvider
- The font provider, cannot benull
globalScopeProvider
- The global scope provider, cannot benull
languageManager
- The language manager, cannot benull
modelEditingSupport
- The model editing support, cannot benull
v8project
- The project, cannot benull
version
- The version, cannot benull
chartReferenceBands
- The chart reference bands, cannot benull
feature
- The chart reference band feature
-
-
Method Detail
-
getElements
public IndexedChartReferenceBand[] getElements()
Description copied from interface:IGridModel
Returns the array of top level objects.- Specified by:
getElements
in interfaceIGridModel<IndexedChartReferenceBand>
- Returns:
- the array of top level objects, never
null
.
-
getChildren
public IndexedChartReferenceBand[] getChildren(IndexedChartReferenceBand element)
Description copied from interface:IGridModel
Returns the array of children for a givenelement
.- Specified by:
getChildren
in interfaceIGridModel<IndexedChartReferenceBand>
- Parameters:
element
- the parent element, cannot benull
.- Returns:
- the array of children of the element, never
null
.
-
getParent
public IndexedChartReferenceBand getParent(IndexedChartReferenceBand element)
Description copied from interface:IGridModel
Returns the parent of the givenelement
.- Specified by:
getParent
in interfaceIGridModel<IndexedChartReferenceBand>
- Parameters:
element
- the element, cannot benull
.- Returns:
- the parent element or
null
.
-
hasChildren
public boolean hasChildren(IndexedChartReferenceBand element)
Description copied from interface:IGridModel
Returnstrue
if the element has children.- Specified by:
hasChildren
in interfaceIGridModel<IndexedChartReferenceBand>
- Parameters:
element
- the element, cannot benull
.- Returns:
true
if the element has children.
-
getSelectedElementModel
public IValue<IndexedChartReferenceBand> getSelectedElementModel()
Description copied from interface:IGridModel
Returns the model of currently selected element in grid.- Specified by:
getSelectedElementModel
in interfaceIGridModel<IndexedChartReferenceBand>
- Returns:
- the
IValue
instance, nevernull
.
-
getChange
public IChange getChange()
-
dispose
public void dispose()
Description copied from interface:IModel
Disposes this model.
-
setModelApi
public void setModelApi(IModelApi modelApi)
Description copied from interface:IModelApiAwareModel
Sets the specified API to the model.- Specified by:
setModelApi
in interfaceIModelApiAwareModel
- Parameters:
modelApi
- the API, can benull
.
-
getModelApi
public IModelApi getModelApi()
Description copied from interface:IModelApiAwareModel
Returns the model API.- Specified by:
getModelApi
in interfaceIModelApiAwareModel
- Returns:
- the model API or
null
if it is not set.
-
addReferenceBand
public ChartReferenceBand addReferenceBand()
Description copied from interface:IChartReferenceBandGridModel
Creates new chart reference band and adds it to array.- Specified by:
addReferenceBand
in interfaceIChartReferenceBandGridModel
- Returns:
- The created chart reference band
-
getLanguageManager
public IEditingLanguageManager getLanguageManager()
Description copied from interface:IChartReferenceBandGridModel
Gets the language manager.- Specified by:
getLanguageManager
in interfaceIChartReferenceBandGridModel
- Returns:
- The language manager, never
null
-
getReferenceBands
public ChartReferenceBands getReferenceBands()
Description copied from interface:IChartReferenceBandGridModel
Gets the modelled chart reference band.- Specified by:
getReferenceBands
in interfaceIChartReferenceBandGridModel
- Returns:
- The chart reference array, never
null
-
isReadOnly
public boolean isReadOnly()
Description copied from interface:IChartReferenceBandGridModel
Checks if this model is read only.- Specified by:
isReadOnly
in interfaceIChartReferenceBandGridModel
- Returns:
true
if this model is read only
-
removeReferenceBand
public void removeReferenceBand(ChartReferenceBand referenceBand)
Description copied from interface:IChartReferenceBandGridModel
Removes chart reference band from array.- Specified by:
removeReferenceBand
in interfaceIChartReferenceBandGridModel
- Parameters:
referenceBand
- the chart reference band for removal
-
getProject
public IV8Project getProject()
Description copied from interface:IChartReferenceBandGridModel
Gets the project.- Specified by:
getProject
in interfaceIChartReferenceBandGridModel
- Returns:
- The project, never
null
-
getChart
public Chart getChart()
Description copied from interface:IChartReferenceBandGridModel
Gets the chart object.- Specified by:
getChart
in interfaceIChartReferenceBandGridModel
- Returns:
- the chart, never
null
-
setChartReferenceBands
public void setChartReferenceBands(ChartReferenceBands bands)
-
-