コード例 #1
0
  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();
  }
コード例 #2
0
ファイル: TextModel.java プロジェクト: JoshCheek/limelight
 public void selectAll() {
   startSelection(TextLocation.origin);
   setCaretLocation(getEndLocation());
 }