parent.setHorizontalAlignment(JLabel.LEFT);
if(layoutMapOnTextChange)
parent.add(textfield, 0);
else
mapView.add(textfield, 0);
final EventBuffer eventQueue = MTextController.getController().getEventQueue();
KeyEvent firstEvent = eventQueue.getFirstEvent();
redispatchKeyEvents(textfield, firstEvent);
if (firstEvent == null) {
MouseEvent currentEvent = eventQueue.getMouseEvent();
int pos = document.getLength();
if(currentEvent != null){
MouseEvent mouseEvent = (MouseEvent) currentEvent;
if(mouseEvent.getComponent().equals(parent)){
final Point point = mouseEvent.getPoint();