Class CommonPictureContentGridModel
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.md.ui.aef.models.commonpicture.CommonPictureContentGridModel
- All Implemented Interfaces:
IEditableModel
,IModel
,IValidable
,ICommonPictureContentGridModel
,IGridModel<ZipPictureManifestEntry>
public class CommonPictureContentGridModel
extends EditableModel
implements ICommonPictureContentGridModel
The implementation of grid model for Common picture content grid component
-
Constructor Summary
ConstructorsConstructorDescriptionCommonPictureContentGridModel
(CommonPictureContentEditModel parentEditModel, IV8Project v8project) Create instance ofCommonPictureContentGridModel
. -
Method Summary
Modifier and TypeMethodDescriptionAdd newZipPictureManifestEntry
to modelClone selectZipPictureManifestEntry
in modelgetChildren
(ZipPictureManifestEntry element) Returns the array of children for a givenelement
.Returns the array of top level objects.getManifestEntryData
(ZipPictureManifestEntry manifestEntry) Content data of specifedZipPictureManifestEntry
getParent
(ZipPictureManifestEntry element) Returns the parent of the givenelement
.Returns the model of currently selected element in grid.byte[]
Image data of select pictureReturns the V8 project.boolean
hasChildren
(ZipPictureManifestEntry element) Returnstrue
if the element has children.boolean
Common picture content can contains a blocks of picturesvoid
Remove selectZipPictureManifestEntry
from modelvoid
setManifestEntryData
(ZipPictureManifestEntry manifestEntry, CommonPictureManifestEntryData data, String extension) Determine data content for givenZipPictureManifestEntry
void
updateManifestEntry
(ZipPictureManifestEntry manifestEntry) UpdateZipPictureManifestEntry
in modelMethods 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, dispose, 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, dispose, getComponent, isOnline, removeModelListener, setComponent
Methods inherited from interface com._1c.g5.aef2.validators.IValidable
addValidator, removeValidator, validate, validate
-
Constructor Details
-
CommonPictureContentGridModel
public CommonPictureContentGridModel(CommonPictureContentEditModel parentEditModel, IV8Project v8project) Create instance ofCommonPictureContentGridModel
.- Parameters:
parentEditModel
- the parent edit model, cannot benull
v8project
- the V8 project, cannot benull
-
-
Method Details
-
getV8Project
Description copied from interface:ICommonPictureContentGridModel
Returns the V8 project.- Specified by:
getV8Project
in interfaceICommonPictureContentGridModel
- Returns:
- the V8 project, never
null
.
-
getElements
Description copied from interface:IGridModel
Returns the array of top level objects.- Specified by:
getElements
in interfaceIGridModel<ZipPictureManifestEntry>
- Returns:
- the array of top level objects, never
null
.
-
getChildren
Description copied from interface:IGridModel
Returns the array of children for a givenelement
.- Specified by:
getChildren
in interfaceIGridModel<ZipPictureManifestEntry>
- Parameters:
element
- the parent element, cannot benull
.- Returns:
- the array of children of the element, never
null
.
-
getParent
Description copied from interface:IGridModel
Returns the parent of the givenelement
.- Specified by:
getParent
in interfaceIGridModel<ZipPictureManifestEntry>
- Parameters:
element
- the element, cannot benull
.- Returns:
- the parent element or
null
.
-
hasChildren
Description copied from interface:IGridModel
Returnstrue
if the element has children.- Specified by:
hasChildren
in interfaceIGridModel<ZipPictureManifestEntry>
- Parameters:
element
- the element, cannot benull
.- Returns:
true
if the element has children.
-
getSelectedElementModel
Description copied from interface:IGridModel
Returns the model of currently selected element in grid.- Specified by:
getSelectedElementModel
in interfaceIGridModel<ZipPictureManifestEntry>
- Returns:
- the
IValue
instance, nevernull
.
-
getChange
-
isCollectionMode
public boolean isCollectionMode()Description copied from interface:ICommonPictureContentGridModel
Common picture content can contains a blocks of pictures- Specified by:
isCollectionMode
in interfaceICommonPictureContentGridModel
- Returns:
true
if this picture content can contains a blocks of pictures andfalse
in otherwise
-
addNewZipManifestEntry
Description copied from interface:ICommonPictureContentGridModel
Add newZipPictureManifestEntry
to model- Specified by:
addNewZipManifestEntry
in interfaceICommonPictureContentGridModel
- Returns:
- the new instance of
ZipPictureManifestEntry
, nevernull
-
cloneZipManifestEntry
Description copied from interface:ICommonPictureContentGridModel
Clone selectZipPictureManifestEntry
in model- Specified by:
cloneZipManifestEntry
in interfaceICommonPictureContentGridModel
- Returns:
- the clone instance of
ZipPictureManifestEntry
, can benull
if no entry selected
-
removeSelectedZipManifestEntry
public void removeSelectedZipManifestEntry()Description copied from interface:ICommonPictureContentGridModel
Remove selectZipPictureManifestEntry
from model- Specified by:
removeSelectedZipManifestEntry
in interfaceICommonPictureContentGridModel
-
getManifestEntryData
Description copied from interface:ICommonPictureContentGridModel
Content data of specifedZipPictureManifestEntry
- Specified by:
getManifestEntryData
in interfaceICommonPictureContentGridModel
- Parameters:
manifestEntry
- the instance ofZipPictureManifestEntry
, cannot benull
- Returns:
- byte array of image data, can be
null
-
setManifestEntryData
public void setManifestEntryData(ZipPictureManifestEntry manifestEntry, CommonPictureManifestEntryData data, String extension) Description copied from interface:ICommonPictureContentGridModel
Determine data content for givenZipPictureManifestEntry
- Specified by:
setManifestEntryData
in interfaceICommonPictureContentGridModel
- Parameters:
manifestEntry
- the instance ofZipPictureManifestEntry
, cannot benull
data
-CommonPictureManifestEntryData
of image to set in manifest entry, can benull
for remove content for entryextension
- the extension of image used as data content, can benull
if data isnull
-
updateManifestEntry
Description copied from interface:ICommonPictureContentGridModel
UpdateZipPictureManifestEntry
in model- Specified by:
updateManifestEntry
in interfaceICommonPictureContentGridModel
- Parameters:
manifestEntry
- the instance ofZipPictureManifestEntry
, cannot benull
-
getSelectedImageData
public byte[] getSelectedImageData()Description copied from interface:ICommonPictureContentGridModel
Image data of select picture- Specified by:
getSelectedImageData
in interfaceICommonPictureContentGridModel
- Returns:
- the byte array of selected image, or
null
if no image selected.
-