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

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

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

Text.getSelectionCount介绍

[英]Returns the number of selected characters.
[中]返回所选字符数。

代码示例

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

/**
 * Tests whether the current text widget has some text selection.
 *
 * @return <code>true</code> if the number of selected characters it
 *         greater than zero; <code>false</code> otherwise.
 */
private boolean hasSelection() {
  return (text.getSelectionCount() > 0);
}

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

/**
 * Tests whether the current text widget has some text selection.
 *
 * @return <code>true</code> if the number of selected characters it
 *         greater than zero; <code>false</code> otherwise.
 */
private boolean hasSelection() {
  return (text.getSelectionCount() > 0);
}

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

/**
 * Tests whether the current text widget has some text selection.
 * 
 * @return <code>true</code> if the number of selected characters it
 *         greater than zero; <code>false</code> otherwise.
 */
private boolean hasSelection() {
  return (text.getSelectionCount() > 0);
}

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

@Override
public boolean isCutEnabled() {
  if (text == null || text.isDisposed())
    return false;
  return text.getSelectionCount() > 0;
}

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

/**
 * The <code>TextCellEditor</code>  implementation of this
 * <code>CellEditor</code> method returns <code>true</code> if
 * the current selection is not empty.
 */
@Override
public boolean isCutEnabled() {
  if (text == null || text.isDisposed()) {
    return false;
  }
  return text.getSelectionCount() > 0;
}

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

@Override
public boolean isCopyEnabled() {
  if (text == null || text.isDisposed())
    return false;
  return text.getSelectionCount() > 0;
}

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

@Override
public boolean isCopyEnabled() {
  if (text == null || text.isDisposed())
    return false;
  return text.getSelectionCount() > 0;
}

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

/**
 * The <code>TextCellEditor</code>  implementation of this
 * <code>CellEditor</code> method returns <code>true</code> if
 * the current selection is not empty.
 */
@Override
public boolean isCopyEnabled() {
  if (text == null || text.isDisposed()) {
    return false;
  }
  return text.getSelectionCount() > 0;
}

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

/**
 * The <code>TextCellEditor</code>  implementation of this
 * <code>CellEditor</code> method returns <code>true</code> if
 * the current selection is not empty.
 */
@Override
public boolean isCutEnabled() {
  if (text == null || text.isDisposed()) {
    return false;
  }
  return text.getSelectionCount() > 0;
}

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

/**
 * The <code>TextCellEditor</code>  implementation of this
 * <code>CellEditor</code> method returns <code>true</code> if
 * the current selection is not empty.
 */
@Override
public boolean isCopyEnabled() {
  if (text == null || text.isDisposed()) {
    return false;
  }
  return text.getSelectionCount() > 0;
}

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

public boolean isCopyEnabled() {
  if (text == null || text.isDisposed())
    return false;
  return text.getSelectionCount() > 0;
}

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

public boolean isCutEnabled() {
  if (text == null || text.isDisposed())
    return false;
  return text.getSelectionCount() > 0;
}

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

@Override
public boolean isCutEnabled() {
  if (text == null || text.isDisposed())
    return false;
  return text.getSelectionCount() > 0;
}

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

protected void checkSelection() {
  boolean oldIsSelection = isSelection;
  isSelection = text.getSelectionCount() > 0;
  if (oldIsSelection != isSelection) {
    fireEnablementChanged(COPY);
    fireEnablementChanged(CUT);
  }
}

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

protected void checkSelection() {
  boolean oldIsSelection = isSelection;
  isSelection = text.getSelectionCount() > 0;
  if (oldIsSelection != isSelection) {
    fireEnablementChanged(COPY);
    fireEnablementChanged(CUT);
  }
}

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

/**
 * Checks to see if the selection state (selection /
 * no selection) has changed and if so fire an
 * enablement changed notification.
 */
private void checkSelection() {
  boolean oldIsSelection = isSelection;
  isSelection = text.getSelectionCount() > 0;
  if (oldIsSelection != isSelection) {
    fireEnablementChanged(COPY);
    fireEnablementChanged(CUT);
  }
}

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

protected void checkSelection() {
  boolean oldIsSelection = isSelection;
  isSelection = text.getSelectionCount() > 0;
  if (oldIsSelection != isSelection) {
    fireEnablementChanged(COPY);
    fireEnablementChanged(CUT);
  }
}

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

public boolean isDeleteEnabled() {
  if (text == null || text.isDisposed())
    return false;
  return text.getSelectionCount() > 0
      || text.getCaretPosition() < text.getCharCount();
}

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

@Override
public boolean isDeleteEnabled() {
  if (text == null || text.isDisposed())
    return false;
  return text.getSelectionCount() > 0
      || text.getCaretPosition() < text.getCharCount();
}

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

@Override
public boolean isDeleteEnabled() {
  if (text == null || text.isDisposed())
    return false;
  return text.getSelectionCount() > 0
      || text.getCaretPosition() < text.getCharCount();
}

相关文章

微信公众号

最新文章

更多

Text类方法