Class LightPopup

java.lang.Object
com._1c.g5.lwt.interop.LightPopup

public class LightPopup extends Object
Provides pop-up window to host the light controls in it.
  • Constructor Summary

    Constructors
    Constructor
    Description
    Instantiates a new light pop-up.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Closes this pop-up.
    void
    Closes the popup asynchronously to prevent traversal event propagation (SWT bug workaround)
    boolean
     
    boolean
    Checks if this pop-up is visible or not.
    void
    pack(boolean horizontal, boolean vertical)
    Adapts the popup size to its content.
    void
    revealRectangle(org.eclipse.swt.graphics.Rectangle rectangle)
    Reveals the given rectangle in this pop-up.
    void
    scrollVertically(int delta)
    Scrolls this pop-up vertically by the given delta.
    void
    setBackgroundColor(org.eclipse.swt.graphics.Color backgroundColor)
    Sets the background color of this pop-up.
    void
    setBorderColor(org.eclipse.swt.graphics.Color borderColor)
    Sets the border color of this pop-up.
    void
    show(ILightControl control, int maxHeight, org.eclipse.swt.graphics.Rectangle initialVisibleRectangle)
    Shows the pop-up for the given control.
    void
    show(ILightControl control, int maxHeight, org.eclipse.swt.graphics.Rectangle initialVisibleRectangle, boolean setFocus)
    Shows the pop-up for the given control.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Constructor Details

    • LightPopup

      public LightPopup(ILightControl source)
      Instantiates a new light pop-up.
      Parameters:
      source - the control to which the popup will be attached
  • Method Details

    • show

      public void show(ILightControl control, int maxHeight, org.eclipse.swt.graphics.Rectangle initialVisibleRectangle)
      Shows the pop-up for the given control.
      Parameters:
      control - the control to display inside the pop-up
      maxHeight - the maximum pop-up height
      initialVisibleRectangle - initial visible rectangle of this pop-up, may be null for default visible rectangle
    • show

      public void show(ILightControl control, int maxHeight, org.eclipse.swt.graphics.Rectangle initialVisibleRectangle, boolean setFocus)
      Shows the pop-up for the given control.
      Parameters:
      control - the control to display inside the pop-up
      maxHeight - the maximum pop-up height
      initialVisibleRectangle - initial visible rectangle of this pop-up, may be null for default visible rectangle
      setFocus - - true if popup should be focused.
    • pack

      public void pack(boolean horizontal, boolean vertical)
      Adapts the popup size to its content.
      Parameters:
      horizontal - NOT SUPPORTED yet
      vertical - if true, the height of the popup will be recalculated
    • close

      public void close()
      Closes this pop-up.
    • closeAsync

      public void closeAsync()
      Closes the popup asynchronously to prevent traversal event propagation (SWT bug workaround)
    • setBackgroundColor

      public void setBackgroundColor(org.eclipse.swt.graphics.Color backgroundColor)
      Sets the background color of this pop-up.
      Parameters:
      backgroundColor - the new background color.
    • setBorderColor

      public void setBorderColor(org.eclipse.swt.graphics.Color borderColor)
      Sets the border color of this pop-up.
      Parameters:
      borderColor - the new border color.
    • isVisible

      public boolean isVisible()
      Checks if this pop-up is visible or not.
      Returns:
      true if this pop-up is visible, false if not.
    • scrollVertically

      public void scrollVertically(int delta)
      Scrolls this pop-up vertically by the given delta.
      Parameters:
      delta - the delta to scroll by.
    • revealRectangle

      public void revealRectangle(org.eclipse.swt.graphics.Rectangle rectangle)
      Reveals the given rectangle in this pop-up.
      Parameters:
      rectangle - the rectangle to reveal.
    • isFocused

      public boolean isFocused()
      Returns:
      true if the popup is focused