public class DefaultImageManager extends java.lang.Object implements CmsImageManager
Constructor and Description |
---|
DefaultImageManager() |
Modifier and Type | Method and Description |
---|---|
Binary |
getImageBinary(Node node) |
org.eclipse.swt.graphics.Point |
getImageSize(Node node) |
java.lang.String |
getImageTag(Node node)
The related <img> tag, with src, width and height set.
|
java.lang.StringBuilder |
getImageTagBuilder(Node node,
org.eclipse.swt.graphics.Point size)
The related <img> tag, with url, width and height set.
|
java.lang.String |
getImageUrl(Node node)
Returns the remotely accessible URL of the image (registering it if
needed) @return null if not available
|
protected java.lang.String |
getResourceName(Node node) |
org.eclipse.swt.graphics.Image |
getSwtImage(Node node) |
java.lang.Boolean |
load(Node node,
org.eclipse.swt.widgets.Control control,
org.eclipse.swt.graphics.Point preferredSize)
Load image in control
|
protected void |
processNewImageFile(Node fileNode,
org.eclipse.swt.graphics.ImageData id)
Does nothign by default.
|
java.lang.String |
uploadImage(Node parentNode,
java.lang.String fileName,
java.io.InputStream in) |
public java.lang.Boolean load(Node node, org.eclipse.swt.widgets.Control control, org.eclipse.swt.graphics.Point preferredSize) throws RepositoryException
CmsImageManager
load
in interface CmsImageManager
RepositoryException
public org.eclipse.swt.graphics.Point getImageSize(Node node) throws RepositoryException
getImageSize
in interface CmsImageManager
RepositoryException
public java.lang.String getImageTag(Node node) throws RepositoryException
CmsImageManager
getImageTag
in interface CmsImageManager
RepositoryException
public java.lang.StringBuilder getImageTagBuilder(Node node, org.eclipse.swt.graphics.Point size) throws RepositoryException
CmsImageManager
getImageTagBuilder
in interface CmsImageManager
RepositoryException
public java.lang.String getImageUrl(Node node) throws RepositoryException
CmsImageManager
getImageUrl
in interface CmsImageManager
RepositoryException
protected java.lang.String getResourceName(Node node) throws RepositoryException
RepositoryException
public Binary getImageBinary(Node node) throws RepositoryException
getImageBinary
in interface CmsImageManager
RepositoryException
public org.eclipse.swt.graphics.Image getSwtImage(Node node) throws RepositoryException
getSwtImage
in interface CmsImageManager
RepositoryException
public java.lang.String uploadImage(Node parentNode, java.lang.String fileName, java.io.InputStream in) throws RepositoryException
uploadImage
in interface CmsImageManager
RepositoryException
protected void processNewImageFile(Node fileNode, org.eclipse.swt.graphics.ImageData id) throws RepositoryException, java.io.IOException
RepositoryException
java.io.IOException
Copyright © 2007–2020. All rights reserved.