Class SectionGroup
java.lang.Object
org.eclipse.swt.widgets.Widget
org.eclipse.swt.widgets.Control
org.eclipse.swt.widgets.Scrollable
org.eclipse.swt.widgets.Composite
com.amalgamasimulation.desktop.ui.editor.SectionGroup
- All Implemented Interfaces:
org.eclipse.swt.graphics.Drawable
public class SectionGroup
extends org.eclipse.swt.widgets.Composite
Composite that lines up the labels of the sections created in it.
By default every label gets the width of the longest one, and
labelWidth(int) sets a fixed width.
Pass the group to the builder's parent(...).
The group is white and fills the parent with a GridData, setBackground(...) and setLayoutData(...) change that.- Author:
- Ionov Ivan
-
Field Summary
Fields inherited from class org.eclipse.swt.widgets.Composite
embeddedHandleFields inherited from class org.eclipse.swt.widgets.Widget
handle -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfillWidth(boolean fillWidth) Stretches sections created after this call to the width of the group.Returns the sections created in the group.booleanReturns whether the sections are stretched to the width of the group.labelWidth(int labelWidth) Sets the label width for all sections in the group.Methods inherited from class org.eclipse.swt.widgets.Composite
changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList, toStringMethods inherited from class org.eclipse.swt.widgets.Scrollable
computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBarMethods inherited from class org.eclipse.swt.widgets.Control
addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isAutoScalable, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, updateMethods inherited from class org.eclipse.swt.widgets.Widget
addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData
-
Constructor Details
-
SectionGroup
public SectionGroup(org.eclipse.swt.widgets.Composite parent, int style)
-
-
Method Details
-
labelWidth
Sets the label width for all sections in the group. Pass -1 to use the width of the longest label. -
fillWidth
Stretches sections created after this call to the width of the group. The last text field or combo box in each row takes the free space. Off by default. -
isFillWidth
public boolean isFillWidth()Returns whether the sections are stretched to the width of the group. -
getSections
Returns the sections created in the group.
-