Class LightLabel

    • Constructor Detail

      • LightLabel

        public LightLabel()
    • Method Detail

      • addTextChangedListener

        public void addTextChangedListener​(IChangedListener<LightLabel,​String> listener)
        Adds the text changed listener.
        Parameters:
        listener - the listener.
      • removeTextChangedListener

        public void removeTextChangedListener​(IChangedListener<LightLabel,​String> listener)
        Removes the text changed listener.
        Parameters:
        listener - the listener.
      • getText

        public String getText()
        Gets the display text.
        Returns:
        text the display text.
      • setText

        public void setText​(String text)
        Sets the text to display.
        Parameters:
        text - the new text.
      • setFont

        public void setFont​(org.eclipse.swt.graphics.Font font)
      • setMargins

        public void setMargins​(LightMargins margins)
      • setTextColor

        public void setTextColor​(org.eclipse.swt.graphics.Color textColor)
      • 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.
        Parameters:
        gc - the GC to paint on.
        rectangle - the rectangle to paint.
      • computeSize

        public org.eclipse.swt.graphics.Point computeSize​(org.eclipse.swt.graphics.GC gc,
                                                          int width,
                                                          int height,
                                                          boolean flushCache)
        Description copied from interface: ILightControl
        Computes the size of this control.
        Specified by:
        computeSize in interface ILightControl
        Overrides:
        computeSize in class AbstractLightControl
        Parameters:
        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.
        Returns:
        the computed size.