Tabnine Logo
Clipboard.setContents
Code IndexAdd Tabnine to your IDE (free)

How to use
setContents
method
in
com.badlogic.gdx.utils.Clipboard

Best Java code snippets using com.badlogic.gdx.utils.Clipboard.setContents (Showing top 9 results out of 315)

origin: libgdx/libgdx

/** 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)));
  }
}
origin: libgdx/libgdx

/** 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)));
  }
}
origin: com.badlogicgames.gdx/gdx

/** 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)));
  }
}
origin: langurmonkey/gaiasky

/** 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)));
  }
}
origin: kotcrab/vis-ui

/** 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)));
  }
}
origin: crashinvaders/gdx-texture-packer-gui

  @Override
  public void changed(ChangeEvent event, Actor actor) {
    Gdx.app.getClipboard().setContents(log);
  }
});
origin: crashinvaders/gdx-texture-packer-gui

  @LmlAction("copyToClipboard") void copyToClipboard() {
    Gdx.app.getClipboard().setContents(errorMessage);
  }
}
origin: Var3D/var3dframe

  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() + ")");
  }
});
origin: kotcrab/vis-ui

  @Override
  public void changed (ChangeEvent event, Actor actor) {
    Gdx.app.getClipboard().setContents((detailsLabel.getText().toString()));
    copyButton.setText(Text.COPIED.get());
  }
});
com.badlogic.gdx.utilsClipboardsetContents

Javadoc

Sets the content of the system clipboard.

Popular methods of Clipboard

  • getContents
    gets the current content of the clipboard if it contains text

Popular in Java

  • Making http requests using okhttp
  • findViewById (Activity)
  • runOnUiThread (Activity)
  • setScale (BigDecimal)
  • URLEncoder (java.net)
    This class is used to encode a string using the format required by application/x-www-form-urlencoded
  • Selector (java.nio.channels)
    A controller for the selection of SelectableChannel objects. Selectable channels can be registered w
  • Permission (java.security)
    Legacy security code; do not use.
  • DateFormat (java.text)
    Formats or parses dates and times.This class provides factories for obtaining instances configured f
  • Pattern (java.util.regex)
    Patterns are compiled regular expressions. In many cases, convenience methods such as String#matches
  • StringUtils (org.apache.commons.lang)
    Operations on java.lang.String that arenull safe. * IsEmpty/IsBlank - checks if a String contains
  • Github Copilot alternatives
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now