Class TrendlineArrayGridModel
- 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.form.ui.chart.aef.models.trendline.TrendlineArrayGridModel
-
- All Implemented Interfaces:
IEditableModel
,IModel
,IValidable
,IModelApiAwareModel
,ITrendlineArrayGridModel
,IGridModel<com._1c.g5.v8.dt.form.ui.internal.chart.aef.models.trendline.IndexedTrendline>
public class TrendlineArrayGridModel extends EditableModel implements ITrendlineArrayGridModel
Model for trendline array in grid.
-
-
Constructor Summary
Constructors Constructor Description TrendlineArrayGridModel(IModelObjectFactory chartObjectsFactory, IColorProvider colorProvider, IFontProvider fontProvider, IBorderProvider borderProvider, IEditingLanguageManager languageManager, IModelEditingSupport modelEditingSupport, TrendlineArray trendlineArray, IV8Project v8project, Version version)
The constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Trendline
addTrendline()
Creates new trendline and adds it to array.void
dispose()
Disposes this model.IChange
getChange()
com._1c.g5.v8.dt.form.ui.internal.chart.aef.models.trendline.IndexedTrendline[]
getChildren(com._1c.g5.v8.dt.form.ui.internal.chart.aef.models.trendline.IndexedTrendline element)
Returns the array of children for a givenelement
.com._1c.g5.v8.dt.form.ui.internal.chart.aef.models.trendline.IndexedTrendline[]
getElements()
Returns the array of top level objects.IEditingLanguageManager
getLanguageManager()
Gets the language manager.IModelApi
getModelApi()
Returns the model API.com._1c.g5.v8.dt.form.ui.internal.chart.aef.models.trendline.IndexedTrendline
getParent(com._1c.g5.v8.dt.form.ui.internal.chart.aef.models.trendline.IndexedTrendline element)
Returns the parent of the givenelement
.IV8Project
getProject()
Gets the project.IValue<com._1c.g5.v8.dt.form.ui.internal.chart.aef.models.trendline.IndexedTrendline>
getSelectedElementModel()
Returns the model of currently selected element in grid.TrendlineArray
getTrendlineArray()
Gets the modelled trendline array.boolean
hasChildren(com._1c.g5.v8.dt.form.ui.internal.chart.aef.models.trendline.IndexedTrendline element)
Returnstrue
if the element has children.boolean
isReadOnly()
Checks if this model is read only.void
removeTrendline(Trendline trendline)
Removes trendline from array.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
-
TrendlineArrayGridModel
public TrendlineArrayGridModel(IModelObjectFactory chartObjectsFactory, IColorProvider colorProvider, IFontProvider fontProvider, IBorderProvider borderProvider, IEditingLanguageManager languageManager, IModelEditingSupport modelEditingSupport, TrendlineArray trendlineArray, IV8Project v8project, Version version)
The constructor.- Parameters:
chartObjectsFactory
- The chart objects factory, cannot benull
.colorProvider
- The color provider, cannot benull
.fontProvider
- The font provider, cannot benull
.borderProvider
- The border provider, cannot benull
.languageManager
- The language manager, cannot benull
.modelEditingSupport
- The model editing support, cannot benull
.trendlineArray
- The modelled trendline array, cannot benull
.v8project
- The project, cannot benull
.version
- The version, cannot benull
.
-
-
Method Detail
-
addTrendline
public Trendline addTrendline()
Description copied from interface:ITrendlineArrayGridModel
Creates new trendline and adds it to array.- Specified by:
addTrendline
in interfaceITrendlineArrayGridModel
- Returns:
- The created trendline.
-
dispose
public void dispose()
Description copied from interface:IModel
Disposes this model.
-
getChange
public IChange getChange()
-
getChildren
public com._1c.g5.v8.dt.form.ui.internal.chart.aef.models.trendline.IndexedTrendline[] getChildren(com._1c.g5.v8.dt.form.ui.internal.chart.aef.models.trendline.IndexedTrendline element)
Description copied from interface:IGridModel
Returns the array of children for a givenelement
.- Specified by:
getChildren
in interfaceIGridModel<com._1c.g5.v8.dt.form.ui.internal.chart.aef.models.trendline.IndexedTrendline>
- Parameters:
element
- the parent element, cannot benull
.- Returns:
- the array of children of the element, never
null
.
-
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.
-
getElements
public com._1c.g5.v8.dt.form.ui.internal.chart.aef.models.trendline.IndexedTrendline[] getElements()
Description copied from interface:IGridModel
Returns the array of top level objects.- Specified by:
getElements
in interfaceIGridModel<com._1c.g5.v8.dt.form.ui.internal.chart.aef.models.trendline.IndexedTrendline>
- Returns:
- the array of top level objects, never
null
.
-
getLanguageManager
public IEditingLanguageManager getLanguageManager()
Description copied from interface:ITrendlineArrayGridModel
Gets the language manager.- Specified by:
getLanguageManager
in interfaceITrendlineArrayGridModel
- Returns:
- The language manager, never
null
.
-
getParent
public com._1c.g5.v8.dt.form.ui.internal.chart.aef.models.trendline.IndexedTrendline getParent(com._1c.g5.v8.dt.form.ui.internal.chart.aef.models.trendline.IndexedTrendline element)
Description copied from interface:IGridModel
Returns the parent of the givenelement
.- Specified by:
getParent
in interfaceIGridModel<com._1c.g5.v8.dt.form.ui.internal.chart.aef.models.trendline.IndexedTrendline>
- Parameters:
element
- the element, cannot benull
.- Returns:
- the parent element or
null
.
-
getProject
public IV8Project getProject()
Description copied from interface:ITrendlineArrayGridModel
Gets the project.- Specified by:
getProject
in interfaceITrendlineArrayGridModel
- Returns:
- The project, never
null
.
-
getSelectedElementModel
public IValue<com._1c.g5.v8.dt.form.ui.internal.chart.aef.models.trendline.IndexedTrendline> getSelectedElementModel()
Description copied from interface:IGridModel
Returns the model of currently selected element in grid.- Specified by:
getSelectedElementModel
in interfaceIGridModel<com._1c.g5.v8.dt.form.ui.internal.chart.aef.models.trendline.IndexedTrendline>
- Returns:
- the
IValue
instance, nevernull
.
-
getTrendlineArray
public TrendlineArray getTrendlineArray()
Description copied from interface:ITrendlineArrayGridModel
Gets the modelled trendline array.- Specified by:
getTrendlineArray
in interfaceITrendlineArrayGridModel
- Returns:
- The trengline array, never
null
.
-
hasChildren
public boolean hasChildren(com._1c.g5.v8.dt.form.ui.internal.chart.aef.models.trendline.IndexedTrendline element)
Description copied from interface:IGridModel
Returnstrue
if the element has children.- Specified by:
hasChildren
in interfaceIGridModel<com._1c.g5.v8.dt.form.ui.internal.chart.aef.models.trendline.IndexedTrendline>
- Parameters:
element
- the element, cannot benull
.- Returns:
true
if the element has children.
-
isReadOnly
public boolean isReadOnly()
Description copied from interface:ITrendlineArrayGridModel
Checks if this model is read only.- Specified by:
isReadOnly
in interfaceITrendlineArrayGridModel
- Returns:
true
if this model is read only.
-
removeTrendline
public void removeTrendline(Trendline trendline)
Description copied from interface:ITrendlineArrayGridModel
Removes trendline from array.- Specified by:
removeTrendline
in interfaceITrendlineArrayGridModel
- Parameters:
trendline
- The trendline for removal.
-
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
.
-
-