Class CommonPictureContentEditModel
- java.lang.Object
-
- com._1c.g5.aef2.validators.Validable
-
- com._1c.g5.aef2.models.Model
-
- com._1c.g5.aef2.models.CompoundModel
-
- com._1c.g5.v8.dt.md.ui.aef.models.commonpicture.CommonPictureContentEditModel
-
- All Implemented Interfaces:
ICompoundModel
,IEditableModel
,IModel
,IValidable
,IModelApiAwareModel
,ICommonPictureContentEditModel
public class CommonPictureContentEditModel extends CompoundModel implements ICommonPictureContentEditModel, IModelApiAwareModel
BaseCommonPicture
content editor model
-
-
Constructor Summary
Constructors Constructor Description CommonPictureContentEditModel(CommonPicture commonPicture, IPictureManager pictureManager, IBmModelManager modelManager, IV8ProjectManager v8projectManager)
Create instance ofCommonPictureContentEditModel
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
dispose()
Disposes this model.IValue<Boolean>
getCollectionModeValue()
Flag value of collection mode activityCommonPicture
getCommonPicture()
The common picture metadata objectPictureDirectionVariant
getDirection()
Direction of selected pictureICommonPictureContentGridModel
getGridModel()
Get submodel for grid componentIModelApi
getModelApi()
Returns the model API.byte[]
getSelectedImageData()
Image data of selected pictureIValue<CommonPictureContentType>
getSelectedPictureContentTypeValue()
Selected value of common picture content typeboolean
isEditable()
Checks if this model is editable.void
setEditable(boolean editable)
Sets model editable state.void
setModelApi(IModelApi modelApi)
Sets the specified API to the model.-
Methods inherited from class com._1c.g5.aef2.models.CompoundModel
addModel, getChange, getModels, isOnline, setComponent, validate
-
Methods inherited from class com._1c.g5.aef2.models.Model
addModelListener, beginExternalUpdate, checkOffline, checkOnline, commit, createWorkingCopy, discard, endExternalUpdate, getComponent, getCurrentChangeOrigin, getRunnableQueue, notifyModelChanged, notifyModelCommitted, removeModelListener, setOnline, toString
-
Methods inherited from class com._1c.g5.aef2.validators.Validable
addValidator, getValidatorTarget, removeValidator, 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.ICompoundModel
getModels
-
Methods inherited from interface com._1c.g5.aef2.models.IModel
addModelListener, commit, createWorkingCopy, discard, getChange, getComponent, isOnline, removeModelListener, setComponent
-
Methods inherited from interface com._1c.g5.aef2.validators.IValidable
addValidator, removeValidator, validate, validate
-
-
-
-
Constructor Detail
-
CommonPictureContentEditModel
public CommonPictureContentEditModel(CommonPicture commonPicture, IPictureManager pictureManager, IBmModelManager modelManager, IV8ProjectManager v8projectManager)
Create instance ofCommonPictureContentEditModel
- Parameters:
commonPicture
- theCommonPicture
metadata object, cannot benull
pictureManager
- the instance ofIPictureManager
service, cannot benull
modelManager
- the instance ofIBmModelManager
service, cannot benull
v8projectManager
- the instance ofIV8ProjectManager
service, cannot benull
-
-
Method Detail
-
dispose
public void dispose()
Description copied from interface:IModel
Disposes this model.- Specified by:
dispose
in interfaceIModel
- Overrides:
dispose
in classCompoundModel
-
getSelectedPictureContentTypeValue
public IValue<CommonPictureContentType> getSelectedPictureContentTypeValue()
Description copied from interface:ICommonPictureContentEditModel
Selected value of common picture content type- Specified by:
getSelectedPictureContentTypeValue
in interfaceICommonPictureContentEditModel
- Returns:
- value of
CommonPictureContentType
, nevernull
-
getCollectionModeValue
public IValue<Boolean> getCollectionModeValue()
Description copied from interface:ICommonPictureContentEditModel
Flag value of collection mode activity- Specified by:
getCollectionModeValue
in interfaceICommonPictureContentEditModel
- Returns:
- value of Boolean flag, never
null
-
getCommonPicture
public CommonPicture getCommonPicture()
Description copied from interface:ICommonPictureContentEditModel
The common picture metadata object- Specified by:
getCommonPicture
in interfaceICommonPictureContentEditModel
- Returns:
- the instance of
CommonPicture
, cannot 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.
-
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
.
-
getGridModel
public ICommonPictureContentGridModel getGridModel()
Description copied from interface:ICommonPictureContentEditModel
Get submodel for grid component- Specified by:
getGridModel
in interfaceICommonPictureContentEditModel
- Returns:
- the
ICommonPictureContentGridModel
model
-
getSelectedImageData
public byte[] getSelectedImageData()
Description copied from interface:ICommonPictureContentEditModel
Image data of selected picture- Specified by:
getSelectedImageData
in interfaceICommonPictureContentEditModel
- Returns:
- the byte array of selected image, or
null
if no image selected.
-
getDirection
public PictureDirectionVariant getDirection()
Description copied from interface:ICommonPictureContentEditModel
Direction of selected picture- Specified by:
getDirection
in interfaceICommonPictureContentEditModel
- Returns:
PictureDirectionVariant
of selected image, ornull
if direction is not provided.
-
isEditable
public boolean isEditable()
Description copied from interface:IEditableModel
Checks if this model is editable.- Specified by:
isEditable
in interfaceIEditableModel
- Returns:
true
if this model is editable,false
otherwise
-
setEditable
public void setEditable(boolean editable)
Description copied from interface:IEditableModel
Sets model editable state.- Specified by:
setEditable
in interfaceIEditableModel
- Parameters:
editable
- the editable state,true
if this model is editable,false
otherwise
-
-