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
A Composite implementation for picture previewing.
  • Field Summary

    Fields inherited from class org.eclipse.swt.widgets.Control

    handle
  • Constructor Summary

    Constructors
    Constructor
    Description
    PicturePreview(org.eclipse.swt.widgets.Composite parent)
    Instantiates a new PicturePreview.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    addMouseListener(org.eclipse.swt.events.MouseListener listener)
    void
    Resets transparency for the image.
    protected void
    Disposes image.
    org.eclipse.swt.widgets.Label
     
    protected void
    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, toString

    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

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

    Methods inherited from interface org.eclipse.swt.graphics.Drawable

    isAutoScalable
  • Constructor Details

    • PicturePreview

      public PicturePreview(org.eclipse.swt.widgets.Composite parent)
      Instantiates a new PicturePreview.
      Parameters:
      parent - is a Composite
  • Method Details

    • 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 class org.eclipse.swt.widgets.Control
    • removeMouseListener

      public void removeMouseListener(org.eclipse.swt.events.MouseListener listener)
      Overrides:
      removeMouseListener in class org.eclipse.swt.widgets.Control
    • setCursor

      public void setCursor(org.eclipse.swt.graphics.Cursor cursor)
      Overrides:
      setCursor in class org.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.