Package com._1c.g5.lwt.interop
Class LightPopup
java.lang.Object
com._1c.g5.lwt.interop.LightPopup
Provides pop-up window to host the light controls in it.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidclose()Closes this pop-up.voidCloses the popup asynchronously to prevent traversal event propagation (SWT bug workaround)booleanbooleanChecks if this pop-up is visible or not.voidpack(boolean horizontal, boolean vertical) Adapts the popup size to its content.voidrevealRectangle(org.eclipse.swt.graphics.Rectangle rectangle) Reveals the given rectangle in this pop-up.voidscrollVertically(int delta) Scrolls this pop-up vertically by the given delta.voidsetBackgroundColor(org.eclipse.swt.graphics.Color backgroundColor) Sets the background color of this pop-up.voidsetBorderColor(org.eclipse.swt.graphics.Color borderColor) Sets the border color of this pop-up.voidshow(ILightControl control, int maxHeight, org.eclipse.swt.graphics.Rectangle initialVisibleRectangle) Shows the pop-up for the given control.voidshow(ILightControl control, int maxHeight, org.eclipse.swt.graphics.Rectangle initialVisibleRectangle, boolean setFocus) Shows the pop-up for the given control.
-
Constructor Details
-
LightPopup
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-upmaxHeight- the maximum pop-up heightinitialVisibleRectangle- initial visible rectangle of this pop-up, may benullfor 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-upmaxHeight- the maximum pop-up heightinitialVisibleRectangle- initial visible rectangle of this pop-up, may benullfor default visible rectanglesetFocus- - 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 yetvertical- iftrue, 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:
trueif this pop-up is visible,falseif 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:
trueif the popup is focused
-