Class LightImageButton

  • All Implemented Interfaces:

    public class LightImageButton
    extends LightImage
    Light image button – a button with an image.
    • Constructor Detail

      • LightImageButton

        public LightImageButton()
    • 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.
        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.
        highlightMargins - the margins to set, should not be null.
      • getHighlightMargins

        public LightMargins getHighlightMargins()
        Returns the button highlight margins.
        the button highlight margins, cannot be null.
      • addClickListener

        public void addClickListener​(IClickListener<LightImageButton> listener)
        Adds the click listener.
        listener - the listener.
      • removeClickListener

        public void removeClickListener​(IClickListener<LightImageButton> listener)
        Removes the click listener.
        listener - the listener.
      • paint

        public void paint​( gc,
        Description copied from interface: ILightControl
        Paints the given rectangle of this control.
        Specified by:
        paint in interface ILightControl
        paint in class LightImage
        gc - the GC to paint on.
        rectangle - the rectangle to paint.