Note
The NO_BACKGROUND, NO_FOCUS, NO_MERGE_PAINTS,
and NO_REDRAW_RESIZE styles are intended for use with Canvas.
They can be used with Composite if you are drawing your own, but their
behavior is undefined if they are used with subclasses of Composite other
than Canvas.
Note
The CENTER style, although undefined for composites, has the
same value as EMBEDDED which is used to embed widgets from other
widget toolkits into SWT. On some operating systems (GTK), this may cause
the children of this composite to be obscured.
This class may be subclassed by custom control implementors who are building controls that are constructed from aggregates of other controls.
Canvas, Composite snippets, Sample code and further information
| Modifier and Type | Field and Description |
|---|---|
| pack-priv int | |
| pack-priv HashMap | childrenLowered
A HashMap of child widgets that keeps track of which child has had their GdkWindow lowered/raised. |
| public long | embeddedHandle
the handle to the OS resource (Warning: This field is platform dependent) Important Note This field is not part of the SWT public API. |
| pack-priv long | fixClipHandle
When this field is set, it indicates that a child widget of this Composite needs to have its clip set to its allocation. |
| pack-priv Map | fixClipMap
If fixClipHandle is set, then the fixClipMap HashMap contains children of fixClipHandle that also need to have their clips adjusted. |
| pack-priv long | |
| pack-priv Layout | |
| pack-priv int | |
| pack-priv static final String | |
| pack-priv boolean | noChildDrawing
If set to |
| pack-priv Shell | |
| pack-priv long | |
| pack-priv Control[] |
| Access | Constructor and Description |
|---|---|
| pack-priv | |
| public |
| Modifier and Type | Method and Description |
|---|---|
| pack-priv Control[] | |
| pack-priv Control[] | |
| pack-priv void | adjustChildClipping(long
the handle to the widget widget)Overrides org. |
| pack-priv int | |
| public void | changed(Control[]
an array of controls that changed state and require a recalculation of size changed)
Deprecated
use
Clears any data that has been cached by a Layout for all widgets that
are in the parent hierarchy of the changed control up to and including the
receiver.
Composite#layout(Control[], int) instead
|
| pack-priv void | |
| pack-priv static int | |
| protected void | checkSubclass()
Overrides org. |
| pack-priv boolean | |
| pack-priv Point | computeSizeInPixels(int wHint, int hHint, boolean changed)
Overrides org. |
| pack-priv Widget[] | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public void | drawBackground(GC
the gc where the rectangle is to be filled gc, int the x coordinate of the rectangle to be filled x, int the y coordinate of the rectangle to be filled y, int the width of the rectangle to be filled width, int the height of the rectangle to be filled height, int the image background x offset offsetX, int the image background y offset offsetY)Fills the interior of the rectangle specified by the arguments, with the receiver's background. |
| pack-priv void | |
| pack-priv void | |
| pack-priv Composite | |
| pack-priv Menu[] | |
| pack-priv void | fixChildren(Shell newShell, Shell oldShell, Decorations newDecorations, Decorations oldDecorations, Menu[] menus)
Overrides org. |
| pack-priv void | fixClippings()
Iterates though the array of child widgets that need to have their clips adjusted, and calls Control.adjustChildClipping() on it. |
| pack-priv void | |
| pack-priv void | fixParentGdkResource()
Overrides org. |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv long | |
| pack-priv boolean | |
| public int | |
| public Control[] | Returns: an array of childrenReturns a (possibly empty) array containing the receiver's children. |
| pack-priv int | |
| pack-priv Rectangle | |
| public Layout | Returns: the receiver's layout or nullReturns layout which is associated with the receiver, or null if one has not been set. |
| public boolean | Returns: the receiver's deferred layout stateReturns |
| public Control[] | Returns: tabList the ordered list of controls representing the tab orderGets the (possibly empty) tabbing order for the control. |
| pack-priv boolean | gtk4_key_press_event(long
the corresponding controller responsible for capturing the event controller, int the pressed key keyval, int raw code of the pressed key keycode, int the bitmask, representing the state of the modifier keys and pointer buttons state, long the GdkEvent captured event)Overrides org. |
| pack-priv long | gtk_button_press_event(long widget, long event)
Overrides org. |
| pack-priv long | |
| pack-priv long | |
| pack-priv long | gtk_focus_in_event(long widget, long event)
Overrides org. |
| pack-priv long | gtk_focus_out_event(long widget, long event)
Overrides org. |
| pack-priv long | gtk_key_press_event(long widget, long event)
Overrides org. |
| pack-priv long | |
| pack-priv long | |
| pack-priv long | gtk_scroll_child(long widget, long scrollType, long horizontal)
|
| pack-priv long | |
| pack-priv boolean | |
| pack-priv void | |
| pack-priv boolean | |
| pack-priv long | |
| public boolean | Returns: the receiver's deferred layout stateReturns |
| pack-priv boolean | |
| public void | layout()
If the receiver has a layout, asks the layout to lay out (that is, set the size and location of) the receiver's children. |
| public void | layout(boolean
true if the layout must flush its caches, and false otherwiseIf the receiver has a layout, asks the layout to lay out (that is, set the size and location of) the receiver's children. |
| public void | layout(boolean
true if the layout must flush its caches, and false otherwisetrue if all children in the receiver's widget tree should be laid out, and false otherwiseIf the receiver has a layout, asks the layout to lay out (that is, set the size and location of) the receiver's children. |
| public void | |
| public void | layout(Control[]
a control that has had a state change which requires a recalculation of its size changed, int the flags specifying how the layout should happen flags)Forces a lay out (that is, sets the size and location) of all widgets that are in the parent hierarchy of the changed control up to and including the receiver. |
| pack-priv void | |
| pack-priv Point | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv boolean | mustBeVisibleOnInitBounds()
Overrides org. true if the widget must be visible during call to
setInitialBounds().
|
| pack-priv long | |
| pack-priv void | printWidget(GC gc, long drawable, int depth, int x, int y)
Overrides org. |
| pack-priv void | propagateDraw(long
the parent container, i.e. fixedHandle container, long the cairo context provided by GTK cairo)Propagates draw events from a parent container to its children using gtk_container_propagate_draw(). |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| pack-priv void | |
| public void | setBackgroundMode(int
the new background mode mode)Sets the background drawing mode to the argument which should
be one of the following constants defined in class |
| pack-priv int | setBounds(int x, int y, int width, int height, boolean move, boolean resize)
Overrides org. |
| public boolean | setFocus()
Overrides org. |
| public void | |
| public void | setLayoutDeferred(boolean
the new defer state defer)If the argument is |
| pack-priv void | |
| pack-priv boolean | setScrollBarVisible(ScrollBar bar, boolean visible)
Overrides org. |
| pack-priv boolean | |
| pack-priv boolean | |
| public void | setTabList(Control[]
the ordered list of controls representing the tab order or null tabList)Sets the tabbing order for the specified controls to match the order that they occur in the argument list. |
| pack-priv void | |
| public String | toString()
Overrides org. |
| pack-priv boolean | translateMnemonic(Event event, Control control)
Overrides org. |
| pack-priv boolean | |
| pack-priv int | |
| pack-priv void | |
| pack-priv void |