/** Copies the contents of this TextField to the {@link Clipboard} implementation set on this TextField. */ public void copy () { if (hasSelection && !passwordMode) { clipboard.setContents(text.substring(Math.min(cursor, selectionStart), Math.max(cursor, selectionStart))); } }
switch (keycode) { case Keys.V: paste(clipboard.getContents(), true); repeat = true; break; switch (keycode) { case Keys.INSERT: paste(clipboard.getContents(), true); break; case Keys.FORWARD_DEL:
switch (keycode) { case Keys.V: paste(clipboard.getContents(), true); repeat = true; break; switch (keycode) { case Keys.INSERT: paste(clipboard.getContents(), true); break; case Keys.FORWARD_DEL:
/** Copies the contents of this TextField to the {@link Clipboard} implementation set on this TextField. */ public void copy () { if (hasSelection && !passwordMode) { clipboard.setContents(text.substring(Math.min(cursor, selectionStart), Math.max(cursor, selectionStart))); } }
paste(clipboard.getContents(), true); repeat = true; if (keycode == Keys.INSERT && readOnly == false) paste(clipboard.getContents(), true); if (keycode == Keys.FORWARD_DEL && readOnly == false) cut(true); selection:
/** Copies the contents of this TextField to the {@link Clipboard} implementation set on this TextField. */ public void copy () { if (hasSelection && !passwordMode) { clipboard.setContents(text.substring(Math.min(cursor, selectionStart), Math.max(cursor, selectionStart))); } }
paste(clipboard.getContents(), true); repeat = true; paste(clipboard.getContents(), true); if (keycode == Keys.FORWARD_DEL) cut(true);
/** Copies the contents of this TextField to the {@link Clipboard} implementation set on this TextField. */ public void copy() { if (hasSelection && !passwordMode) { clipboard.setContents(text.substring(Math.min(cursor, selectionStart), Math.max(cursor, selectionStart))); } }
switch (keycode) { case Keys.V: paste(clipboard.getContents(), true); repeat = true; break; switch (keycode) { case Keys.INSERT: paste(clipboard.getContents(), true); break; case Keys.FORWARD_DEL:
/** Copies the contents of this TextField to the {@link Clipboard} implementation set on this TextField. */ public void copy () { if (hasSelection && !passwordMode) { int beginIndex = Math.min(cursor, selectionStart); int endIndex = Math.max(cursor, selectionStart); clipboard.setContents(text.substring(Math.max(0, beginIndex), Math.min(text.length(), endIndex))); } }
@Override public void changed(ChangeEvent event, Actor actor) { Gdx.app.getClipboard().setContents(log); } });
@LmlAction("copyToClipboard") void copyToClipboard() { Gdx.app.getClipboard().setContents(errorMessage); } }
public void touchUp(InputEvent event, float px, float py, int pointer, int but) { Clipboard clip = Gdx.app.getClipboard(); clip.setContents(".setPosition(" + (int) actor.getX() + "," + (int) actor.getY() + ")"); } });
@Override public void changed (ChangeEvent event, Actor actor) { Gdx.app.getClipboard().setContents((detailsLabel.getText().toString())); copyButton.setText(Text.COPIED.get()); } });