Class LightImage

    • Constructor Detail

      • LightImage

        public LightImage()
    • Method Detail

      • getImage

        public getImage()
        Gets the displayed image.
        the image or null if no image assigned.
      • setImage

        public void setImage​( image)
        Sets the image to display.
        image - the new image.
      • setDisabledImage

        public void setDisabledImage​( disabledImage)
        Sets the disabled image.
        disabledImage - the new disabled image.
      • getDisabledImage

        public getDisabledImage()
        Returns disabled image.
        disabled image, can return null.
      • setImageOffset

        public void setImageOffset​( imageOffset)
        Sets the image offset from the control center. Use it to fine-tune the image position inside this control.
        imageOffset - the image offset to set, should not be null.
      • getImageOffset

        public getImageOffset()
        Returns image offset.
        image offset, cannot return null.
      • setMargins

        public void setMargins​( margins)
        Sets the image horizontal and the vertical margins. Use it to fine-tune this control size.
        margins - the margins to set, should not be null.
      • computeSize

        public computeSize​( gc,
                                                          int width,
                                                          int height,
                                                          boolean flushCache)
        Description copied from interface: ILightControl
        Computes the size of this control.
        Specified by:
        computeSize in interface ILightControl
        computeSize in class AbstractLightControl
        gc - the GC to do measurements with.
        width - the width hint, SWT.DEFAULT to compute the preferred width.
        height - the height hint, SWT.DEFAULT to compute the preferred height.
        flushCache - the flush cache flag, instructs the associated layout to reset all its caches, if any.
        the computed size.
      • paint

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