public void setEditable( boolean canEdit ) { styledText.setEditable( canEdit ); }
cmdResult.setEditable(false); cmdResult.addMouseListener(new MouseAdapter() { @Override
helpLabel.setText( "Help" ); helpLabel.setCaret( null ); helpLabel.setEditable( false );
@Override public void setEditable(boolean editable) { if (fTextWidget != null) fTextWidget.setEditable(editable); }
@Override public void setEditable(boolean editable) { if (fTextWidget != null) fTextWidget.setEditable(editable); }
@Override void doSetBooleanValue(Object source, boolean value) { ((StyledText) source).setEditable(value); }
public void run() { StyledText text = getTextWidget(); if (text != null && !text.isDisposed()) { text.setEditable(false); } } });
@Override public void run() { StyledText text = getTextWidget(); if (text != null && !text.isDisposed()) { text.setEditable(false); } } });
@Override public void run() { StyledText text = getTextWidget(); if (text != null && !text.isDisposed()) { text.setEditable(false); } } });
/** * Creates page 2 of the multi-page editor, which shows the sorted text. */ void createPage2() { Composite composite = new Composite(getContainer(), SWT.NONE); FillLayout layout = new FillLayout(); composite.setLayout(layout); text = new StyledText(composite, SWT.H_SCROLL | SWT.V_SCROLL); text.setEditable(false); int index = addPage(composite); setPageText(index, "Preview"); }
private StyledText createCodeView(Composite parent) { int styles= SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.FULL_SELECTION; StyledText styledText= new StyledText(parent, styles); styledText.setBackground(fBackgroundColor); styledText.setForeground(fForegroundColor); styledText.setEditable(false); return styledText; }
private StyledText createCodeView(Composite parent) { int styles= SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.FULL_SELECTION; StyledText styledText= new StyledText(parent, styles); styledText.setBackground(fBackgroundColor); styledText.setForeground(fForegroundColor); styledText.setEditable(false); return styledText; }
private StyledText createCodeView(Composite parent) { int styles= SWT.V_SCROLL | SWT.H_SCROLL | SWT.MULTI | SWT.FULL_SELECTION; StyledText styledText= new StyledText(parent, styles); styledText.setBackground(fBackgroundColor); styledText.setForeground(fForegroundColor); styledText.setEditable(false); return styledText; }
/** * Creates page 2 of the multi-page editor, which shows the sorted text. */ void createPage2() { Composite composite = new Composite(getContainer(), SWT.NONE); FillLayout layout = new FillLayout(); composite.setLayout(layout); text = new StyledText(composite, SWT.H_SCROLL | SWT.V_SCROLL); text.setEditable(false); int index = addPage(composite); setPageText(index, "Preview"); }
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); }
public FileChangeSourceViewer(Composite parent, IVerticalRuler ruler, int styles) { super(parent, ruler, styles); setColors(); StyledText textWidget= getTextWidget(); textWidget.setEditable(false); textWidget.setFont(JFaceResources.getFont(PreferenceConstants.EDITOR_TEXT_FONT)); }
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; }
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; }
public MinimapWidget(Composite parent, ITextViewer viewer) { fEditorViewer = viewer; // Create minimap styled text fMinimapTextWidget = new StyledText(parent, SWT.MULTI | SWT.READ_ONLY); fMinimapTextWidget.setEditable(false); fMinimapTextWidget.setCursor(fMinimapTextWidget.getDisplay().getSystemCursor(SWT.CURSOR_ARROW)); // Initialize trackers fEditorTracker = new EditorTracker(); fMinimapTracker = new MinimapTracker(); }