本文整理了Java中org.eclipse.swt.widgets.Text.setFont()
方法的一些代码示例,展示了Text.setFont()
的具体用法。这些代码示例主要来源于Github
/Stackoverflow
/Maven
等平台,是从一些精选项目中提取出来的代码,具有较强的参考意义,能在一定程度帮忙到你。Text.setFont()
方法的具体详情如下:
包路径:org.eclipse.swt.widgets.Text
类名称:Text
方法名:setFont
暂无
代码示例来源:origin: pentaho/pentaho-kettle
wRegExScriptCompile.setLayoutData( fdRegExScriptCompile );
wRegExScriptCompile.setEditable( false );
wRegExScriptCompile.setFont( guiresource.getFontNote() );
代码示例来源:origin: BiglySoftware/BiglyBT
public void
setNonProportionalFont()
{
txtInfo.setFont( np_font );
}
代码示例来源:origin: stackoverflow.com
//Put this method in your Application class
public static void addMessage(Message message){
Text username = new Text(message.getUsername());
username.setFont(Font.font("Verdana", FontWeight.BOLD, 14));
Text date = new Text(message.getTimestamp());
date.setFont(Font.font("Verdana", FontWeight.ITALIC, 12));
date.setFill(Color.GRAY);
Text message = new Text(message.getMessage());
date.setFont(Font.font("Courier New", 12));
mainBox.getChildren().Add(new HBox(username, date, message)); //mainBox being a VBox that stores all your HBoxes.
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.ant.ui
private Text createText(Composite parent) {
GridData gd;
Text newText = new Text(parent, SWT.MULTI | SWT.WRAP | SWT.BORDER | SWT.V_SCROLL | SWT.READ_ONLY);
newText.setFont(parent.getFont());
gd = new GridData(GridData.FILL_HORIZONTAL);
gd.heightHint = 40;
gd.widthHint = IDialogConstants.ENTRY_FIELD_WIDTH;
newText.setLayoutData(gd);
return newText;
}
代码示例来源:origin: org.eclipse.mylyn.builds/ui
protected Text createTextReadOnly(Composite parent, FormToolkit toolkit, String value, int style) {
Text text = new Text(parent, SWT.FLAT | SWT.READ_ONLY | style);
text.setFont(EditorUtil.TEXT_FONT);
text.setData(FormToolkit.KEY_DRAW_BORDER, Boolean.FALSE);
text.setText(value);
toolkit.adapt(text, false, false);
return text;
}
代码示例来源:origin: openaudible/openaudible
public static Text newText(Composite parent, int text_attributes) {
Text text = new Text(parent, text_attributes);
text.setFont(fonts.dialogFont());
// text.setText(value);
text.setLayoutData(new GridData(GridData.VERTICAL_ALIGN_BEGINNING | GridData.FILL_HORIZONTAL));
WidgetShop.tweakTextWidget(text);
setBG(text);
return text;
}
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
@Override
public void setFont(Font font) {
super.setFont(font);
((Text) messageField.getControl()).setFont(font);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
@Override
public void setFont(Font font) {
super.setFont(font);
((Text) messageField.getControl()).setFont(font);
}
代码示例来源:origin: org.eclipse.scout.sdk.s2e/org.eclipse.scout.sdk.s2e.nls
public void setDefaultFont(Font font) {
m_font = font;
m_smartDialog.setFont(font);
m_text.setFont(font);
m_label.setFont(font);
}
代码示例来源:origin: org.eclipse/org.eclipse.ui.navigator
private void createDescriptionText(Composite composite) {
descriptionText = new Text(composite, SWT.WRAP | SWT.V_SCROLL
| SWT.BORDER);
descriptionText.setFont(composite.getFont());
descriptionText.setBackground(composite.getBackground());
GridData descriptionTextGridData = new GridData(
GridData.FILL_HORIZONTAL);
descriptionTextGridData.heightHint = convertHeightInCharsToPixels(3);
descriptionText.setLayoutData(descriptionTextGridData);
}
代码示例来源:origin: org.eclipse/org.eclipse.jdt.debug.ui
/**
* Creates the text widget for reporting errors
*/
protected void createErrorText(Composite parent) {
fErrorText= new Text(parent, SWT.READ_ONLY);
fErrorText.setLayoutData(new GridData(GridData.GRAB_HORIZONTAL
| GridData.HORIZONTAL_ALIGN_FILL));
fErrorText.setBackground(fErrorText.getDisplay()
.getSystemColor(SWT.COLOR_WIDGET_BACKGROUND));
fErrorText.setFont(parent.getFont());
}
代码示例来源:origin: org.eclipse.rap/org.eclipse.rap.jface
/**
* Set the font to display with
* @param fontData
*/
public void setFont(FontData[] fontData) {
if (font != null) {
font.dispose();
}
font = new Font(text.getDisplay(), fontData);
text.setFont(font);
}
代码示例来源:origin: org.eclipse/org.eclipse.wst.xsd.ui
public void setFont (Font font) {
super.setFont (font);
this.font = font;
text.setFont (font);
list.setFont (font);
internalLayout (true);
}
public void setForeground (Color color) {
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.swt.win32.win32.x86
@Override
public void setFont (Font font) {
super.setFont (font);
this.font = font;
text.setFont (font);
list.setFont (font);
internalLayout (true);
}
@Override
代码示例来源:origin: org.eclipse.scout.sdk.deps/org.eclipse.jface
/**
* Set the font to display with
* @param fontData
*/
public void setFont(FontData[] fontData) {
if (font != null) {
font.dispose();
}
font = new Font(text.getDisplay(), fontData);
text.setFont(font);
}
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.s390x
@Override
public void setFont (Font font) {
super.setFont (font);
this.font = font;
text.setFont (font);
list.setFont (font);
internalLayout (true);
}
@Override
代码示例来源:origin: org.eclipse.swt.cocoa.macosx/x86_64
public void setFont (Font font) {
super.setFont (font);
this.font = font;
text.setFont (font);
list.setFont (font);
internalLayout (true);
}
public void setForeground (Color color) {
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.linux.ppc
@Override
public void setFont (Font font) {
super.setFont (font);
this.font = font;
text.setFont (font);
list.setFont (font);
internalLayout (true);
}
@Override
代码示例来源:origin: org.eclipse.platform/org.eclipse.swt.gtk.aix.ppc
@Override
public void setFont (Font font) {
super.setFont (font);
this.font = font;
text.setFont (font);
list.setFont (font);
internalLayout (true);
}
@Override
代码示例来源:origin: org.eclipse.platform/org.eclipse.jface
/**
* Set the font to display with
* @param fontData
*/
public void setFont(FontData[] fontData) {
if (font != null) {
font.dispose();
}
font = new Font(text.getDisplay(), fontData);
text.setFont(font);
}
内容来源于网络,如有侵权,请联系作者删除!