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

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

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

Table.addFocusListener介绍

暂无

代码示例

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

tableViewFields.setLayoutData( fd );
tableViewFields.table.addFocusListener( new FocusListener() {

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

new TableView( transMeta, wGeneralComp, SWT.BORDER
  | SWT.FULL_SELECTION | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL, ciReturn, UpInsRows, lsMod, props );
wReturn.getTable().addFocusListener( new FocusListener() {

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

/**
 * Initializes and returns the Copy action for the location viewer.
 */
LocationCopyAction initCopyAction(final IViewSite viewSite, final Clipboard clipboard) {
  final LocationCopyAction copyAction= new LocationCopyAction(viewSite, clipboard, this);
  
  getTable().addFocusListener(new FocusListener() {
    IAction fViewCopyHandler;
    public void focusLost(FocusEvent e) {
      if (fViewCopyHandler != null) {
        IActionBars actionBars= viewSite.getActionBars();
        actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), fViewCopyHandler);
        actionBars.updateActionBars();
        fViewCopyHandler= null;
      }
    }
    
    public void focusGained(FocusEvent e) {
      IActionBars actionBars= viewSite.getActionBars();
      fViewCopyHandler= actionBars.getGlobalActionHandler(ActionFactory.COPY.getId());
      actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), copyAction);
      actionBars.updateActionBars();
    }
  });
  
  return copyAction;
}

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

/**
 * Initializes and returns the Copy action for the location viewer.
 *
 * @param viewSite the view site
 * @param clipboard the clipboard
 * @return the copy action
 */
LocationCopyAction initCopyAction(final IViewSite viewSite, final Clipboard clipboard) {
  final LocationCopyAction copyAction= new LocationCopyAction(viewSite, clipboard, this);
  getTable().addFocusListener(new FocusListener() {
    IAction fViewCopyHandler;
    @Override
    public void focusLost(FocusEvent e) {
      if (fViewCopyHandler != null) {
        IActionBars actionBars= viewSite.getActionBars();
        actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), fViewCopyHandler);
        actionBars.updateActionBars();
        fViewCopyHandler= null;
      }
    }
    @Override
    public void focusGained(FocusEvent e) {
      IActionBars actionBars= viewSite.getActionBars();
      fViewCopyHandler= actionBars.getGlobalActionHandler(ActionFactory.COPY.getId());
      actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), copyAction);
      actionBars.updateActionBars();
    }
  });
  return copyAction;
}

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

/**
 * Initializes and returns the Copy action for the location viewer.
 *
 * @param viewSite the view site
 * @param clipboard the clipboard
 * @return the copy action
 */
LocationCopyAction initCopyAction(final IViewSite viewSite, final Clipboard clipboard) {
  final LocationCopyAction copyAction= new LocationCopyAction(viewSite, clipboard, this);
  getTable().addFocusListener(new FocusListener() {
    IAction fViewCopyHandler;
    @Override
    public void focusLost(FocusEvent e) {
      if (fViewCopyHandler != null) {
        IActionBars actionBars= viewSite.getActionBars();
        actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), fViewCopyHandler);
        actionBars.updateActionBars();
        fViewCopyHandler= null;
      }
    }
    @Override
    public void focusGained(FocusEvent e) {
      IActionBars actionBars= viewSite.getActionBars();
      fViewCopyHandler= actionBars.getGlobalActionHandler(ActionFactory.COPY.getId());
      actionBars.setGlobalActionHandler(ActionFactory.COPY.getId(), copyAction);
      actionBars.updateActionBars();
    }
  });
  return copyAction;
}

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

/**
 * Installs this closer on the given table opened by the given content assistant.
 *
 * @param contentAssistant the content assistant
 * @param table the table to be tracked
 */
public void install(ContentAssistant2 contentAssistant, Table table) {
  fContentAssistant= contentAssistant;
  fTable= table;
  if (Helper2.okToUse(fTable)) {
    Shell shell= fTable.getShell();
    if (Helper2.okToUse(shell)) {
      fShell= shell;
      fShell.addShellListener(this);
    }
    fTable.addFocusListener(this);
    fScrollbar= fTable.getVerticalBar();
    if (fScrollbar != null)
      fScrollbar.addSelectionListener(this);
  }
}

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

/**
 * Installs this closer on the given table opened by the given content assistant.
 *
 * @param contentAssistant the content assistant
 * @param table the table to be tracked
 */
public void install(ContentAssistant2 contentAssistant, Table table) {
  fContentAssistant= contentAssistant;
  fTable= table;
  if (Helper2.okToUse(fTable)) {
    Shell shell= fTable.getShell();
    if (Helper2.okToUse(shell)) {
      fShell= shell;
      fShell.addShellListener(this);
    }
    fTable.addFocusListener(this);
    fScrollbar= fTable.getVerticalBar();
    if (fScrollbar != null)
      fScrollbar.addSelectionListener(this);
  }
}

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

/**
 * Installs this closer on the given table opened by the given content assistant.
 *
 * @param contentAssistant the content assistant
 * @param table the table to be tracked
 * @param additionalInfoController the additional info controller, or <code>null</code>
 * @since 3.4
 */
public void install(ContentAssistant contentAssistant, Table table, AdditionalInfoController additionalInfoController) {
  fContentAssistant= contentAssistant;
  fTable= table;
  fAdditionalInfoController= additionalInfoController;
  if (Helper.okToUse(fTable)) {
    fShell= fTable.getShell();
    fDisplay= fShell.getDisplay();
    fShell.addShellListener(this);
    fTable.addFocusListener(this);
    fScrollbar= fTable.getVerticalBar();
    if (fScrollbar != null)
      fScrollbar.addSelectionListener(this);
    fDisplay.addFilter(SWT.Activate, this);
    fDisplay.addFilter(SWT.MouseVerticalWheel, this);
    fDisplay.addFilter(SWT.Deactivate, this);
    fDisplay.addFilter(SWT.MouseUp, this);
  }
}

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

/**
 * Installs this closer on the given table opened by the given content assistant.
 *
 * @param contentAssistant the content assistant
 * @param table the table to be tracked
 * @param additionalInfoController the additional info controller, or <code>null</code>
 * @since 3.4
 */
public void install(ContentAssistant contentAssistant, Table table, AdditionalInfoController additionalInfoController) {
  fContentAssistant= contentAssistant;
  fTable= table;
  fAdditionalInfoController= additionalInfoController;
  if (Helper.okToUse(fTable)) {
    fShell= fTable.getShell();
    fDisplay= fShell.getDisplay();
    fShell.addShellListener(this);
    fTable.addFocusListener(this);
    fScrollbar= fTable.getVerticalBar();
    if (fScrollbar != null)
      fScrollbar.addSelectionListener(this);
    fDisplay.addFilter(SWT.Activate, this);
    fDisplay.addFilter(SWT.MouseVerticalWheel, this);
    fDisplay.addFilter(SWT.Deactivate, this);
    fDisplay.addFilter(SWT.MouseUp, this);
  }
}

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

table.setFocus();
table.addFocusListener(fAdapter);
dialog.addFocusListener(fAdapter);

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

table.addFocusListener(new FocusAdapter() {
  @Override
  public void focusLost(FocusEvent e) {

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

table.addFocusListener(new FocusAdapter()

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

table.addFocusListener(new FocusListener() {
  public void focusGained(FocusEvent e) {
    cursor.setVisible(true);

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

table.addFocusListener(new FocusListener() {
  @Override
  public void focusGained(FocusEvent e) {

相关文章

Table类方法