Class ImageControl<S extends ThemeSkin>
java.lang.Object
com._1c.g5.lwt.AbstractLightControl
com._1c.g5.v8.dt.form.internal.presentation.controls.AbstractViewControl<S>
com._1c.g5.v8.dt.form.presentation.controls.base.AbstractCustomizationControl<S>
com._1c.g5.v8.dt.form.internal.presentation.controls.base.RectangleControl<S>
com._1c.g5.v8.dt.form.internal.presentation.controls.base.ImageControl<S>
- All Implemented Interfaces:
ILightControl,IReadOnlyControl,IRoundedRectangleControl,IViewControl<S>
- Direct Known Subclasses:
ImageButtonControl
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionorg.eclipse.swt.graphics.PointcomputeSize(org.eclipse.swt.graphics.GC gc, int width, int height, boolean flushCache) voiddispose()org.eclipse.swt.graphics.Imageorg.eclipse.swt.graphics.ImagegetImage()Gets the displayed image.org.eclipse.swt.graphics.Pointorg.eclipse.swt.graphics.Pointprotected org.eclipse.swt.graphics.ImagegetPaintingImage(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle rectangle) Invoked bypaint(GC, Rectangle)method to obtain current image to draw.booleanvoidpaint(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle rectangle) voidvoidsetDisabledImage(org.eclipse.swt.graphics.Image disabledImage) Sets the disabled image.voidsetImage(org.eclipse.swt.graphics.Image image) Sets the image to display.voidsetImageOffset(org.eclipse.swt.graphics.Point imageOffset) Sets the image offset from the control center.voidsetMargins(org.eclipse.swt.graphics.Point margins) voidsetSize(int width, int height) voidsetUseDisabledImagesIfReadOnly(boolean flag) Methods inherited from class com._1c.g5.v8.dt.form.internal.presentation.controls.base.RectangleControl
getBackgroundColor, getBottomBorderColor, getDefaultBorderColor, getDefaultDisabledBorderColor, getDisabledBottomBorderColor, getDisabledLeftBorderColor, getDisabledRightBorderColor, getDisabledTopBorderColor, getLeftBorderColor, getRadius, getRightBorderColor, getTopBorderColor, getUseDisabledColorsIfReadOnly, handleEvent, isBottomLeftRounded, isBottomRightRounded, isTopLeftRounded, isTopRightRounded, setBackgroundColor, setBorderColors, setDisabledBorderColors, setFillBackgroungIfDisabled, setFillBackgroungIfReadOnly, setRadius, setRounded, setUseDisabledColorsIfReadOnlyMethods inherited from class com._1c.g5.v8.dt.form.presentation.controls.base.AbstractCustomizationControl
getColor, getColor, getFont, getScaledFontMethods inherited from class com._1c.g5.v8.dt.form.internal.presentation.controls.AbstractViewControl
getControlRect, getSkin, getTheme, isSelfReadOnly, setReadOnly, setThemeMethods inherited from class com._1c.g5.lwt.AbstractLightControl
addControlListener, getBounds, getCursor, getData, getLayoutData, getOverlay, getParent, getTooltip, getVisibleBounds, invalidate, invalidate, isDisposed, isEnabled, isFocused, isVisible, removeControlListener, setBounds, setCursor, setData, setEnabled, setFocus, setFocusable, setLayoutData, setOverlay, setParent, setTooltip, setVisibleMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com._1c.g5.lwt.ILightControl
addControlListener, getBounds, getCursor, getData, getLayoutData, getParent, getTooltip, getVisibleBounds, initialize, invalidate, invalidate, isDisposed, isEnabled, isFocused, isVisible, removeControlListener, setBounds, setCursor, setData, setEnabled, setFocus, setLayoutData, setParent, setTooltip, setVisibleMethods inherited from interface com._1c.g5.v8.dt.form.internal.presentation.controls.base.IReadOnlyControl
isReadOnlyMethods inherited from interface com._1c.g5.v8.dt.form.internal.presentation.controls.base.IRoundedRectangleControl
buildRoundedRectanglePath, drawRoundedRectangle, setRounded
-
Constructor Details
-
ImageControl
public ImageControl()
-
-
Method Details
-
setUseDisabledImagesIfReadOnly
public void setUseDisabledImagesIfReadOnly(boolean flag) -
getUseDisabledImagesIfReadOnly
public boolean getUseDisabledImagesIfReadOnly() -
setSize
public void setSize(int width, int height) -
setAutoSize
public void setAutoSize() -
getMargins
public org.eclipse.swt.graphics.Point getMargins()- Returns:
- the margins
-
setMargins
public void setMargins(org.eclipse.swt.graphics.Point margins) - Parameters:
margins- the margins to set
-
getImage
public org.eclipse.swt.graphics.Image getImage()Gets the displayed image.- Returns:
- the image or
nullif no image assigned.
-
setImage
public void setImage(org.eclipse.swt.graphics.Image image) Sets the image to display.- Parameters:
image- the new image.
-
setDisabledImage
public void setDisabledImage(org.eclipse.swt.graphics.Image disabledImage) Sets the disabled image.- Parameters:
disabledImage- the new disabled image.
-
getDisabledImage
public org.eclipse.swt.graphics.Image getDisabledImage()- Returns:
- the disabledImage
-
setImageOffset
public void setImageOffset(org.eclipse.swt.graphics.Point imageOffset) Sets the image offset from the control center. Use it to fine-tune the image position inside this control.- Parameters:
imageOffset- the image offset to set, should not benull.
-
getImageOffset
public org.eclipse.swt.graphics.Point getImageOffset()- Returns:
- the imageOffset
-
computeSize
public org.eclipse.swt.graphics.Point computeSize(org.eclipse.swt.graphics.GC gc, int width, int height, boolean flushCache) - Specified by:
computeSizein interfaceILightControl- Overrides:
computeSizein classAbstractLightControl
-
paint
public void paint(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle rectangle) - Specified by:
paintin interfaceILightControl- Overrides:
paintin classRectangleControl<S extends ThemeSkin>
-
dispose
public void dispose()- Specified by:
disposein interfaceILightControl- Overrides:
disposein classAbstractCustomizationControl<S extends ThemeSkin>
-
getPaintingImage
protected org.eclipse.swt.graphics.Image getPaintingImage(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle rectangle) Invoked bypaint(GC, Rectangle)method to obtain current image to draw.- Parameters:
gc-rectangle-- Returns:
-