Class AbstractLightControl

    • Constructor Detail

      • AbstractLightControl

        public AbstractLightControl()
    • Method Detail

      • getParent

        public ILightComposite getParent()
        Description copied from interface: ILightControl
        Gets the parent of this control.
        Specified by:
        getParent in interface ILightControl
        Returns:
        the parent composite control or null if this control is not contained in any composite.
      • getBounds

        public org.eclipse.swt.graphics.Rectangle getBounds()
        Description copied from interface: ILightControl
        Gets the bounds of this control.
        Specified by:
        getBounds in interface ILightControl
        Returns:
        the bounds.
      • setBounds

        public void setBounds​(org.eclipse.swt.graphics.Rectangle bounds)
        Description copied from interface: ILightControl
        Sets the bounds of this control.
        Specified by:
        setBounds in interface ILightControl
        Parameters:
        bounds - the new bounds.
      • invalidate

        public void invalidate()
        Description copied from interface: ILightControl
        Invalidates the bounds of this control.
        Specified by:
        invalidate in interface ILightControl
      • invalidate

        public void invalidate​(org.eclipse.swt.graphics.Rectangle rectangle)
        Description copied from interface: ILightControl
        Invalidates the given rectangle of this control.
        Specified by:
        invalidate in interface ILightControl
        Parameters:
        rectangle - the rectangle to invalidate.
      • 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
        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.
      • isVisible

        public boolean isVisible()
        Description copied from interface: ILightControl
        Checks if this control is visible.
        Specified by:
        isVisible in interface ILightControl
        Returns:
        true if this control is visible, false if not.
      • setVisible

        public void setVisible​(boolean value)
        Description copied from interface: ILightControl
        Sets this control visibility.
        Specified by:
        setVisible in interface ILightControl
        Parameters:
        value - the new visibility value.
      • isEnabled

        public boolean isEnabled()
        Description copied from interface: ILightControl
        Checks if this is enabled.
        Specified by:
        isEnabled in interface ILightControl
        Returns:
        true if this control is enabled, false if not.
      • setEnabled

        public void setEnabled​(boolean enabled)
        Description copied from interface: ILightControl
        Sets this control enablement.
        Specified by:
        setEnabled in interface ILightControl
      • setFocus

        public boolean setFocus​(FocusSource focusSource)
        Description copied from interface: ILightControl
        Sets the focus to this control.
        Specified by:
        setFocus in interface ILightControl
        Parameters:
        focusSource - the focus request source.
        Returns:
        true if focus was set, false otherwise.
      • isFocused

        public boolean isFocused()
        Description copied from interface: ILightControl
        Checks if this control is focused.
        Specified by:
        isFocused in interface ILightControl
        Returns:
        true if this control is focused, false otherwise.
      • isDisposed

        public boolean isDisposed()
        Description copied from interface: ILightControl
        Checks if control this is disposed.
        Specified by:
        isDisposed in interface ILightControl
        Returns:
        true if this control is disposed, false otherwise.
      • getData

        public Object getData​(String key)
        Description copied from interface: ILightControl
        Gets the user defined data associated with this control.
        Specified by:
        getData in interface ILightControl
        Parameters:
        key - the key.
        Returns:
        the data or null if no data was set for the given key.
      • setData

        public void setData​(String key,
                            Object data)
        Description copied from interface: ILightControl
        Sets the user-defined data associated with this control.
        Specified by:
        setData in interface ILightControl
        Parameters:
        key - the key.
        data - the data.
      • getCursor

        public org.eclipse.swt.graphics.Cursor getCursor()
        Description copied from interface: ILightControl
        Gets the cursor of this control.
        Specified by:
        getCursor in interface ILightControl
        Returns:
        the cursor or null if no cursor was set.
      • setCursor

        public void setCursor​(org.eclipse.swt.graphics.Cursor cursor)
        Description copied from interface: ILightControl
        Sets the cursor of this control.
        Specified by:
        setCursor in interface ILightControl
        Parameters:
        cursor - the new cursor or null to reset to default cursor.
      • getTooltip

        public String getTooltip()
        Description copied from interface: ILightControl
        Gets the tooltip of this control.
        Specified by:
        getTooltip in interface ILightControl
        Returns:
        the tooltip or null if no tooltip was set.
      • setTooltip

        public void setTooltip​(String tooltip)
        Description copied from interface: ILightControl
        Sets the tooltip of this control.
        Specified by:
        setTooltip in interface ILightControl
        Parameters:
        tooltip - the new tooltip or null to clear the tooltip.
      • setFocusable

        protected void setFocusable​(boolean value)
        Sets the focusable flag for this control. If control is focusable it may receive focus on mouse and keyboard activity.
        Parameters:
        value - the new focusable.