Package com._1c.g5.v8.dt.md.ui.control
Class PicturePreview
- java.lang.Object
-
- org.eclipse.swt.widgets.Widget
-
- org.eclipse.swt.widgets.Control
-
- org.eclipse.swt.widgets.Scrollable
-
- org.eclipse.swt.widgets.Composite
-
- com._1c.g5.v8.dt.md.ui.control.PicturePreview
-
- All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable
public class PicturePreview extends org.eclipse.swt.widgets.Composite
AComposite
implementation for picture previewing.
-
-
Constructor Summary
Constructors Constructor Description PicturePreview(org.eclipse.swt.widgets.Composite parent)
Instantiates a newPicturePreview
.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addMouseListener(org.eclipse.swt.events.MouseListener listener)
void
clearTransparency()
Resets transparency for the image.protected void
disposeImage()
Disposes image.org.eclipse.swt.widgets.Label
getImageLabel()
protected void
onDispose()
Invoked on widget disposing.void
removeMouseListener(org.eclipse.swt.events.MouseListener listener)
void
setCursor(org.eclipse.swt.graphics.Cursor cursor)
void
setImage(byte[] content)
Sets image by the given content (byte array).void
setTransparentPoint(int x, int y)
Sets transparency color obtained from the given image point.-
Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
-
Methods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
-
Methods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
-
Methods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
-
-
-
-
Constructor Detail
-
PicturePreview
public PicturePreview(org.eclipse.swt.widgets.Composite parent)
Instantiates a newPicturePreview
.- Parameters:
parent
- is aComposite
-
-
Method Detail
-
setImage
public void setImage(byte[] content)
Sets image by the given content (byte array).- Parameters:
content
- is a byte array
-
addMouseListener
public void addMouseListener(org.eclipse.swt.events.MouseListener listener)
- Overrides:
addMouseListener
in classorg.eclipse.swt.widgets.Control
-
removeMouseListener
public void removeMouseListener(org.eclipse.swt.events.MouseListener listener)
- Overrides:
removeMouseListener
in classorg.eclipse.swt.widgets.Control
-
setCursor
public void setCursor(org.eclipse.swt.graphics.Cursor cursor)
- Overrides:
setCursor
in classorg.eclipse.swt.widgets.Control
-
getImageLabel
public org.eclipse.swt.widgets.Label getImageLabel()
- Returns:
Label
that holds the image
-
setTransparentPoint
public void setTransparentPoint(int x, int y)
Sets transparency color obtained from the given image point.
-
clearTransparency
public void clearTransparency()
Resets transparency for the image.
-
onDispose
protected void onDispose()
Invoked on widget disposing.
-
disposeImage
protected void disposeImage()
Disposes image.
-
-