Class UrlSinglePictureManifest
- java.lang.Object
-
- com._1c.g5.v8.dt.moxel.ui.pictures.UrlSinglePictureManifest
-
- All Implemented Interfaces:
IPictureManifest
public class UrlSinglePictureManifest extends Object implements IPictureManifest
IPictureManifestimplementation forUrlPicturewith single picture
-
-
Field Summary
-
Fields inherited from interface com._1c.g5.v8.dt.platform.pictures.IPictureManifest
UNRESOLVED_PICTURE_MANIFEST
-
-
Constructor Summary
Constructors Constructor Description UrlSinglePictureManifest(UrlPicture picture)Create a instance ofUrlSinglePictureManifest
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description CompositeIdgetCompositeId()The pictureCompositeIdPictureDirectionVariantgetDirection(IPictureManifestQuery query)The picturePictureDirectionVariantOptional<InputStream>getInputStream(IPictureManifestQuery query)The pictureInputStreambooleanisTemplate(IPictureManifestQuery query)Is picture is template
-
-
-
Constructor Detail
-
UrlSinglePictureManifest
public UrlSinglePictureManifest(UrlPicture picture)
Create a instance ofUrlSinglePictureManifest- Parameters:
picture- the sourceUrlPicture, cannot benull
-
-
Method Detail
-
getCompositeId
public CompositeId getCompositeId()
Description copied from interface:IPictureManifestThe pictureCompositeId- Specified by:
getCompositeIdin interfaceIPictureManifest- Returns:
- the
CompositeIdornullif picture without id.
-
isTemplate
public boolean isTemplate(IPictureManifestQuery query)
Description copied from interface:IPictureManifestIs picture is template- Specified by:
isTemplatein interfaceIPictureManifest- Parameters:
query- theIPictureManifestQuery, cannot benull- Returns:
trueif picture by given query is template,falsein otherwise
-
getDirection
public PictureDirectionVariant getDirection(IPictureManifestQuery query) throws IOException
Description copied from interface:IPictureManifestThe picturePictureDirectionVariant- Specified by:
getDirectionin interfaceIPictureManifest- Parameters:
query- theIPictureManifestQuery, cannot benull- Returns:
- first suitable
PictureDirectionVariantby 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:IPictureManifestThe pictureInputStreamThe picture may be cropped if it contains enough information for this purpose.
- Specified by:
getInputStreamin interfaceIPictureManifest- Parameters:
query- theIPictureManifestQuery, cannot benull- Returns:
- the
InputStreamof picture by given query, nevernull - Throws:
FileNotFoundException
-
-