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

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

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

Text.forceFocus介绍

暂无

代码示例

代码示例来源:origin: org.xworker/xworker_swt

@Override
public void disposed(Object result) {
  String textStr = (String) result;
  if(textStr != null){
    text.setText(textStr);
    text.forceFocus();
  }
}

代码示例来源:origin: org.xworker/xworker_swt

public static void shellDispoed(ActionContext actionContext) {
    final Text text = actionContext.getObject("text");
    text.forceFocus();
  }
}

代码示例来源:origin: org.xworker/xworker_swt

@Override
@ActionParams(names="value")
public void setValue(Object value, ActionContext actionContext) {
  if(value != null) {
    text.setText(String.valueOf(value));
  }else {
    text.setText("");
  }
  text.selectAll();
  text.forceFocus();
}

代码示例来源:origin: org.xworker/xworker_swt

@Override
@ActionParams(names="value")
public void setValue(Object value, ActionContext actionContext) {
  if(value != null) {
    text.setText(String.valueOf(value));
  }else {
    text.setText("");
  }
  text.selectAll();
  text.forceFocus();
}

代码示例来源:origin: org.xworker/xworker_swt

public void run() {
    try {
      shell.dispose();
      
      if(text.isDisposed() == false) {
        text.forceFocus();
      }
    }catch(Exception e) {
      logger.warn("Text dispose error", e);
    }
  }
});

代码示例来源:origin: org.xworker/xworker_swt

@Override
@ActionParams(names="value")
public void setValue(Object value, ActionContext actionContext) {
  actions.doAction("setValue", actionContext, "value", value);
  text.forceFocus();
}

代码示例来源:origin: org.xworker/xworker_swt

@Override
@ActionParams(names="value")
public void setValue(Object value, ActionContext actionContext) {
  actions.doAction("setValue", actionContext, "value", value);
  text.forceFocus();
}

代码示例来源:origin: org.xworker/xworker_swt

@Override
@ActionParams(names="value")
public void setValue(Object value, ActionContext actionContext) {
  actions.doAction("setValue", actionContext, "value", value);
  text.forceFocus();
}

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

protected Control createContents(Composite parent) {
  Control control = super.createContents(parent);
  attributeNameField.forceFocus();
  attributeNameField.selectAll();
  updateErrorMessage();
  return control;
}

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

protected Control createContents(Composite parent) {
  Control control = super.createContents(parent);
  elementNameField.forceFocus();
  elementNameField.selectAll();
  updateErrorMessage();
  return control;
}

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

protected Control createContents(Composite parent)  
{
 Control control = super.createContents(parent);
 nameField.forceFocus();
 nameField.selectAll();  
 updateErrorMessage();
 return control;
}

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

/**
 * @see org.eclipse.jface.dialogs.Dialog#initializeBounds()
 */
@Override
protected void initializeBounds() {
  super.initializeBounds();
  Point bestSize = getShell().computeSize(convertHorizontalDLUsToPixels(dialogMinWidth),
      SWT.DEFAULT);
  
  /** The URL Label might need more space than 300 DLUs */
  int bestSizeWidth = getShell().computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
  if (bestSizeWidth > bestSize.x)
    bestSize.x = bestSizeWidth;
  Shell shell = getShell();
  
  getShell().setSize(bestSize.x, bestSize.y);
  LayoutShop.positionShell(getShell());
  Button ok = getButton(0);
  
  if (userString.length() == 0)
    user.forceFocus();
  else if (passwordString.length() == 0)
    password.forceFocus();
  else
    ok.forceFocus();
  
}

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

/**
 * Updates the filter from the UI state.
 * Must be done here rather than by extending open()
 * because after super.open() is called, the widgetry is disposed.
 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
 */
@Override
protected void okPressed() {
  if (!isMaxCallDepthValid()) {
    if (fMaxCallDepth.forceFocus()) {
      fMaxCallDepth.setSelection(0, fMaxCallDepth.getCharCount());
      fMaxCallDepth.showSelection();
    }
  }
  updateFilterFromUI();
  super.okPressed();
}

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

/**
 * Updates the filter from the UI state.
 * Must be done here rather than by extending open()
 * because after super.open() is called, the widgetry is disposed.
 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
 */
protected void okPressed() {
  if (!isMaxCallDepthValid()) {
    if (fMaxCallDepth.forceFocus()) {
      fMaxCallDepth.setSelection(0, fMaxCallDepth.getCharCount());
      fMaxCallDepth.showSelection();
    }
  }
  
  updateFilterFromUI();
  super.okPressed();
}

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

/**
 * Updates the filter from the UI state.
 * Must be done here rather than by extending open()
 * because after super.open() is called, the widgetry is disposed.
 * @see org.eclipse.jface.dialogs.Dialog#okPressed()
 */
@Override
protected void okPressed() {
  if (!isMaxCallDepthValid()) {
    if (fMaxCallDepth.forceFocus()) {
      fMaxCallDepth.setSelection(0, fMaxCallDepth.getCharCount());
      fMaxCallDepth.showSelection();
    }
  }
  updateFilterFromUI();
  super.okPressed();
}

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

/**
 * Updates the filter from the UI state.
 * Must be done here rather than by extending open()
 * because after super.open() is called, the widgetry is disposed.
 */
@Override
protected void okPressed() {
  try {
    int parseResult = Integer.parseInt(this.markerLimit.getText());
    if (parseResult < 1) {
      throw new NumberFormatException();
    }
    updateFilterFromUI(getFilter());
    super.okPressed();
  } catch (NumberFormatException eNumberFormat) {
    MessageBox messageBox = new MessageBox(getShell(), SWT.OK
        | SWT.APPLICATION_MODAL | SWT.ICON_ERROR);
    messageBox.setText(TaskListMessages.TaskList_titleMarkerLimitInvalid);
    messageBox.setMessage(TaskListMessages.TaskList_messageMarkerLimitInvalid);
    messageBox.open();
    if (markerLimit.forceFocus()) {
      markerLimit.setSelection(0, markerLimit.getCharCount());
      markerLimit.showSelection();
    }
  }
}

代码示例来源:origin: stackoverflow.com

next.forceFocus();

代码示例来源:origin: pentaho/big-data-plugin

nameOfNamedCluster.forceFocus();

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

searchTextBox.forceFocus();

相关文章

Text类方法