Package com._1c.g5.lwt
Interface ILightComposite
-
- All Superinterfaces:
ILightControl
- All Known Implementing Classes:
AbstractLightContentComposite
,AbstractLightScrollbar
,AbstractLightSpinner
,BigDecimalLightSpinner
,DoubleLightSpinner
,LightColorBoxEditorBar
,LightCombo
,LightComposite
,LightEditorBar
,LightScrolledContentComposite
,LightSpinner
,LightTextEditorBar
,LightUpDownButton
,LongLightSpinner
,SwtLightComposite
,SwtLightScrolledComposite
public interface ILightComposite extends ILightControl
Public contract of the light composite controls.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description <T extends ILightControl>
TaddChild(T control)
Adds the child control to this composite.<T extends ILightControl>
TaddChild(T control, int index)
Adds the child control to this composite.<T extends ILightControl>
TaddChildAfter(T control, ILightControl sibling)
Adds the child control to this composite after the given sibling.void
addLayerAbove(ILightComposite layer, ILightComposite sibling)
void
addLayerBehind(ILightComposite layer, ILightComposite sibling)
ILightControl
controlFromPoint(int x, int y)
Finds the control under the given point.ILightControl
getActiveControl()
Gets the active child control of this composite.int
getChildCount()
Gets the child count.Iterable<ILightControl>
getChildren()
Gets the children.Iterable<ILightComposite>
getLayers()
ILightLayout
getLayout()
Gets the layout of this composite.default ILightComposite
getMainLayer()
void
layout(org.eclipse.swt.graphics.GC gc)
Layouts this composite using its layout, if any.ILightControl
removeChild(int index)
void
removeChild(ILightControl control)
Removes the child control.void
revealRectangle(org.eclipse.swt.graphics.Rectangle rectangle, boolean partial, boolean recursive)
void
setActiveControl(ILightControl control)
Sets the active control for this composite.void
setLayout(ILightLayout layout)
Sets the layout of this composite.org.eclipse.swt.graphics.Point
translatePointFromControl(ILightControl control, org.eclipse.swt.graphics.Point point)
Translate the point in the given child control coordinates to the coordinates of this composite.org.eclipse.swt.graphics.Point
translatePointToControl(ILightControl control, org.eclipse.swt.graphics.Point point)
Translate the point in the coordinates of this composite to the coordinates of the given child control.org.eclipse.swt.graphics.Rectangle
translateRectangleFromControl(ILightControl control, org.eclipse.swt.graphics.Rectangle rectangle)
Translate the rectangle in the given child control coordinates to the coordinates of this composite.org.eclipse.swt.graphics.Rectangle
translateRectangleToControl(ILightControl control, org.eclipse.swt.graphics.Rectangle rectangle)
Translate the rectangle in the coordinates of this composite to the coordinates of the given child control.boolean
traverse(ILightControl control, TraverseDirection direction)
Traverses this composite starting at the given control in the given direction.boolean
traverse(TraverseDirection direction)
Traverses this composite in the given direction.-
Methods inherited from interface com._1c.g5.lwt.ILightControl
addControlListener, computeSize, dispose, getBounds, getCursor, getData, getLayoutData, getParent, getTooltip, getVisibleBounds, handleEvent, initialize, invalidate, invalidate, isDisposed, isEnabled, isFocused, isVisible, paint, removeControlListener, setBounds, setCursor, setData, setEnabled, setFocus, setLayoutData, setParent, setTooltip, setVisible
-
-
-
-
Method Detail
-
getChildCount
int getChildCount()
Gets the child count.- Returns:
- the number of direct children of this composite.
-
getChildren
Iterable<ILightControl> getChildren()
Gets the children.- Returns:
- the direct children of this composite.
-
addChild
<T extends ILightControl> T addChild(T control)
Adds the child control to this composite.- Parameters:
control
- the control to add.- Returns:
- the control added.
-
addChild
<T extends ILightControl> T addChild(T control, int index)
Adds the child control to this composite.- Parameters:
control
- the control to add.index
- the index to add the control at.- Returns:
- the control added.
-
addChildAfter
<T extends ILightControl> T addChildAfter(T control, ILightControl sibling)
Adds the child control to this composite after the given sibling.- Parameters:
control
- the control to add.sibling
- the sibling to add the control after,null
to prepend the control to the children.- Returns:
- the control added.
-
removeChild
void removeChild(ILightControl control)
Removes the child control.- Parameters:
control
- the control to remove.
-
removeChild
ILightControl removeChild(int index)
-
setActiveControl
void setActiveControl(ILightControl control)
Sets the active control for this composite. The given control may be the indirect child of this composite. This composite should not try to change the focus as the focus may be already set.- Parameters:
control
- the new active control.
-
getActiveControl
ILightControl getActiveControl()
Gets the active child control of this composite.- Returns:
- the active control.
- See Also:
setActiveControl(com._1c.g5.lwt.ILightControl)
-
traverse
boolean traverse(TraverseDirection direction)
Traverses this composite in the given direction.- Parameters:
direction
- the direction to traverse in.- Returns:
true
if traversal was successful and the focus was set to one of the child controls,false
otherwise.
-
traverse
boolean traverse(ILightControl control, TraverseDirection direction)
Traverses this composite starting at the given control in the given direction.- Parameters:
control
- the control to start from.direction
- the direction to traverse in.- Returns:
true
if traversal was successful and the focus was set to one of the child controls,false
otherwise.
-
getLayout
ILightLayout getLayout()
Gets the layout of this composite.- Returns:
- the associated layout or
null
if no layout is set.
-
setLayout
void setLayout(ILightLayout layout)
Sets the layout of this composite.- Parameters:
layout
- the new layout.
-
layout
void layout(org.eclipse.swt.graphics.GC gc)
Layouts this composite using its layout, if any.- Parameters:
gc
- theGC
to do the measurements with.
-
controlFromPoint
ILightControl controlFromPoint(int x, int y)
Finds the control under the given point.- Parameters:
x
- the x coordinate of the point.y
- the y coordinate of the point.- Returns:
- found child control, this composite or
null
if nothing found under the point and this composite is transparent for the mouse events.
-
translatePointFromControl
org.eclipse.swt.graphics.Point translatePointFromControl(ILightControl control, org.eclipse.swt.graphics.Point point)
Translate the point in the given child control coordinates to the coordinates of this composite.- Parameters:
control
- the child control to translate the point from or this composite.point
- the point to translate.- Returns:
- the translated point or
null
if the given child control is neither a child of this composite nor this composite.
-
translateRectangleFromControl
org.eclipse.swt.graphics.Rectangle translateRectangleFromControl(ILightControl control, org.eclipse.swt.graphics.Rectangle rectangle)
Translate the rectangle in the given child control coordinates to the coordinates of this composite.- Parameters:
control
- the child to translate the rectangle from or this composite.rectangle
- the rectangle to translate.- Returns:
- the translated rectangle or
null
if the given child is neither a child of this composite nor this composite.
-
translatePointToControl
org.eclipse.swt.graphics.Point translatePointToControl(ILightControl control, org.eclipse.swt.graphics.Point point)
Translate the point in the coordinates of this composite to the coordinates of the given child control.- Parameters:
control
- the child to translate the point to or this composite.point
- the point to translate.- Returns:
- the translated point or
null
if the given child is neither a child of this composite nor this composite.
-
translateRectangleToControl
org.eclipse.swt.graphics.Rectangle translateRectangleToControl(ILightControl control, org.eclipse.swt.graphics.Rectangle rectangle)
Translate the rectangle in the coordinates of this composite to the coordinates of the given child control.- Parameters:
control
- the child to translate the point to or this composite.rectangle
- the rectangle to translate.- Returns:
- the translated rectangle or
null
if the given child is neither a child of this composite nor this composite.
-
getMainLayer
default ILightComposite getMainLayer()
-
getLayers
Iterable<ILightComposite> getLayers()
-
addLayerAbove
void addLayerAbove(ILightComposite layer, ILightComposite sibling)
-
addLayerBehind
void addLayerBehind(ILightComposite layer, ILightComposite sibling)
-
revealRectangle
void revealRectangle(org.eclipse.swt.graphics.Rectangle rectangle, boolean partial, boolean recursive)
-
-