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
Constructors Constructor Description CommonPictureContentGridModel(CommonPictureContentEditModel parentEditModel, IV8Project v8project)
Create instance ofCommonPictureContentGridModel
.
-
Method Summary
-
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, 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 Detail
-
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 Detail
-
getV8Project
public IV8Project getV8Project()
Description copied from interface:ICommonPictureContentGridModel
Returns the V8 project.- Specified by:
getV8Project
in interfaceICommonPictureContentGridModel
- Returns:
- the V8 project, never
null
.
-
getElements
public ZipPictureManifestEntry[] 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
public ZipPictureManifestEntry[] getChildren(ZipPictureManifestEntry element)
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
public ZipPictureManifestEntry getParent(ZipPictureManifestEntry element)
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
public boolean hasChildren(ZipPictureManifestEntry element)
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
public IValue<ZipPictureManifestEntry> 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
public IChange 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
public ZipPictureManifestEntry addNewZipManifestEntry()
Description copied from interface:ICommonPictureContentGridModel
Add newZipPictureManifestEntry
to model- Specified by:
addNewZipManifestEntry
in interfaceICommonPictureContentGridModel
- Returns:
- the new instance of
ZipPictureManifestEntry
, nevernull
-
cloneZipManifestEntry
public ZipPictureManifestEntry 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
public CommonPictureManifestEntryData getManifestEntryData(ZipPictureManifestEntry manifestEntry)
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
public void updateManifestEntry(ZipPictureManifestEntry manifestEntry)
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.
-
-