public void processMousePressed(MousePressedEvent e) {
    final Panel panel = e.getRecipient();
    inWordSelectionMode = false;

    TextLocation location = model.getLocationAt(e.getLocation());
    model.startSelection(location);
    model.setCaretLocation(location, XOffsetStrategy.FITTING, YOffsetStrategy.FITTING);
    model.setCaretOn(true);

    handleMultipleClicks(e);

    panel.markAsDirty();
    panel.getStage().getKeyListener().focusOn(panel);

    lastClickTime = System.currentTimeMillis();
  }
Example #2
0
 public void selectAll() {
   startSelection(TextLocation.origin);
   setCaretLocation(getEndLocation());
 }