public class SwtTextFieldWrapper extends GralTextField.GraphicImplAccess
Modifier and Type | Class and Description |
---|---|
private class |
SwtTextFieldWrapper.TextFieldFocusListener
For edit able fields.
|
protected class |
SwtTextFieldWrapper.TextFieldKeyListener |
protected class |
SwtTextFieldWrapper.TextFieldModifyListener |
Modifier and Type | Field and Description |
---|---|
private org.eclipse.swt.dnd.DropTarget |
drop |
(package private) org.eclipse.swt.events.PaintListener |
paintListener |
(package private) SwtTransparentLabel |
promptSwt
A possible prompt for the text field or null.
|
private SwtWidgetHelper |
swtWidgHelper
It contains the association to the swt widget (Control) and the
SwtMng
and implements some methods of GralWidgImpl_ifc which are delegate from this. |
protected org.eclipse.swt.widgets.Text |
textFieldSwt |
static java.lang.String |
version
Version, history and license.
|
chgCursor, chgPrompt, posField, posPrompt
chgBitsDerived, chgColorBack, chgColorLine, chgColorText, chgEditable, chgFloat, chgFocus, chgFont, chgIntg, chgInvisible, chgObjects, chgPos, chgText, chgVisible, chgVisibleInfo, pixBounds, wdgimpl, widgg
Modifier | Constructor and Description |
---|---|
private |
SwtTextFieldWrapper(GralTextField widgg,
SwtMng mng) |
Modifier and Type | Method and Description |
---|---|
(package private) static void |
createTextField(GralTextField widgg,
GralMng mng)
Creates a SwtTextField.
|
GralRectangle |
getPixelPositionSize() |
org.eclipse.swt.widgets.Text |
getWidgetImplementation()
Returns the implementation class of the widget.
|
protected void |
paintWidget(org.eclipse.swt.widgets.Text swt,
org.eclipse.swt.events.PaintEvent e) |
void |
removeWidgetImplementation()
Removes the graphical widget in the graphic.
|
void |
repaintGthread()
This method should be implemented in all Widget implementations of the adapter for the
underlying graphic system.
|
void |
setBoundsPixel(int x,
int y,
int dx,
int dy) |
protected void |
setDragEnable(int dragType)
Implementation routine to set receiving a drag event and initializes the drag feature of the widget.
|
protected void |
setDropEnable(int dropType)
Implementation routine to set receiving a drop event and initializes the drop feature of the widget.
|
boolean |
setFocusGThread()
Sets the focus to the widget.
|
void |
setVisibleGThread(boolean bVisible)
Sets the implementation widget(s) visible state.
|
(package private) void |
stop() |
protected void |
textFieldFocusGained() |
protected void |
textFieldFocusLost() |
borderwidth, caretPos, caretPos, isPasswordField, prompt, promptStylePosition, setTouched, user
acknChanged, actionShow, dyda, getActionChange, getChanged, gralWidgetFromImplData, setFocused, setTextChanged, setVisibleState, XXXfocusGained
public static final java.lang.String version
GralTextField.setBorderWidth(int)
to show the text field with a border. That is not a property
of an SWT Text, therefore a new paintListener
was added to draw the border.
GralTextField
uses the new concept of instantiation: It is not
the super class of the implementation class. But it provides GralTextField.GraphicImplAccess
as the super class.
#swtKeyListener
. The [Enter] key will be send to the User
in opposite to SwtTextBox
.
repaintGthread()
does not do anything if the textFieldSwt is removed
because the widget was removed. Prevent null-Pointer exception.
private final SwtWidgetHelper swtWidgHelper
SwtMng
and implements some methods of GralWidgImpl_ifc
which are delegate from this.protected org.eclipse.swt.widgets.Text textFieldSwt
SwtTransparentLabel promptSwt
private org.eclipse.swt.dnd.DropTarget drop
org.eclipse.swt.events.PaintListener paintListener
private SwtTextFieldWrapper(GralTextField widgg, SwtMng mng)
static void createTextField(GralTextField widgg, GralMng mng)
SwtMng
.widgg
- name
- The name to register it.editable
- false then show fieldprompt
- maybe null, propmt textpromptStylePosition
- maybe null, prompt positionmng
- public GralRectangle getPixelPositionSize()
protected void setDropEnable(int dropType)
GralWidget.ImplAccess
setDropEnable
in class GralWidget.ImplAccess
dropType
- one of KeyCode.dropFiles
or ..dropTextprotected void setDragEnable(int dragType)
GralWidget.ImplAccess
setDragEnable
in class GralWidget.ImplAccess
dragType
- one of KeyCode.dragFiles
or ..dragTextpublic void repaintGthread()
GralWidgImpl_ifc
#repaintRequ
public org.eclipse.swt.widgets.Text getWidgetImplementation()
GralWidgImpl_ifc
Component
.
GralWidget._wdgImpl
class
which should contain the references to that implementation widgets.public boolean setFocusGThread()
GralWidgImpl_ifc
GralMng_ifc#setFocus(GralWidget)
.public void setVisibleGThread(boolean bVisible)
GralWidgImpl_ifc
GralWidget.bVisibleState
too. Therewith it is able to quest GralWidget.isVisible()
in any thread.bVisible
- true then the widget should be visible, false it is set to invisible.public void removeWidgetImplementation()
GralWidgImpl_ifc
public void setBoundsPixel(int x, int y, int dx, int dy)
protected void textFieldFocusGained()
protected void textFieldFocusLost()
protected void paintWidget(org.eclipse.swt.widgets.Text swt, org.eclipse.swt.events.PaintEvent e)
void stop()