caret.setMagicCaretPosition(magicPosition);
(direction == SwingConstants.NORTH || direction == SwingConstants.SOUTH)) { caret.setMagicCaretPosition(magicPosition);
public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { Caret caret = target.getCaret(); try { int dot = Utilities.getRowEnd(target, caret.getDot()); if (select) { caret.moveDot(dot); } else { caret.setDot(dot); } // now move the magic caret position far to the right Rectangle r = target.modelToView(dot); Point p = new Point(Integer.MAX_VALUE / 2, r.y); caret.setMagicCaretPosition(p); } catch (BadLocationException e) { target.getToolkit().beep(); } } } }
public void actionPerformed(ActionEvent evt, JTextComponent target) { if (target != null) { Caret caret = target.getCaret(); try { int dot = javax.swing.text.Utilities.getRowEnd(target, caret.getDot()); if (select) { caret.moveDot(dot); } else { caret.setDot(dot); } // now move the magic caret position far to the right Rectangle r = target.modelToView(dot); if (r!=null){ Point p = new Point(Short.MAX_VALUE - 1, r.y); caret.setMagicCaretPosition(p); } } catch (BadLocationException e) { e.printStackTrace(); target.getToolkit().beep(); } } } }
if (p == null && tgtRect !=null) { p = new Point((int)tgtRect.x, (int)tgtRect.y); caret.setMagicCaretPosition(p); } else { p.y = (int)tgtRect.y;
if (p == null) { p = new Point((int) tgtRect.x, (int) tgtRect.y); caret.setMagicCaretPosition(p);
if (p == null) { p = new Point(tgtRect.x, tgtRect.y); caret.setMagicCaretPosition(p);
caret.setMagicCaretPosition(p); } else { p.y = tgtRect.y;
if (r!=null){ p = new Point(r.x, r.y); caret.setMagicCaretPosition(p); }else{ return; // model to view failed
Rectangle r = target.modelToView(dot); p = new Point(r.x, r.y); caret.setMagicCaretPosition(p);
Rectangle r = target.modelToView(dot); p = new Point(r.x, r.y); caret.setMagicCaretPosition(p);
if (r!=null){ p = new Point(r.x, r.y); caret.setMagicCaretPosition(p); }else{ return; // model to view failed
/** * The operation to perform when this action is triggered. * * @param e DOCUMENT ME! */ public void actionPerformed(ActionEvent e) { JTextComponent target = getTextComponent(e); if (target != null) { // target.getUI().getNextVisualPositionFrom(t Caret caret = target.getCaret(); int dot = caret.getDot(); verticalAction.actionPerformed(e); if (dot == caret.getDot()) { Point magic = caret.getMagicCaretPosition(); beginEndAction.actionPerformed(e); caret.setMagicCaretPosition(magic); } } } }
/** * The operation to perform when this action is triggered. * * @param e DOCUMENT ME! */ public void actionPerformed(ActionEvent e) { JTextComponent target = getTextComponent(e); if (target != null) { // target.getUI().getNextVisualPositionFrom(t Caret caret = target.getCaret(); int dot = caret.getDot(); verticalAction.actionPerformed(e); if (dot == caret.getDot()) { Point magic = caret.getMagicCaretPosition(); beginEndAction.actionPerformed(e); caret.setMagicCaretPosition(magic); } } } }
/** * The operation to perform when this action is triggered. * * @param e DOCUMENT ME! */ public void actionPerformed(ActionEvent e) { JTextComponent target = getTextComponent(e); if (target != null) { // target.getUI().getNextVisualPositionFrom(t Caret caret = target.getCaret(); int dot = caret.getDot(); verticalAction.actionPerformed(e); if (dot == caret.getDot()) { Point magic = caret.getMagicCaretPosition(); beginEndAction.actionPerformed(e); caret.setMagicCaretPosition(magic); } } } }
caret.setMagicCaretPosition(magicPosition);
caret.setMagicCaretPosition(magicPosition);
(direction == SwingConstants.NORTH || direction == SwingConstants.SOUTH)) { caret.setMagicCaretPosition(magicPosition);
(direction == SwingConstants.NORTH || direction == SwingConstants.SOUTH)) { caret.setMagicCaretPosition(magicPosition);
(direction == SwingConstants.NORTH || direction == SwingConstants.SOUTH)) { caret.setMagicCaretPosition(magicPosition);