|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectfable.framework.toolbox.GridUtils
public class GridUtils
Class to deal with setting items in a grid layout invisible. Allows batch updating of controls to reduce flicker
Constructor Summary | |
---|---|
GridUtils()
|
Method Summary | |
---|---|
static void |
endMultiLayout()
End a batch layout update. |
static void |
layout(org.eclipse.swt.widgets.Composite control)
Calls layout on the control, deferring the call if within a start/endMultiLayout call. |
static void |
layoutFull(org.eclipse.swt.widgets.Composite control)
Calls layout on the control, deferring the call if within a start/endMultiLayout call. |
static void |
removeMargins(org.eclipse.swt.widgets.Composite area)
|
static void |
setVisible(org.eclipse.swt.widgets.Control widget,
boolean isVisible)
Simplified version of setVisibleAndLayout(...) which cannot cause a memory leak. |
static void |
setVisibleAndLayout(org.eclipse.swt.widgets.Control widget,
boolean isVisible)
Changes visibility and layout of a control. |
static void |
startMultiLayout(org.eclipse.swt.widgets.Control parent)
Start a batch layout update. |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public GridUtils()
Method Detail |
---|
public static void startMultiLayout(org.eclipse.swt.widgets.Control parent)
Calls to startMultiLayout can be nested as a stack is used internally. The last call to endMultiLayout causes all the layouts to happen at once.
parent
- a suitable control that encompasses all the controls that may have their visibility changed. parent is
optional and can be null. If parent is "wrong" or null the effect is simply to have slightly more
flicker in the UI that optimalpublic static void endMultiLayout()
public static void setVisibleAndLayout(org.eclipse.swt.widgets.Control widget, boolean isVisible)
If this function is called within the scope of startMultiLayout, the final steps of layout will not take effect until endMultiLayout is called.
widget
- the widget to make visible or invisibleisVisible
- is true to make widget visible, false to hide itpublic static void setVisible(org.eclipse.swt.widgets.Control widget, boolean isVisible)
widget
- isVisible
- public static void layout(org.eclipse.swt.widgets.Composite control)
control
- is the widget to re-layoutpublic static void layoutFull(org.eclipse.swt.widgets.Composite control)
control
- is the widget to re-layoutpublic static void removeMargins(org.eclipse.swt.widgets.Composite area)
area
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |