public class SwtWidgetHelper extends java.lang.Object implements GralWidgetImpl_ifc
org.eclipse.swt.widgets.Control
.
getPixelPositionSize(Control)
.
The static methods of this class are called in some situations, where same functionality is need in some classes.Modifier and Type | Field and Description |
---|---|
SwtMng |
mng |
static int |
version
Version and history
2011-11-18 Hartmut chg:
setFocusOfTabSwt(Control) is the implementation of all
org.vishia.gral.base.GralWidget#setFocusGThread() implementations. |
Control |
widgetSwt |
sVersion
Constructor and Description |
---|
SwtWidgetHelper(Control widgetSwt,
SwtMng mng) |
Modifier and Type | Method and Description |
---|---|
static GralColor |
getColor(Color swtColor) |
java.lang.Object |
getImplWidget()
This returns the graphic element of the implementation.
|
GralRectangle |
getPixelPositionSize()
Calculates the absolute position of the widget on the screen.
|
static GralRectangle |
getPixelPositionSize(Control widg)
Deprecated.
this routine is implemented in
SwtWidgetHelper
which can be used for all widgets (new concept). |
void |
removeWidgetImplementation() |
void |
setBoundsPixel(int x,
int y,
int dx,
int dy) |
boolean |
setFocusGThread() |
static boolean |
setFocusOfTabSwt(Control control)
Sets the correct TabItem if any widget at this TabItem is focused.
|
void |
setVisibleGThread(boolean bVisible)
Sets the implementation widget vible or not.
|
void |
specifyContextMenu(GralMenu menu) |
void |
swtUpdateRedraw() |
public static final int version
setFocusOfTabSwt(Control)
is the implementation of all
org.vishia.gral.base.GralWidget#setFocusGThread()
implementations. It regards that a tab in a TabFolder
should be selected if any widget inside the tab-panel is focused. Used extensive in JavaCommander.
public final SwtMng mng
public Control widgetSwt
public SwtWidgetHelper(Control widgetSwt, SwtMng mng)
public java.lang.Object getImplWidget()
GralWidgetImpl_ifc
getImplWidget
in interface GralWidgetImpl_ifc
public static GralColor getColor(Color swtColor)
public static boolean setFocusOfTabSwt(Control control)
control
- public void swtUpdateRedraw()
public boolean setFocusGThread()
public void setVisibleGThread(boolean bVisible)
public void removeWidgetImplementation()
public void setBoundsPixel(int x, int y, int dx, int dy)
public GralRectangle getPixelPositionSize()
Shell
and calculates from there through all composites.@Deprecated public static GralRectangle getPixelPositionSize(Control widg)
SwtWidgetHelper
which can be used for all widgets (new concept).widg
- public void specifyContextMenu(GralMenu menu)
specifyContextMenu
in interface GralWidgetImpl_ifc