public class SingleImageControl extends Composite implements IImageInfoChanged, IZoomCapable
Constructor and Description |
---|
SingleImageControl(Composite parent,
int style,
IFile file,
Rectangle rect)
Creates the image control from a file with zoom 1.
|
SingleImageControl(Composite parent,
int style,
ImageInfo imageInfo,
Rectangle rect)
Creates the image control from a file with zoom 1.
|
SingleImageControl(Composite parent,
int style,
int zoom,
AssetReference ref,
ILayoutListener layout)
Creates the image control with a zoom level.
|
SingleImageControl(Composite parent,
int style,
int zoom,
AssetReference ref,
ILayoutListener layout,
Rectangle rect)
Creates the image control with a zoom level.
|
Modifier and Type | Method and Description |
---|---|
Point |
computeSize(int wHint,
int hHint,
boolean changed)
Computes the size.
|
void |
onChanged(ImageInfo info)
Called to inform that new data is available in the instance of ImageInfo.
|
void |
paintControl(PaintEvent e)
Paints the canvas foreground.
|
void |
scaleToMax(int mcx,
int mcy)
Scales down the image to a maximum size.
|
void |
setZoom(double zoom)
Sets the zoom level (1-10).
|
void |
widgetDisposed(DisposeEvent e)
Widget is disposed.
|
public SingleImageControl(Composite parent, int style, IFile file, Rectangle rect)
parent
- Parent composite.style
- The control style SWT.*.file
- File.rect
- Partial rectangle when not null.public SingleImageControl(Composite parent, int style, ImageInfo imageInfo, Rectangle rect)
parent
- Parent composite.style
- The control style SWT.*.imageInfo
- ImageInfo for image, will be released when control is disposed of.rect
- Partial rectangle when not null.public SingleImageControl(Composite parent, int style, int zoom, AssetReference ref, ILayoutListener layout)
public SingleImageControl(Composite parent, int style, int zoom, AssetReference ref, ILayoutListener layout, Rectangle rect)
public void onChanged(ImageInfo info)
onChanged
in interface IImageInfoChanged
public void setZoom(double zoom)
setZoom
in interface IZoomCapable
public void scaleToMax(int mcx, int mcy)
public void widgetDisposed(DisposeEvent e)
public Point computeSize(int wHint, int hHint, boolean changed)
public void paintControl(PaintEvent e)
iizi® is a registered trademark of Mindus SARL. © Copyright Mindus SARL, 2020. All rights reserved.