public final class GralWidgetBase.GralWidgComposite
extends java.lang.Object
GralWidgetBase._cdata
if the widget is a composite widget.Modifier and Type | Field and Description |
---|---|
protected java.util.Map<java.lang.String,GralWidgetBase> |
idxWidgets
Map of widgets by name of this composite widget.
|
protected GralWidgetBase_ifc |
primaryWidget
The widget which should be focused if this composite widget (panel) is focused.
|
protected java.util.List<GralWidgetBase> |
widgetList
List of all widgets which are contained in this panel.
|
java.util.List<GralWidgetBase> |
widgetsToResize
Widgets which should be resized if this parent widget is resized.
|
Modifier | Constructor and Description |
---|---|
protected |
GralWidgComposite()
Only used in ctor of
GralWidgetBase.GralWidgetBase(GralPos, String, boolean) , nothing else. |
Modifier and Type | Method and Description |
---|---|
protected void |
addWidget(GralWidgetBase widg,
boolean toResize)
Adds a widget to this composite (its panel).
|
void |
removeWidget(GralWidgetBase widg)
Removes the widget from the lists of this composite (panel).
|
(package private) void |
reportAllContent(java.lang.Appendable out,
int recursion)
Writes the content of this composite widget in a readable form
to debug the graphic assembling.
|
protected void |
resizeWidgets(GralRectangle parentPixelRectangle,
int recursion)
Resizes the current widget and all child widgets with the known
GralWidgetBase._wdgPos and the parent bounds. |
protected java.util.List<GralWidgetBase> widgetList
public java.util.List<GralWidgetBase> widgetsToResize
protected GralWidgetBase_ifc primaryWidget
protected final java.util.Map<java.lang.String,GralWidgetBase> idxWidgets
protected GralWidgComposite()
GralWidgetBase.GralWidgetBase(GralPos, String, boolean)
, nothing else.protected void addWidget(GralWidgetBase widg, boolean toResize)
GralWidgetBase.GralWidgetBase(GralPos, String, boolean)
to add the yet created widget to its parent (panel) given due the GralPos
.widg
- toResize
- public void removeWidget(GralWidgetBase widg)
GralWidgetBase.remove()
. Use the last one method
to remove a widget includint is disposition and remove from the panel.widg
- The widget.protected void resizeWidgets(GralRectangle parentPixelRectangle, int recursion)
GralWidgetBase._wdgPos
and the parent bounds.
This operation is called recursively for all children widgets which have composite children ( GralWidgetBase._cdata
is given ).
The implementing graphic should only call this operation in the resize listener of the window.
All others is done recursively.
A resize listener of panels (swt.widget.Composite) is not necessary, because the widget structure is completely contained
in this class itself. Specific operations to determine the bounds of widgets are not necessary.
GralWidgetBase.resizePostPreparation()
is called. This operation is empty per default
but can be overridden, for example to detect number of shown lines in the GralTable.
parentPixelRectangle
- parent bounds, either the client area of a window by the first call
or the bounds of the parent, which are set before, calculated from the size of the parent.recursion
- as usual on recursively call, prevents too much erroneous recursions,
to prevent a stack overflow on faulty situations.
The limit is 50, it means 50 nested widgets, enough at all.void reportAllContent(java.lang.Appendable out, int recursion) throws java.io.IOException
out
- to this outputrecursion
- if level >=50 then it does not get deeper.
this operation is recursively called in the tree of widgets.java.io.IOException