public class AwtTextField extends GralTextField.GraphicImplAccess
GralTextField
in awt graphics.
The original TextField
has a considerable border for a smart outfit. That is not proper for some applications
which needs an slim and simple outfit without borders because the smart outfit properties are given outside of the textfield itself.
Therefore the functionality of a text field is implemented with a simple canvas. All functions to edit the content with keyboard
are implemented here in an independent way of the awt.TextField. The paint(Graphics)
shows the simple outfit in a special kind.Modifier and Type | Class and Description |
---|---|
(package private) class |
AwtTextField.TextCanvas |
Modifier and Type | Field and Description |
---|---|
(package private) java.lang.StringBuilder |
editBuffer |
(package private) java.awt.event.HierarchyBoundsListener |
hierarchyBoundsListener |
(package private) java.awt.event.KeyListener |
keyListener |
(package private) java.awt.Label |
promptSwt
A possible prompt for the text field or null.
|
static java.lang.String |
sVersion
Version, history and license.
|
(package private) AwtTextField.TextCanvas |
widgetAwt
The AWT widget.
|
private AwtWidgetHelper |
widgHelper
It contains the association to the swt widget (Control) and the
SwtMng
and implements some methods of GralWidgImplAccess_ifc which are delegate from this. |
chgAddText, chgCursor, chgEditable, chgNonEditable, chgPrompt, chgViewTrail, posField, posPrompt
bRedrawOnlyDynamics, chgBitsDerived, chgColorBack, chgColorLine, chgColorText, chgCurrTab, chgFloat, chgFocus, chgFont, chgIntg, chgInvisible, chgObjects, chgPos, chgText, chgVisible, chgVisibleInfo, mngImpl, pixBounds, wdgimpl, widgg
version
Constructor and Description |
---|
AwtTextField(GralTextField widgg,
AwtMng mng) |
Modifier and Type | Method and Description |
---|---|
GralRectangle |
getPixelPositionSize() |
java.lang.Object |
getWidgetImplementation()
Returns the implementation class of the widget.
|
private void |
paint(java.awt.Graphics gc) |
private void |
processKey(int key) |
void |
redrawGthread()
This method should be implemented in all Widget implementations of the adapter for the
underlying graphic system.
|
void |
removeWidgetImplementation()
Removes the graphical widget in the graphic.
|
void |
setBoundsPixel(int x,
int y,
int dx,
int dy)
Set the bounds of the implementation widget.
|
int |
setCursorPos(int pos) |
void |
setEditable(boolean editable) |
boolean |
setFocusGThread()
Sets the focus to the widget.
|
void |
setVisibleGThread(boolean bVisible)
Sets the implementation widget vible or not.
|
void |
updateValuesForAction()
This operation should be called before any action is invoked in the user space.
|
borderwidth, caretPos, caretPos, cursorPos, getAndClearNewText, getCurserLine, getCursorCol, isPasswordField, prompt, promptStylePosition, setTouched, user
acknChanged, actionShow, dyda, getActionChange, getChanged, gralMng, gralWidgetFromImplData, redrawOnlyDynamics, setDragEnable, setDropEnable, setPosBounds, setTextChanged, setVisibleState, XXXfocusGained
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
setPosBounds
public static final java.lang.String sVersion
final AwtTextField.TextCanvas widgetAwt
java.awt.Label promptSwt
private final AwtWidgetHelper widgHelper
SwtMng
and implements some methods of GralWidgImplAccess_ifc
which are delegate from this.java.lang.StringBuilder editBuffer
java.awt.event.HierarchyBoundsListener hierarchyBoundsListener
java.awt.event.KeyListener keyListener
public AwtTextField(GralTextField widgg, AwtMng mng)
public void removeWidgetImplementation()
GralWidgImplAccess_ifc
public java.lang.Object getWidgetImplementation()
GralWidgImplAccess_ifc
Component
.
GralWidget._wdgImpl
class
which should contain the references to that implementation widgets.getWidgetImplementation
in interface GralWidgImplAccess_ifc
getWidgetImplementation
in class GralWidget.ImplAccess
public boolean setFocusGThread()
GralWidgImplAccess_ifc
GralMng_ifc#setFocus(GralWidget)
.public void setVisibleGThread(boolean bVisible)
bVisible
- true then the widget should be visible, false it is set to invisible.GralWidgImplAccess_ifc.setVisibleGThread(boolean)
public int setCursorPos(int pos)
public void setBoundsPixel(int x, int y, int dx, int dy)
GralWidgImplAccess_ifc
public void setEditable(boolean editable)
public void redrawGthread()
GralWidgImplAccess_ifc
#repaintRequ
public GralRectangle getPixelPositionSize()
private void processKey(int key)
private void paint(java.awt.Graphics gc)
public void updateValuesForAction()
GralWidgImplAccess_ifc