props.setLook( wlDesc ); wlDesc.setLayoutData( fdlDesc );
cmdResult.setLayoutData(new GridData(SWT.FILL, SWT.FILL, true, true, 1, 1)); cmdResult.setEditable(false); cmdResult.addMouseListener(new MouseAdapter() {
helpLabelFormData.left = new FormAttachment( 0, 40 ); helpLabelFormData.bottom = new FormAttachment( 100, -27 ); helpLabel.setLayoutData( helpLabelFormData );
wicon.setImage( image ); wicon.setLayoutData( new FormDataBuilder().top().right( 100, 0 ).result() ); styledText.setLayoutData( new FormDataBuilder().top( new FormAttachment( wicon, 0, 0 ) ).left().right( 100, 0 ).bottom( 100, 0 ).result() ); } else {
fdText.top = new FormAttachment( (Control) toolbar.getManagedObject(), 0 ); fdText.bottom = new FormAttachment( 100, 0 ); jobLogText.setLayoutData( fdText );
fdText.top = new FormAttachment( (Control) toolbar.getManagedObject(), 0 ); fdText.bottom = new FormAttachment( 100, 0 ); transLogText.setLayoutData( fdText );
@Override public void setLayoutData( Object layoutData ) { if ( layoutData instanceof GridData ){ GridData gd = (GridData)layoutData; Integer hhint = (Integer)ui_text_area.getProperty( UIComponent.PT_HEIGHT_HINT ); if ( hhint != null ){ gd.heightHint = hhint; } } text_area.setLayoutData(layoutData); }
protected Control createCustomArea(Composite parent) { // TODO Auto-generated method createCustomArea this.messageArea = new StyledText(parent, SWT.WRAP | SWT.READ_ONLY | SWT.H_SCROLL | SWT.V_SCROLL | SWT.BORDER); this.messageArea.setLayout(new GridLayout()); GridData gd = new GridData(SWT.LEFT, SWT.TOP, true, true); //size hints gd.widthHint = 600; gd.heightHint = 300; messageArea.setLayoutData(gd); return messageArea; }
public Control createControl(Composite parent) { fStyledText= new StyledText(parent, SWT.FLAT | SWT.BORDER | SWT.READ_ONLY); final GridData data= new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL); fStyledText.setLayoutData(data); configureStyledText(fText, fEnabled); return fStyledText; }
private void selectedBook(GridComposite row) { Composite group = row.newGroup("Audio Book Info", 1); group.setLayoutData(new GridData(gdFlags | GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL)); info = new BookInfoPanel(group); info.setLayoutData(new GridData(gdFlags | GridData.FILL_HORIZONTAL | GridData.GRAB_HORIZONTAL)); SummaryPanel p = new SummaryPanel(group); p.summary.setLayoutData(new GridData(gdFlags | GridData.FILL_BOTH | GridData.GRAB_HORIZONTAL | GridData.GRAB_VERTICAL)); } }
SummaryPanel(Composite parent) { summary = new StyledText(parent, SWT.WRAP | SWT.MULTI | SWT.READ_ONLY | SWT.V_SCROLL); summary.setCaret(null); summary.setEditable(false); GridData gd = new GridData(GridData.FILL_BOTH | GridData.GRAB_VERTICAL | GridData.GRAB_HORIZONTAL); gd.horizontalSpan = 2; // gd.heightHint = 100; summary.setLayoutData(gd); BookNotifier.getInstance().addListener(this); }
private StyledText createText(Composite parent, String text) { StyledText widget = new StyledText(parent, SWT.READ_ONLY | SWT.MULTI); GridData data= new GridData(GridData.FILL_HORIZONTAL); widget.setLayoutData(data); if (text != null) widget.setText(text); widget.setBackground(fBackgroundColor); widget.setForeground(fForegroundColor); widget.setCaret(null); return widget; }
private StyledText createText(Composite parent, String text) { StyledText widget = new StyledText(parent, SWT.READ_ONLY | SWT.MULTI); GridData data= new GridData(GridData.FILL_HORIZONTAL); widget.setLayoutData(data); if (text != null) widget.setText(text); widget.setBackground(fBackgroundColor); widget.setForeground(fForegroundColor); widget.setCaret(null); return widget; }
private void configureUIStyledText(GridData data, StyledText styledText) { // Configure the underlying styled text widget styledText.setMenu(fPage.getPDEEditor().getContextMenu()); // Force borders styledText.setData(FormToolkit.KEY_DRAW_BORDER, FormToolkit.TEXT_BORDER); styledText.setLayoutData(data); }
private Control createControl(Composite parent) { fStyledText= new StyledText(parent, SWT.FLAT | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); fStyledText.setEditable(false); Cursor arrowCursor= fStyledText.getDisplay().getSystemCursor(SWT.CURSOR_ARROW); fStyledText.setCursor(arrowCursor); // Don't set caret to 'null' as this causes https://bugs.eclipse.org/293263 // fStyledText.setCaret(null); final GridData data= new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL); fStyledText.setLayoutData(data); configureStyledText(fText, fEnabled); return fStyledText; }
private Control createControl(Composite parent) { fStyledText= new StyledText(parent, SWT.FLAT | SWT.BORDER | SWT.H_SCROLL | SWT.V_SCROLL); fStyledText.setEditable(false); Cursor arrowCursor= fStyledText.getDisplay().getSystemCursor(SWT.CURSOR_ARROW); fStyledText.setCursor(arrowCursor); // Don't set caret to 'null' as this causes https://bugs.eclipse.org/293263 // fStyledText.setCaret(null); final GridData data= new GridData(GridData.FILL_HORIZONTAL | GridData.FILL_VERTICAL); fStyledText.setLayoutData(data); configureStyledText(fText, fEnabled); return fStyledText; }
void createStyledText() { text = new StyledText (shell, SWT.BORDER | SWT.MULTI | SWT.V_SCROLL | SWT.H_SCROLL); GridData spec = new GridData(); spec.horizontalAlignment = GridData.FILL; spec.grabExcessHorizontalSpace = true; spec.verticalAlignment = GridData.FILL; spec.grabExcessVerticalSpace = true; text.setLayoutData(spec); text.addLineStyleListener(lineStyler); text.setEditable(false); Color bg = Display.getDefault().getSystemColor(SWT.COLOR_GRAY); text.setBackground(bg); }
public static StyledText createStyledText(final Composite parent, final String text, final int color, final boolean grabExcessHorizontalSpace) { final StyledText styledText = new StyledText(parent, SWT.WRAP); styledText.setEnabled(false); styledText.setDoubleClickEnabled(false); styledText.setLayoutData(new GridData(SWT.FILL, SWT.CENTER, grabExcessHorizontalSpace, false)); styledText.setEditable(false); styledText.setText(text); styledText.setForeground(createColor(color)); return styledText; }
protected Control createDialogArea(Composite parent) { GridData gd = new GridData(GridData.FILL_BOTH); StyledText text = new StyledText(parent, SWT.MULTI | SWT.READ_ONLY | SWT.WRAP | SWT.H_SCROLL | SWT.V_SCROLL); text.setLayoutData(gd); text.setForeground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_FOREGROUND)); text.setBackground(parent.getDisplay().getSystemColor(SWT.COLOR_INFO_BACKGROUND)); text.setText(resultString); return text; } }
public SourceCodeArea(final Composite parent) { super(parent, null, null, false, SWT.READ_ONLY | SWT.WRAP, store); configure(configuration); getTextWidget().setFont(ExtdocUtils.CODEFONT); setEditable(false); getTextWidget().setLayoutData(GridDataFactory.fillDefaults().indent(20, 0).create()); }