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

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

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

Table.showSelection介绍

[英]Shows the selection. If the selection is already showing in the receiver, this method simply returns. Otherwise, the items are scrolled until the selection is visible.
[中]

代码示例

代码示例来源:origin: pentaho/pentaho-kettle

void setUIText() {
 wUseSSL.setSelection( sslEnabled );
 sslTable.setEnabled( sslEnabled );
 sslTable.table.setEnabled( sslEnabled );
 sslTable.table.select( 0 );
 sslTable.table.showSelection();
}

代码示例来源:origin: pentaho/pentaho-kettle

private void setUIText() {
 wCheckBox.setSelection( isEnabled );
 propertiesTable.setEnabled( isEnabled );
 propertiesTable.table.setEnabled( isEnabled );
 propertiesTable.table.select( 0 );
 propertiesTable.table.showSelection();
}

代码示例来源:origin: pentaho/pentaho-kettle

wPackages.table.showSelection();

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

@Override
protected void doShowSelection() {
  table.showSelection();
}

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

@Override
protected void doShowSelection() {
  table.showSelection();
}

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

protected void doShowSelection() {
  table.showSelection();
}

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

@Override
void showSelection() {
  getTable().showSelection();
}

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

/**
 * Shows the selection.
 * <p>
 * If there is no selection or the selection
 * is already visible, this method does nothing.
 * If the selection is scrolled out of view,
 * the top index of the widget is changed such
 * that selection becomes visible.
 *
 * @exception SWTException <ul>
 *    <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
 *    <li>ERROR_WIDGET_DISPOSED when the widget has been disposed
 * </ul>
 */
public void showSelection () {
  checkWidget();
  table.showSelection();
}
}

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

/**
 * Shows the selection.
 * <p>
 * If there is no selection or the selection
 * is already visible, this method does nothing.
 * If the selection is scrolled out of view,
 * the top index of the widget is changed such
 * that selection becomes visible.
 *
 * @exception SWTException <ul>
 *    <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
 *    <li>ERROR_WIDGET_DISPOSED when the widget has been disposed
 * </ul>
 */
public void showSelection () {
  checkWidget();
  table.showSelection();
}
}

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

/**
 * Shows the selection.
 * <p>
 * If there is no selection or the selection
 * is already visible, this method does nothing.
 * If the selection is scrolled out of view,
 * the top index of the widget is changed such
 * that selection becomes visible.
 *
 * @exception SWTException <ul>
 *    <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
 *    <li>ERROR_WIDGET_DISPOSED when the widget has been disposed
 * </ul>
 */
public void showSelection () {
  checkWidget();
  table.showSelection();
}
}

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

/**
 * Shows the selection.
 * <p>
 * If there is no selection or the selection
 * is already visible, this method does nothing.
 * If the selection is scrolled out of view,
 * the top index of the widget is changed such
 * that selection becomes visible.
 *
 * @exception SWTException <ul>
 *    <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
 *    <li>ERROR_WIDGET_DISPOSED when the widget has been disposed
 * </ul>
 */
public void showSelection () {
  checkWidget();
  table.showSelection();
}
}

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

/**
 * Shows the selection.
 * <p>
 * If there is no selection or the selection
 * is already visible, this method does nothing.
 * If the selection is scrolled out of view,
 * the top index of the widget is changed such
 * that selection becomes visible.
 *
 * @exception SWTException <ul>
 *    <li>ERROR_THREAD_INVALID_ACCESS when called from the wrong thread
 *    <li>ERROR_WIDGET_DISPOSED when the widget has been disposed
 * </ul>
 */
public void showSelection () {
  checkWidget();
  table.showSelection();
}
}

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

private void selectProposal(int index) {
  Assert
      .isTrue(index >= 0,
          "Proposal index should never be negative"); //$NON-NLS-1$
  if (!isValid() || proposals == null || index >= proposals.length) {
    return;
  }
  proposalTable.setSelection(index);
  proposalTable.showSelection();
  showProposalDescription();
}

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

private void selectProposal(int index) {
  Assert
      .isTrue(index >= 0,
          "Proposal index should never be negative"); //$NON-NLS-1$
  if (!isValid() || proposals == null || index >= proposals.length) {
    return;
  }
  proposalTable.setSelection(index);
  proposalTable.showSelection();
  showProposalDescription();
}

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

private void selectProposal(int index) {
  Assert
      .isTrue(index >= 0,
          "Proposal index should never be negative"); //$NON-NLS-1$
  if (!isValid() || proposals == null || index >= proposals.length) {
    return;
  }
  proposalTable.setSelection(index);
  proposalTable.showSelection();
  showProposalDescription();
}

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

/**
 * Selects the item at the given zero-relative index in the receiver.
 * The current selection is first cleared, then the new item is selected.
 *
 * @param index the index of the item to select
 *
 * @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>
 *
 * @see Table#deselectAll()
 * @see Table#select(int)
 */
public void setSelection( int index ) {
 checkWidget();
 deselectAll();
 select( index );
 setFocusIndex( index );
 showSelection();
}

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

/**
 * Selects the item at the given zero-relative index in the receiver.
 * The current selection is first cleared, then the new item is selected,
 * and if necessary the receiver is scrolled to make the new selection visible.
 *
 * @param index the index of the item to select
 *
 * @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>
 *
 * @see Table#deselectAll()
 * @see Table#select(int)
 */
public void setSelection (int index) {
  checkWidget ();
  boolean fixColumn = showFirstColumn ();
  deselectAll ();
  selectFocusIndex (index);
  showSelection ();
  if (fixColumn) hideFirstColumn ();
}

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

/**
 * Selects the entry with the given index in the proposal selector and feeds
 * the selection to the additional info controller.
 *
 * @param index the index in the list
 * @param smartToggle <code>true</code> if the smart toogle key has been pressed
 * @since 2.1
 */
private void selectProposal(int index, boolean smartToggle) {
  ICompletionProposal oldProposal= getSelectedProposal();
  if (oldProposal instanceof ICompletionProposalExtension2)
    ((ICompletionProposalExtension2) oldProposal).unselected(fViewer);
  ICompletionProposal proposal= fFilteredProposals[index];
  if (proposal instanceof ICompletionProposalExtension2)
    ((ICompletionProposalExtension2) proposal).selected(fViewer, smartToggle);
  fLastProposal= proposal;
  fProposalTable.setSelection(index);
  fProposalTable.showSelection();
  if (fAdditionalInfoController != null)
    fAdditionalInfoController.handleTableSelectionChanged();
}

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

/**
 * Selects the entry with the given index in the proposal selector and feeds
 * the selection to the additional info controller.
 *
 * @param index the index in the list
 * @param smartToggle <code>true</code> if the smart toogle key has been pressed
 * @since 2.1
 */
private void selectProposal(int index, boolean smartToggle) {
  ICompletionProposal oldProposal= getSelectedProposal();
  if (oldProposal instanceof ICompletionProposalExtension2)
    ((ICompletionProposalExtension2) oldProposal).unselected(fViewer);
  ICompletionProposal proposal= fFilteredProposals[index];
  if (proposal instanceof ICompletionProposalExtension2)
    ((ICompletionProposalExtension2) proposal).selected(fViewer, smartToggle);
  fLastProposal= proposal;
  fProposalTable.setSelection(index);
  fProposalTable.showSelection();
  if (fAdditionalInfoController != null)
    fAdditionalInfoController.handleTableSelectionChanged();
}

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

public void navigateNext(boolean forward) {
    int itemCount = fViewer.getTable().getItemCount();
    if (itemCount == 0)
      return;
    int[] selection = fViewer.getTable().getSelectionIndices();
    int nextIndex = 0;
    if (selection.length > 0) {
      if (forward) {
        nextIndex = selection[selection.length - 1] + 1;
        if (nextIndex >= itemCount)
          nextIndex = 0;
      } else {
        nextIndex = selection[0] - 1;
        if (nextIndex < 0)
          nextIndex = itemCount - 1;
      }
    }
    fViewer.getTable().setSelection(nextIndex);
    fViewer.getTable().showSelection();
  }
}

相关文章

Table类方法