Package com._1c.g5.lwt.controls
Class LightImageButton
- java.lang.Object
-
- com._1c.g5.lwt.AbstractLightControl
-
- com._1c.g5.lwt.controls.LightImage
-
- com._1c.g5.lwt.controls.LightImageButton
-
- All Implemented Interfaces:
ILightControl
public class LightImageButton extends LightImage
Light image button – a button with an image.
-
-
Constructor Summary
Constructors Constructor Description LightImageButton()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addClickListener(IClickListener<LightImageButton> listener)
Adds the click listener.LightMargins
getHighlightMargins()
Returns the button highlight margins.void
handleEvent(org.eclipse.swt.widgets.Event event)
Handles the SWT event, SWT events are pumped to this method if this control is active.void
paint(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle rectangle)
Paints the given rectangle of this control.void
removeClickListener(IClickListener<LightImageButton> listener)
Removes the click listener.void
setAutoRepeat(boolean autoRepeat)
Turns the auto-repeat on or off.void
setHighlightMargins(LightMargins highlightMargins)
Sets the button highlight margins.-
Methods inherited from class com._1c.g5.lwt.controls.LightImage
computeSize, dispose, getDisabledImage, getImage, getImageOffset, setDisabledImage, setImage, setImageOffset, setMargins
-
Methods 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, setVisible
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com._1c.g5.lwt.ILightControl
initialize
-
-
-
-
Method Detail
-
setAutoRepeat
public void setAutoRepeat(boolean autoRepeat)
Turns the auto-repeat on or off. If auto-repeat is turned on the button will trigger click events while user holds the mouse button down.- Parameters:
autoRepeat
- the auto-repeat value to set,true
to turn the auto-repeat mode on,false
to turn it off.
-
setHighlightMargins
public void setHighlightMargins(LightMargins highlightMargins)
Sets the button highlight margins. Use it to fine-tune this button hover highlight rectangle.- Parameters:
highlightMargins
- the margins to set, should not benull
.
-
getHighlightMargins
public LightMargins getHighlightMargins()
Returns the button highlight margins.- Returns:
- the button highlight margins, cannot be
null
.
-
addClickListener
public void addClickListener(IClickListener<LightImageButton> listener)
Adds the click listener.- Parameters:
listener
- the listener.
-
removeClickListener
public void removeClickListener(IClickListener<LightImageButton> listener)
Removes the click listener.- Parameters:
listener
- the listener.
-
paint
public void paint(org.eclipse.swt.graphics.GC gc, org.eclipse.swt.graphics.Rectangle rectangle)
Description copied from interface:ILightControl
Paints the given rectangle of this control.- Specified by:
paint
in interfaceILightControl
- Overrides:
paint
in classLightImage
- Parameters:
gc
- theGC
to paint on.rectangle
- the rectangle to paint.
-
handleEvent
public void handleEvent(org.eclipse.swt.widgets.Event event)
Description copied from interface:ILightControl
Handles the SWT event, SWT events are pumped to this method if this control is active.- Specified by:
handleEvent
in interfaceILightControl
- Overrides:
handleEvent
in classAbstractLightControl
- Parameters:
event
- the event to handle.- See Also:
ILightComposite.setActiveControl(ILightControl)
-
-