Class ImageButtonControl<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>
com._1c.g5.v8.dt.form.internal.presentation.controls.base.ImageButtonControl<S>
- All Implemented Interfaces:
ILightControl,IReadOnlyControl,IRoundedRectangleControl,IViewControl<S>
- Direct Known Subclasses:
CheckboxViewControl,RadioButtonViewControl,SwitcherViewControl
-
Constructor Summary
ConstructorsConstructorDescriptionImageButtonControl(String imageId, String disabledImageId) ImageButtonControl(String imageId, String compactImageId, String disabledImageId, String compactDisabledImageId, String hotImageId, String compactHotImageId) -
Method Summary
Modifier and TypeMethodDescriptionvoiddispose()org.eclipse.swt.graphics.Imageorg.eclipse.swt.graphics.Colororg.eclipse.swt.graphics.Imageorg.eclipse.swt.graphics.ImagegetImage()Gets the displayed image.protected org.eclipse.jface.resource.ImageRegistryprotected org.eclipse.swt.graphics.ImagegetPaintingImage(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle rectangle) Invoked byImageControl.paint(GC, Rectangle)method to obtain current image to draw.voidhandleEvent(org.eclipse.swt.widgets.Event event) booleanprotected booleanisHot()booleanvoidpaint(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle rectangle) voidsetCompactMode(boolean compactMode) voidsetDisabledImage(org.eclipse.swt.graphics.Image disabledImage) Sets the disabled image.voidsetDisabledImage(org.eclipse.swt.graphics.Image disabledImage, org.eclipse.swt.graphics.Image compactDisabledImage) voidsetHighlightColor(org.eclipse.swt.graphics.Color highlightColor) voidsetHotImage(org.eclipse.swt.graphics.Image hotImage, org.eclipse.swt.graphics.Image compactHotImage) voidsetImage(org.eclipse.swt.graphics.Image image) Sets the image to display.voidsetImage(org.eclipse.swt.graphics.Image image, org.eclipse.swt.graphics.Image compactImage) voidsetTheme(IPresentationTheme theme, S skin) voidsetUseHighlight(boolean useHighlight) Methods inherited from class com._1c.g5.v8.dt.form.internal.presentation.controls.base.ImageControl
computeSize, getImageOffset, getMargins, getUseDisabledImagesIfReadOnly, setAutoSize, setImageOffset, setMargins, setSize, setUseDisabledImagesIfReadOnlyMethods 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, 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, setReadOnlyMethods 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
-
ImageButtonControl
public ImageButtonControl(String imageId, String compactImageId, String disabledImageId, String compactDisabledImageId, String hotImageId, String compactHotImageId) - Parameters:
imageId- cannot benull.compactImageId-disabledImageId-compactDisabledImageId-hotImageId-compactHotImageId-
-
ImageButtonControl
-
-
Method Details
-
setCompactMode
public void setCompactMode(boolean compactMode) -
isCompactMode
public boolean isCompactMode() -
getHighlightColor
public org.eclipse.swt.graphics.Color getHighlightColor() -
setHighlightColor
public void setHighlightColor(org.eclipse.swt.graphics.Color highlightColor) -
isUseHighlight
public boolean isUseHighlight() -
setUseHighlight
public void setUseHighlight(boolean useHighlight) -
getHotImage
public org.eclipse.swt.graphics.Image getHotImage() -
setHotImage
public void setHotImage(org.eclipse.swt.graphics.Image hotImage, org.eclipse.swt.graphics.Image compactHotImage) -
setImage
public void setImage(org.eclipse.swt.graphics.Image image) Description copied from class:ImageControlSets the image to display.- Overrides:
setImagein classImageControl<S extends ThemeSkin>- Parameters:
image- the new image.
-
getImage
public org.eclipse.swt.graphics.Image getImage()Description copied from class:ImageControlGets the displayed image.- Overrides:
getImagein classImageControl<S extends ThemeSkin>- Returns:
- the image or
nullif no image assigned.
-
getDisabledImage
public org.eclipse.swt.graphics.Image getDisabledImage()- Overrides:
getDisabledImagein classImageControl<S extends ThemeSkin>- Returns:
- the disabledImage
-
setImage
public void setImage(org.eclipse.swt.graphics.Image image, org.eclipse.swt.graphics.Image compactImage) -
setDisabledImage
public void setDisabledImage(org.eclipse.swt.graphics.Image disabledImage) Description copied from class:ImageControlSets the disabled image.- Overrides:
setDisabledImagein classImageControl<S extends ThemeSkin>- Parameters:
disabledImage- the new disabled image.
-
setDisabledImage
public void setDisabledImage(org.eclipse.swt.graphics.Image disabledImage, org.eclipse.swt.graphics.Image compactDisabledImage) -
dispose
public void dispose()- Specified by:
disposein interfaceILightControl- Overrides:
disposein classImageControl<S extends ThemeSkin>
-
paint
public void paint(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle rectangle) - Specified by:
paintin interfaceILightControl- Overrides:
paintin classImageControl<S extends ThemeSkin>
-
setTheme
- Specified by:
setThemein interfaceIViewControl<S extends ThemeSkin>- Overrides:
setThemein classAbstractViewControl<S extends ThemeSkin>
-
handleEvent
public void handleEvent(org.eclipse.swt.widgets.Event event) - Specified by:
handleEventin interfaceILightControl- Overrides:
handleEventin classRectangleControl<S extends ThemeSkin>
-
isHot
protected boolean isHot()- Returns:
trueif the mouse pointer is under this control.
-
getPaintingImage
protected org.eclipse.swt.graphics.Image getPaintingImage(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle rectangle) Description copied from class:ImageControlInvoked byImageControl.paint(GC, Rectangle)method to obtain current image to draw.- Overrides:
getPaintingImagein classImageControl<S extends ThemeSkin>- Returns:
-
getImageRegistry
protected org.eclipse.jface.resource.ImageRegistry getImageRegistry()
-