Class UrlSinglePictureManifest
java.lang.Object
com._1c.g5.v8.dt.moxel.ui.pictures.UrlSinglePictureManifest
- All Implemented Interfaces:
IPictureManifest
IPictureManifest
implementation for UrlPicture
with single picture-
Field Summary
Fields inherited from interface com._1c.g5.v8.dt.platform.pictures.IPictureManifest
UNRESOLVED_PICTURE_MANIFEST
-
Constructor Summary
ConstructorsConstructorDescriptionUrlSinglePictureManifest
(UrlPicture picture) Create a instance ofUrlSinglePictureManifest
-
Method Summary
Modifier and TypeMethodDescriptionThe pictureCompositeId
The picturePictureDirectionVariant
The pictureInputStream
boolean
isTemplate
(IPictureManifestQuery query) Is picture is template
-
Constructor Details
-
UrlSinglePictureManifest
Create a instance ofUrlSinglePictureManifest
- Parameters:
picture
- the sourceUrlPicture
, cannot benull
-
-
Method Details
-
getCompositeId
Description copied from interface:IPictureManifest
The pictureCompositeId
- Specified by:
getCompositeId
in interfaceIPictureManifest
- Returns:
- the
CompositeId
ornull
if picture without id.
-
isTemplate
Description copied from interface:IPictureManifest
Is picture is template- Specified by:
isTemplate
in interfaceIPictureManifest
- Parameters:
query
- theIPictureManifestQuery
, cannot benull
- Returns:
true
if picture by given query is template,false
in otherwise
-
getDirection
Description copied from interface:IPictureManifest
The picturePictureDirectionVariant
- Specified by:
getDirection
in interfaceIPictureManifest
- Parameters:
query
- theIPictureManifestQuery
, cannot benull
- Returns:
- first suitable
PictureDirectionVariant
by the following algorithm:Picture variant selection in LTR-interface (in order of priority):
- Left to right
- Left to right, can flip
- Right to left, can flip
- Any
- Right to left
Picture variant selection in RTL-interface (in order of priority):
- Right to left
- Right to left, can flip
- Left to right, can flip
- Any
- Left to right
- Throws:
IOException
- if there is a problem to read the picture content
-
getInputStream
public Optional<InputStream> getInputStream(IPictureManifestQuery query) throws FileNotFoundException Description copied from interface:IPictureManifest
The pictureInputStream
The picture may be cropped if it contains enough information for this purpose.
- Specified by:
getInputStream
in interfaceIPictureManifest
- Parameters:
query
- theIPictureManifestQuery
, cannot benull
- Returns:
- the
InputStream
of picture by given query, nevernull
- Throws:
FileNotFoundException
-