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

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

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

Text.getLayoutData介绍

暂无

代码示例

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

@Override
protected void adjustForNumColumns(int numColumns) {
  GridData gd = (GridData) textField.getLayoutData();
  gd.horizontalSpan = numColumns - 1;
  // We only grab excess space if we have to
  // If another field editor has more columns then
  // we assume it is setting the width.
  gd.grabExcessHorizontalSpace = gd.horizontalSpan == 1;
}

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

@Override
protected void adjustForNumColumns(int numColumns) {
  GridData gd = (GridData) textField.getLayoutData();
  gd.horizontalSpan = numColumns - 1;
  // We only grab excess space if we have to
  // If another field editor has more columns then
  // we assume it is setting the width.
  gd.grabExcessHorizontalSpace = gd.horizontalSpan == 1;
}

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

protected void adjustForNumColumns(int numColumns) {
  GridData gd = (GridData) textField.getLayoutData();
  gd.horizontalSpan = numColumns - 1;
  // We only grab excess space if we have to
  // If another field editor has more columns then
  // we assume it is setting the width.
  gd.grabExcessHorizontalSpace = gd.horizontalSpan == 1;
}

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

private void limitTextWidth(FormEntry entry) {
  GridData gd = (GridData) entry.getText().getLayoutData();
  gd.widthHint = 30;
}

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

private void limitTextWidth(FormEntry entry) {
  GridData gd = (GridData) entry.getText().getLayoutData();
  gd.widthHint = 30;
}

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

protected void limitTextWidth(FormEntry entry) {
  GridData gd = (GridData) entry.getText().getLayoutData();
  gd.widthHint = 30;
}

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

private void limitTextWidth(FormEntry entry) {
  GridData gd = (GridData) entry.getText().getLayoutData();
  gd.widthHint = 30;
}

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

protected void adjustForNumColumns(int numColumns) {
  ((GridData) getTextControl().getLayoutData()).horizontalSpan = numColumns - 2;
}

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

@Override
protected void adjustForNumColumns(int numColumns) {
  ((GridData) getTextControl().getLayoutData()).horizontalSpan = numColumns - 2;
}

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

private void limitTextWidth(FormEntry entry) {
  GridData gd = (GridData) entry.getText().getLayoutData();
  gd.widthHint = 30;
}

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

private void limitTextWidth(FormEntry entry) {
  GridData gd = (GridData) entry.getText().getLayoutData();
  gd.widthHint = 30;
}

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

private void limitTextWidth(FormEntry entry) {
  GridData gd = (GridData) entry.getText().getLayoutData();
  gd.widthHint = 30;
}

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

private void limitTextWidth(FormEntry entry) {
  GridData gd = (GridData) entry.getText().getLayoutData();
  gd.widthHint = 30;
}

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

@Override
protected void adjustForNumColumns(int numColumns) {
  ((GridData) getTextControl().getLayoutData()).horizontalSpan = numColumns - 2;
}

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

/**
   * If GridData was used, set the width hint.  If TableWrapData was used
   * set the max width.  If no layout data was specified, this method does
   * nothing.
   * @param width
   */
  public void setTextWidthHint(int width) {
    Object data = getText().getLayoutData();
    if (data == null) {
      return;
    } else if (data instanceof GridData) {
      ((GridData) data).widthHint = width;
    } else if (data instanceof TableWrapData) {
      ((TableWrapData) data).maxWidth = width;
    }
  }
}

代码示例来源:origin: org.apache.uima/uimaj-ep-configurator

/**
 * New description.
 *
 * @param twoCol the two col
 * @param tip the tip
 * @return the text
 */
protected Text newDescription(Composite twoCol, String tip) {
 setTextAndTip(new Label(twoCol, SWT.NONE), S_DESCRIPTION, tip);
 Text t = new Text(twoCol, SWT.BORDER | SWT.MULTI | SWT.WRAP | SWT.V_SCROLL);
 t.setLayoutData(new GridData(GridData.FILL_BOTH));
 ((GridData) t.getLayoutData()).heightHint = 100;
 t.setToolTipText(tip);
 return t;
}

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

/**
 * Sets hint text to be displayed and requests the layout
 *
 * @param toDisplay
 */
private void setHintTextToDisplay(boolean toDisplay) {
  GridData data = (GridData) hintText.getLayoutData();
  data.exclude = !toDisplay;
  hintText.setVisible(toDisplay);
  hintText.requestLayout();
  this.displayHintText = toDisplay;
}

代码示例来源:origin: ajermakovics/eclipse-instasearch

@Override
  protected void doFillIntoGrid(Composite parent, int numColumns) {
    super.doFillIntoGrid(parent, numColumns);
    Text txt = getTextControl();
    GridData gd = (GridData) txt.getLayoutData();
    if( gd != null )
      gd.widthHint = 250;
  }
};

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

public void createControl(Composite parent) {
  Group group = SWTFactory.createGroup(parent, PDEUIMessages.MainPreferencePage_runtimeWorkspaceGroup, 2, 1, GridData.FILL_HORIZONTAL);
  Composite radios = SWTFactory.createComposite(group, 2, 2, GridData.FILL_HORIZONTAL, 0, 0);
  fRuntimeWorkspaceLocationRadio = new Button(radios, SWT.RADIO);
  fRuntimeWorkspaceLocationRadio.setText(PDEUIMessages.MainPreferencePage_runtimeWorkspace_asLocation);
  fRuntimeWorkspaceLocationRadio.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
  fRuntimeWorkspaceLocationRadio.setSelection(true);
  fRuntimeWorkspacesContainerRadio = new Button(radios, SWT.RADIO);
  fRuntimeWorkspacesContainerRadio.setText(PDEUIMessages.MainPreferencePage_runtimeWorkspace_asContainer);
  fRuntimeWorkspacesContainerRadio.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
  createText(group, PDEUIMessages.WorkspaceDataBlock_location, 0);
  ((GridData) fLocationText.getLayoutData()).widthHint = 200;
  fRuntimeWorkspaceLocation = fLocationText;
  Composite buttons = SWTFactory.createComposite(group, 3, 2, GridData.HORIZONTAL_ALIGN_END | GridData.GRAB_HORIZONTAL, 0, 0);
  createButtons(buttons, new String[] {PDEUIMessages.MainPreferencePage_runtimeWorkspace_workspace, PDEUIMessages.MainPreferencePage_runtimeWorkspace_fileSystem, PDEUIMessages.MainPreferencePage_runtimeWorkspace_variables});
}

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

public void createControl(Composite parent) {
  Group group = SWTFactory.createGroup(parent, PDEUIMessages.MainPreferencePage_junitWorkspaceGroup, 2, 1, GridData.FILL_HORIZONTAL);
  Composite radios = SWTFactory.createComposite(group, 2, 2, GridData.FILL_HORIZONTAL, 0, 0);
  fJUnitWorkspaceLocationRadio = new Button(radios, SWT.RADIO);
  fJUnitWorkspaceLocationRadio.setText(PDEUIMessages.MainPreferencePage_junitWorkspace_asLocation);
  fJUnitWorkspaceLocationRadio.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
  fJUnitWorkspaceLocationRadio.setSelection(true);
  fJUnitWorkspacesContainerRadio = new Button(radios, SWT.RADIO);
  fJUnitWorkspacesContainerRadio.setText(PDEUIMessages.MainPreferencePage_junitWorkspace_asContainer);
  fJUnitWorkspacesContainerRadio.setLayoutData(new GridData(GridData.HORIZONTAL_ALIGN_BEGINNING));
  createText(group, PDEUIMessages.WorkspaceDataBlock_location, 0);
  ((GridData) fLocationText.getLayoutData()).widthHint = 200;
  fJUnitWorkspaceLocation = fLocationText;
  Composite buttons = SWTFactory.createComposite(group, 3, 2, GridData.HORIZONTAL_ALIGN_END | GridData.GRAB_HORIZONTAL, 0, 0);
  createButtons(buttons, new String[] {PDEUIMessages.MainPreferencePage_junitWorkspace_workspace, PDEUIMessages.MainPreferencePage_junitWorkspace_fileSystem, PDEUIMessages.MainPreferencePage_junitWorkspace_variables});
}

相关文章

微信公众号

最新文章

更多

Text类方法