org.eclipse.swt.widgets.Text.copy()方法的使用及代码示例

x33g5p2x  于2022-01-29 转载在 其他  
字(5.9k)|赞(0)|评价(0)|浏览(99)

本文整理了Java中org.eclipse.swt.widgets.Text.copy()方法的一些代码示例,展示了Text.copy()的具体用法。这些代码示例主要来源于Github/Stackoverflow/Maven等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Text.copy()方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Text
类名称:Text
方法名:copy

Text.copy介绍

[英]Copies the selected text.

The current selection is copied to the clipboard.
[中]复制所选文本。
当前选定内容将复制到剪贴板。

代码示例

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface

/**
 * The <code>TextCellEditor</code> implementation of this
 * <code>CellEditor</code> method copies the
 * current selection to the clipboard.
 */
@Override
public void performCopy() {
  text.copy();
}

代码示例来源:origin: org.eclipse.jdt/org.eclipse.jdt.ui

@Override
public void performCopy() {
  text.copy();
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jdt.ui

@Override
public void performCopy() {
  text.copy();
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.jface

/**
 * The <code>TextCellEditor</code> implementation of this
 * <code>CellEditor</code> method copies the
 * current selection to the clipboard.
 */
@Override
public void performCopy() {
  text.copy();
}

代码示例来源:origin: org.eclipse/org.eclipse.jdt.ui

public void performCopy() {
  text.copy();
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86

/**
 * Copies the selected text.
 * <p>
 * The current selection is copied to the clipboard.
 * </p>
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 *
 * @since 3.3
 */
public void copy () {
  checkWidget ();
  text.copy ();
}
void createPopup(String[] items, int selectionIndex) {

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc

/**
 * Copies the selected text.
 * <p>
 * The current selection is copied to the clipboard.
 * </p>
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 *
 * @since 3.3
 */
public void copy () {
  checkWidget ();
  text.copy ();
}
void createPopup(String[] items, int selectionIndex) {

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

/**
 * Copies the selected text.
 * <p>
 * The current selection is copied to the clipboard.
 * </p>
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 * 
 * @since 3.3
 */
public void copy () {
  checkWidget ();
  text.copy ();
}
void createPopup(String[] items, int selectionIndex) {

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x

/**
 * Copies the selected text.
 * <p>
 * The current selection is copied to the clipboard.
 * </p>
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 *
 * @since 3.3
 */
public void copy () {
  checkWidget ();
  text.copy ();
}
void createPopup(String[] items, int selectionIndex) {

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc

/**
 * Copies the selected text.
 * <p>
 * The current selection is copied to the clipboard.
 * </p>
 *
 * @exception SWTException <ul>
 *    <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li>
 *    <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li>
 * </ul>
 *
 * @since 3.3
 */
public void copy () {
  checkWidget ();
  text.copy ();
}
void createPopup(String[] items, int selectionIndex) {

代码示例来源:origin: org.eclipse/org.eclipse.ui.navigator

public void runWithEvent(Event event) {
  if (activeTextControl != null && !activeTextControl.isDisposed()) {
    activeTextControl.copy();
    return;
  }
  if (copyAction != null) {
    copyAction.runWithEvent(event);
    return;
  }
}

代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.ui.ide

@Override
public void runWithEvent(Event event) {
  if (activeTextControl != null && !activeTextControl.isDisposed()) {
    activeTextControl.copy();
    updateActionsEnableState();
    return;
  }
  if (copyAction != null) {
    copyAction.runWithEvent(event);
    return;
  }
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

b = new Button(parent, SWT.PUSH);
b.setText("Copy");
b.addSelectionListener(widgetSelectedAdapter(e -> text.copy()));
b = new Button(parent, SWT.PUSH);
b.setText("Paste");

代码示例来源:origin: org.eclipse.pde/org.eclipse.pde.ui

text.copy();
return true;

代码示例来源:origin: org.eclipse.mylyn.commons/workbench

text.copy();
return true;

代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64

return false;
case 8: /* C */
  if ((style & SWT.PASSWORD) == 0) copy ();
  return false;
case 9: /* V */

代码示例来源:origin: openaudible/openaudible

((Text) control).copy();
else if (control instanceof StyledText)
  ((StyledText) control).copy();

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

/**
 * Create the event console popup menu.
 */
void createEventConsolePopup () {
  Menu popup = new Menu (shell, SWT.POP_UP);
  eventConsole.setMenu (popup);
  MenuItem cut = new MenuItem (popup, SWT.PUSH);
  cut.setText (ControlExample.getResourceString("MenuItem_Cut"));
  cut.addListener (SWT.Selection, event -> eventConsole.cut ());
  MenuItem copy = new MenuItem (popup, SWT.PUSH);
  copy.setText (ControlExample.getResourceString("MenuItem_Copy"));
  copy.addListener (SWT.Selection, event -> eventConsole.copy ());
  MenuItem paste = new MenuItem (popup, SWT.PUSH);
  paste.setText (ControlExample.getResourceString("MenuItem_Paste"));
  paste.addListener (SWT.Selection, event -> eventConsole.paste ());
  new MenuItem (popup, SWT.SEPARATOR);
  MenuItem selectAll = new MenuItem (popup, SWT.PUSH);
  selectAll.setText(ControlExample.getResourceString("MenuItem_SelectAll"));
  selectAll.addListener (SWT.Selection, event -> eventConsole.selectAll ());
}

代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.examples

copy.setText(LayoutExample.getResourceString("Copy"));
copy.setAccelerator(SWT.MOD1 + 'C');
copy.addSelectionListener(widgetSelectedAdapter(event -> text.copy()));
MenuItem exit = new MenuItem(menu, SWT.PUSH);
exit.setText(LayoutExample.getResourceString("Exit"));

相关文章

Text类方法