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

x33g5p2x  于2022-01-23 转载在 其他  
字(4.7k)|赞(0)|评价(0)|浏览(158)

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

Label.getText介绍

[英]Returns the receiver's text, which will be an empty string if it has never been set or if the receiver is a SEPARATOR label.
[中]返回接收者的文本,如果从未设置该文本或接收者是SEPARATOR标签,则该文本将为空字符串。

代码示例

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

@Override
  public void getName(AccessibleEvent e) {
    e.result= fElementText.getText();
  }
});

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

@Override
  public void getName(AccessibleEvent e) {
    e.result= fElementText.getText();
  }
});

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

@Override
  public void getName(AccessibleEvent e) {
    e.result= fElementText.getText();
  }
});

代码示例来源:origin: org.codehaus.openxma/xmartclient

/**
 * Returns the text of the label which may be null, if the label is unknown.
 */
private String getLabelText () {
  return label_ != null ? label_.getText() : null;
}

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

@Override
String getNameText () {
  return getText ();
}

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

/**
 * Sets the text to the given text.
 *
 * @param text the text to use
 */
public void setText(String text) {
  if (text == null) {
    text= ""; //$NON-NLS-1$
  }
  if (!text.equals(fElementText.getText())) {
    fElementText.setText(text);
  }
}

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

/**
 * Sets the text to the given text.
 *
 * @param text the text to use
 */
public void setText(String text) {
  if (text == null) {
    text= ""; //$NON-NLS-1$
  }
  if (!text.equals(fElementText.getText())) {
    fElementText.setText(text);
  }
}

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

@Override
  public void getName(AccessibleEvent e) {
    e.result = LegacyActionTools.removeMnemonics(headerLabel
        .getText());
  }
});

代码示例来源:origin: de.dentrassi.eclipse.neoscada.chart/org.eclipse.scada.chart.swt

public String getTitle ()
{
  checkWidget ();
  return this.title.getText ();
}

代码示例来源:origin: BiglySoftware/BiglyBT

@Override
 public void mouseDown(MouseEvent arg0) {
   Utils.launch((String) ((Label) arg0.widget).getText());
 }
});

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

@Override
boolean mnemonicMatch (char key) {
  char mnemonic = findMnemonic (getText ());
  if (mnemonic == '\0') return false;
  return Character.toUpperCase (key) == Character.toUpperCase (mnemonic);
}

代码示例来源:origin: org.eclipse.neoscada.chart/org.eclipse.scada.chart.swt

public String getTitle ()
{
  checkWidget ();
  return this.title.getText ();
}

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

@Override
  public void run() {
    if (!statusLabel.getText().equals(statusString)) {
      statusLabel.setText(statusString);
      composite.redraw();
    }
  }
});

代码示例来源:origin: BiglySoftware/BiglyBT

@Override
public void mouseDoubleClick(MouseEvent arg0) {
  Utils.launch((String) ((Label) arg0.widget).getText());
}
@Override

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

/**
 * Returns the width of this element.
 *
 * @return current width of this element
 */
public int getWidth() {
  int result= 2;
  if (fElementImage.getImage() != null)
    result+= fElementImage.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
  if (fTextVisible && fElementText.getText().length() > 0)
    result+= fElementText.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
  return result;
}

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

/**
 * Returns the width of this element.
 *
 * @return current width of this element
 */
public int getWidth() {
  int result= 2;
  if (fElementImage.getImage() != null)
    result+= fElementImage.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
  if (fTextVisible && fElementText.getText().length() > 0)
    result+= fElementText.computeSize(SWT.DEFAULT, SWT.DEFAULT).x;
  return result;
}

代码示例来源:origin: BiglySoftware/BiglyBT

protected void
  copyToClipboard()
  {
    new Clipboard(parent.getDisplay()).setContents(new Object[] {public_key_value.getText()}, new Transfer[] {TextTransfer.getInstance()});
  }
});

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

private static void renderText( Label label ) {
 String newValue = label.getText();
 if( WidgetLCAUtil.hasChanged( label, PROP_TEXT, newValue, "" ) ) {
  String text = newValue;
  if( !isMarkupEnabledFor( label ) ) {
   text = MnemonicUtil.removeAmpersandControlCharacters( newValue );
  }
  getRemoteObject( label ).set( PROP_TEXT, text );
 }
}

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

@Override
void preserveValues( Label label ) {
 preserveProperty( label, PROP_TEXT, label.getText() );
 preserveProperty( label, PROP_IMAGE, label.getImage() );
 preserveProperty( label, PROP_ALIGNMENT, getAlignment( label ) );
}

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

private static void renderMnemonicIndex( Label label ) {
 if( !isMarkupEnabledFor( label ) ) {
  String text = label.getText();
  if( WidgetLCAUtil.hasChanged( label, PROP_TEXT, text, "" ) ) {
   int mnemonicIndex = MnemonicUtil.findMnemonicCharacterIndex( text );
   if( mnemonicIndex != -1 ) {
    getRemoteObject( label ).set( PROP_MNEMONIC_INDEX, mnemonicIndex );
   }
  }
 }
}

相关文章