Class DcsChartReferenceLineGridModel
- 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.DcsChartReferenceLineGridModel
-
- All Implemented Interfaces:
IEditableModel
,IModel
,IValidable
,IModelApiAwareModel
,IChartReferenceLineGridModel
,IGridModel<IndexedChartReferenceLine>
public class DcsChartReferenceLineGridModel extends EditableModel implements IChartReferenceLineGridModel
Grid model forChartReferenceLine
.
-
-
Constructor Summary
Constructors Constructor Description DcsChartReferenceLineGridModel(ChartReferenceLines chartReferenceLines, 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 ChartReferenceLine
addReferenceLine()
Creates new chart reference line and adds it to array.void
dispose()
Disposes this model.IChange
getChange()
Chart
getChart()
Gets the chart object.IndexedChartReferenceLine[]
getChildren(IndexedChartReferenceLine element)
Returns the array of children for a givenelement
.IndexedChartReferenceLine[]
getElements()
Returns the array of top level objects.IEditingLanguageManager
getLanguageManager()
Gets the language manager.IModelApi
getModelApi()
Returns the model API.IndexedChartReferenceLine
getParent(IndexedChartReferenceLine element)
Returns the parent of the givenelement
.IV8Project
getProject()
Gets the project.ChartReferenceLines
getReferenceLines()
Gets the modelled chart reference line.IValue<IndexedChartReferenceLine>
getSelectedElementModel()
Returns the model of currently selected element in grid.boolean
hasChildren(IndexedChartReferenceLine element)
Returnstrue
if the element has children.boolean
isReadOnly()
Checks if this model is read only.void
removeReferenceLine(ChartReferenceLine referenceLine)
Removes chart reference line from array.void
setChartReferenceLines(ChartReferenceLines lines)
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
-
DcsChartReferenceLineGridModel
public DcsChartReferenceLineGridModel(ChartReferenceLines chartReferenceLines, 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
chartReferenceLines
- The chart reference lines, cannot benull
feature
- The chart reference line feature
-
-
Method Detail
-
getElements
public IndexedChartReferenceLine[] getElements()
Description copied from interface:IGridModel
Returns the array of top level objects.- Specified by:
getElements
in interfaceIGridModel<IndexedChartReferenceLine>
- Returns:
- the array of top level objects, never
null
.
-
getChildren
public IndexedChartReferenceLine[] getChildren(IndexedChartReferenceLine element)
Description copied from interface:IGridModel
Returns the array of children for a givenelement
.- Specified by:
getChildren
in interfaceIGridModel<IndexedChartReferenceLine>
- Parameters:
element
- the parent element, cannot benull
.- Returns:
- the array of children of the element, never
null
.
-
getParent
public IndexedChartReferenceLine getParent(IndexedChartReferenceLine element)
Description copied from interface:IGridModel
Returns the parent of the givenelement
.- Specified by:
getParent
in interfaceIGridModel<IndexedChartReferenceLine>
- Parameters:
element
- the element, cannot benull
.- Returns:
- the parent element or
null
.
-
hasChildren
public boolean hasChildren(IndexedChartReferenceLine element)
Description copied from interface:IGridModel
Returnstrue
if the element has children.- Specified by:
hasChildren
in interfaceIGridModel<IndexedChartReferenceLine>
- Parameters:
element
- the element, cannot benull
.- Returns:
true
if the element has children.
-
getSelectedElementModel
public IValue<IndexedChartReferenceLine> getSelectedElementModel()
Description copied from interface:IGridModel
Returns the model of currently selected element in grid.- Specified by:
getSelectedElementModel
in interfaceIGridModel<IndexedChartReferenceLine>
- Returns:
- the
IValue
instance, nevernull
.
-
getChange
public IChange getChange()
-
dispose
public void dispose()
Description copied from interface:IModel
Disposes this model.
-
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.
-
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
.
-
addReferenceLine
public ChartReferenceLine addReferenceLine()
Description copied from interface:IChartReferenceLineGridModel
Creates new chart reference line and adds it to array.- Specified by:
addReferenceLine
in interfaceIChartReferenceLineGridModel
- Returns:
- The created chart reference line
-
getLanguageManager
public IEditingLanguageManager getLanguageManager()
Description copied from interface:IChartReferenceLineGridModel
Gets the language manager.- Specified by:
getLanguageManager
in interfaceIChartReferenceLineGridModel
- Returns:
- The language manager, never
null
-
getReferenceLines
public ChartReferenceLines getReferenceLines()
Description copied from interface:IChartReferenceLineGridModel
Gets the modelled chart reference line.- Specified by:
getReferenceLines
in interfaceIChartReferenceLineGridModel
- Returns:
- The chart reference line array, never
null
-
isReadOnly
public boolean isReadOnly()
Description copied from interface:IChartReferenceLineGridModel
Checks if this model is read only.- Specified by:
isReadOnly
in interfaceIChartReferenceLineGridModel
- Returns:
true
if this model is read only
-
removeReferenceLine
public void removeReferenceLine(ChartReferenceLine referenceLine)
Description copied from interface:IChartReferenceLineGridModel
Removes chart reference line from array.- Specified by:
removeReferenceLine
in interfaceIChartReferenceLineGridModel
- Parameters:
referenceLine
- the chart reference line for removal
-
getProject
public IV8Project getProject()
Description copied from interface:IChartReferenceLineGridModel
Gets the project.- Specified by:
getProject
in interfaceIChartReferenceLineGridModel
- Returns:
- The project, never
null
-
getChart
public Chart getChart()
Description copied from interface:IChartReferenceLineGridModel
Gets the chart object.- Specified by:
getChart
in interfaceIChartReferenceLineGridModel
- Returns:
- the chart, never
null
-
setChartReferenceLines
public void setChartReferenceLines(ChartReferenceLines lines)
-
-