Class ButtonControlBase<S extends ThemeSkin & ISkinElementWithTextColor>
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.desktop.ButtonControlBase<S>
- All Implemented Interfaces:
ILightComposite,ILightControl,IReadOnlyControl,IZoomableControl,IViewControl<S>
- Direct Known Subclasses:
CommandPanelButtonControl,FormButtonControl,MenuButtonControl
public abstract class ButtonControlBase<S extends ThemeSkin & ISkinElementWithTextColor>
extends AbstractCustomizationControl<S>
implements ILightComposite, IZoomableControl
The base form button control.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected LightCompositeprotected org.eclipse.swt.graphics.Imageprotected booleanprotected booleanprotected booleanprotected ButtonShapeRepresentationprotected String -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription<T extends ILightControl>
TaddChild(T control) <T extends ILightControl>
TaddChild(T control, int index) <T extends ILightControl>
TaddChildAfter(T control, ILightControl sibling) voidaddLayerAbove(ILightComposite layer, ILightComposite sibling) voidaddLayerBehind(ILightComposite layer, ILightComposite sibling) controlFromPoint(int x, int y) voiddispose()protected abstract IButtonViewUIintprotected PresentationFontReturns scaled presentation font.protected abstract ButtonStateUIgetState()voidhandleEvent(org.eclipse.swt.widgets.Event event) voidlayout(org.eclipse.swt.graphics.GC gc) voidpaint(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle rectangle) removeChild(int index) voidremoveChild(ILightControl control) voidrevealRectangle(org.eclipse.swt.graphics.Rectangle rectangle, boolean partial, boolean recursive) voidsetActiveControl(ILightControl control) voidsetDefault(boolean flag) voidsetDropDown(boolean flag) voidsetImage(PresentationImage image) voidsetLayout(ILightLayout layout) voidsetShapeRepresentation(ButtonShapeRepresentation shapeRepresentation) Sets the shape representation.voidsetTheme(IPresentationTheme theme, S skin) voidorg.eclipse.swt.graphics.PointtranslatePointFromControl(ILightControl control, org.eclipse.swt.graphics.Point point) org.eclipse.swt.graphics.PointtranslatePointToControl(ILightControl control, org.eclipse.swt.graphics.Point point) org.eclipse.swt.graphics.RectangletranslateRectangleFromControl(ILightControl control, org.eclipse.swt.graphics.Rectangle rectangle) org.eclipse.swt.graphics.RectangletranslateRectangleToControl(ILightControl control, org.eclipse.swt.graphics.Rectangle rectangle) booleantraverse(ILightControl control, TraverseDirection direction) booleantraverse(TraverseDirection direction) Methods 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, computeSize, 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.ILightComposite
getMainLayerMethods inherited from interface com._1c.g5.lwt.ILightControl
addControlListener, computeSize, 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
isReadOnly
-
Field Details
-
image
protected org.eclipse.swt.graphics.Image image -
isDefault
protected boolean isDefault -
title
-
isHoverState
protected boolean isHoverState -
isDropDown
protected boolean isDropDown -
dropDownComposite
-
shapeRepresentation
-
-
Constructor Details
-
ButtonControlBase
protected ButtonControlBase()
-
-
Method Details
-
setShapeRepresentation
Sets the shape representation.- Parameters:
shapeRepresentation- the shapeRepresentation to set
-
setTitle
-
setDefault
public void setDefault(boolean flag) -
setDropDown
public void setDropDown(boolean flag) -
setImage
-
handleEvent
public void handleEvent(org.eclipse.swt.widgets.Event event) - Specified by:
handleEventin interfaceILightControl- Overrides:
handleEventin classAbstractLightControl
-
setTheme
- Specified by:
setThemein interfaceIViewControl<S extends ThemeSkin & ISkinElementWithTextColor>- Overrides:
setThemein classAbstractViewControl<S extends ThemeSkin & ISkinElementWithTextColor>
-
paint
public void paint(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle rectangle) - Specified by:
paintin interfaceILightControl
-
dispose
public void dispose()- Specified by:
disposein interfaceILightControl- Overrides:
disposein classAbstractCustomizationControl<S extends ThemeSkin & ISkinElementWithTextColor>
-
getState
-
getButtonView
-
getChildCount
public int getChildCount()- Specified by:
getChildCountin interfaceILightComposite
-
getChildren
- Specified by:
getChildrenin interfaceILightComposite
-
addChild
- Specified by:
addChildin interfaceILightComposite
-
addChild
- Specified by:
addChildin interfaceILightComposite
-
addChildAfter
- Specified by:
addChildAfterin interfaceILightComposite
-
removeChild
- Specified by:
removeChildin interfaceILightComposite
-
removeChild
- Specified by:
removeChildin interfaceILightComposite
-
setActiveControl
- Specified by:
setActiveControlin interfaceILightComposite
-
getActiveControl
- Specified by:
getActiveControlin interfaceILightComposite
-
traverse
- Specified by:
traversein interfaceILightComposite
-
traverse
- Specified by:
traversein interfaceILightComposite
-
getLayout
- Specified by:
getLayoutin interfaceILightComposite
-
setLayout
- Specified by:
setLayoutin interfaceILightComposite
-
layout
public void layout(org.eclipse.swt.graphics.GC gc) - Specified by:
layoutin interfaceILightComposite
-
controlFromPoint
- Specified by:
controlFromPointin interfaceILightComposite
-
translatePointFromControl
public org.eclipse.swt.graphics.Point translatePointFromControl(ILightControl control, org.eclipse.swt.graphics.Point point) - Specified by:
translatePointFromControlin interfaceILightComposite
-
translateRectangleFromControl
public org.eclipse.swt.graphics.Rectangle translateRectangleFromControl(ILightControl control, org.eclipse.swt.graphics.Rectangle rectangle) - Specified by:
translateRectangleFromControlin interfaceILightComposite
-
translatePointToControl
public org.eclipse.swt.graphics.Point translatePointToControl(ILightControl control, org.eclipse.swt.graphics.Point point) - Specified by:
translatePointToControlin interfaceILightComposite
-
translateRectangleToControl
public org.eclipse.swt.graphics.Rectangle translateRectangleToControl(ILightControl control, org.eclipse.swt.graphics.Rectangle rectangle) - Specified by:
translateRectangleToControlin interfaceILightComposite
-
getLayers
- Specified by:
getLayersin interfaceILightComposite
-
addLayerAbove
- Specified by:
addLayerAbovein interfaceILightComposite
-
addLayerBehind
- Specified by:
addLayerBehindin interfaceILightComposite
-
revealRectangle
public void revealRectangle(org.eclipse.swt.graphics.Rectangle rectangle, boolean partial, boolean recursive) - Specified by:
revealRectanglein interfaceILightComposite
-
getScaledSkinFont
Returns scaled presentation font.- Returns:
- scaled font, cannot be
null
-