wRegExScriptCompile.setLayoutData( fdRegExScriptCompile ); wRegExScriptCompile.setEditable( false ); wRegExScriptCompile.setFont( guiresource.getFontNote() );
public void setNonProportionalFont() { txtInfo.setFont( np_font ); }
//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. }
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; }
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; }
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; }
@Override public void setFont(Font font) { super.setFont(font); ((Text) messageField.getControl()).setFont(font); }
@Override public void setFont(Font font) { super.setFont(font); ((Text) messageField.getControl()).setFont(font); }
public void setDefaultFont(Font font) { m_font = font; m_smartDialog.setFont(font); m_text.setFont(font); m_label.setFont(font); }
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); }
/** * 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()); }
/** * 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); }
public void setFont (Font font) { super.setFont (font); this.font = font; text.setFont (font); list.setFont (font); internalLayout (true); } public void setForeground (Color color) {
@Override public void setFont (Font font) { super.setFont (font); this.font = font; text.setFont (font); list.setFont (font); internalLayout (true); } @Override
/** * 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); }
@Override public void setFont (Font font) { super.setFont (font); this.font = font; text.setFont (font); list.setFont (font); internalLayout (true); } @Override
public void setFont (Font font) { super.setFont (font); this.font = font; text.setFont (font); list.setFont (font); internalLayout (true); } public void setForeground (Color color) {
@Override public void setFont (Font font) { super.setFont (font); this.font = font; text.setFont (font); list.setFont (font); internalLayout (true); } @Override
@Override public void setFont (Font font) { super.setFont (font); this.font = font; text.setFont (font); list.setFont (font); internalLayout (true); } @Override
/** * 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); }