@Override public void run() { BrowserInformationControlInput previous= (BrowserInformationControlInput) fInfoControl.getInput().getPrevious(); if (previous != null) { fInfoControl.setInput(previous); } }
@Override public int read() throws IOException { int c= super.read(); if (c != -1) ++ fCounter; return c; }
public IInformationControl doCreateInformationControl(Shell parent) { int shellStyle= SWT.RESIZE | SWT.TOOL; int style= SWT.V_SCROLL | SWT.H_SCROLL; if (BrowserInformationControl.isAvailable(parent)) return new BrowserInformationControl(parent, shellStyle, style); else return new DefaultInformationControl(parent, shellStyle, style, new HTMLTextPresenter(false)); } }
/** * Creates a default information control with the given shell as parent. An information * presenter that can handle simple HTML is used to process the information to be displayed. * * @param parent the parent shell * @param statusFieldText the text to be used in the status field or <code>null</code> to hide the status field * @since 3.4 */ public DefaultInformationControl(Shell parent, String statusFieldText) { this(parent, statusFieldText, new HTMLTextPresenter(true)); }
@Override protected String computeSubstitution(int c) throws IOException { if (c == '<') return processHTMLTag(); else if (fIgnore) return EMPTY_STRING; else if (c == '&') return processEntity(); return null; }
/** * @noreference This method is not intended to be referenced by clients. */ public BrowserInformationControlInput getInput() { return control.getInput(); }
/** * Creates a browser information control with the given shell as parent. * * @param parent the parent shell * @param symbolicFontName the symbolic name of the font used for size computations * @param resizable <code>true</code> if the control should be resizable * @since 3.4 */ public BrowserInformationControl(Shell parent, String symbolicFontName, boolean resizable) { super(parent, resizable); fSymbolicFontName= symbolicFontName; create(); }
/** * Returns the HTML from {@link #getHtml()}. * This is a fallback mode for platforms where the {@link BrowserInformationControl} * is not available and this input is passed to a {@link DefaultInformationControl}. * * @return {@link #getHtml()} */ @Override public String toString() { return getHtml(); } }
protected void startItalic() { if (fItalic == 0) { finishAndReinitializeCurrentStyle(fCounter); fCurrentStyleRange.fontStyle |= SWT.ITALIC; } ++fItalic; }
protected void startBold() { if (fBold == 0) { fBoldStartOffset= fCounter; if (fStrikeout > 0) { setStrikeout(fStrikeoutStartOffset, fCounter - fStrikeoutStartOffset); } } ++fBold; }
protected void startStrikeout() { if (fStrikeout == 0) { fStrikeoutStartOffset= fCounter; if (fBold > 0) { setBold(fBoldStartOffset, fCounter - fBoldStartOffset); } } ++fStrikeout; }
@Override public void run() { BrowserInformationControlInput previous= (BrowserInformationControlInput) fInfoControl.getInput().getPrevious(); if (previous != null) { fInfoControl.setInput(previous); } }
@Override protected String computeSubstitution(int c) throws IOException { if (c == '<') return processHTMLTag(); else if (fIgnore) return EMPTY_STRING; else if (c == '&') return processEntity(); return null; }
/** * Creates a browser information control with the given shell as parent. * * @param parent the parent shell * @param symbolicFontName the symbolic name of the font used for size computations * @param toolBarManager the manager or <code>null</code> if toolbar is not desired * @since 3.4 */ public BrowserInformationControl(Shell parent, String symbolicFontName, ToolBarManager toolBarManager) { super(parent, toolBarManager); fSymbolicFontName= symbolicFontName; create(); }
@Override public int read() throws IOException { int c= super.read(); if (c != -1) ++ fCounter; return c; }
protected void stopBold() { --fBold; if (fBold == 0) { finishAndReinitializeCurrentStyle(fCounter); fCurrentStyleRange.fontStyle ^= SWT.BOLD; } }
/** * Creates a browser information control with the given shell as parent. * * @param parent the parent shell * @param symbolicFontName the symbolic name of the font used for size computations * @param toolBarManager the manager or <code>null</code> if toolbar is not desired * @since 3.4 */ public BrowserInformationControl(Shell parent, String symbolicFontName, ToolBarManager toolBarManager) { super(parent, toolBarManager); fSymbolicFontName= symbolicFontName; create(); }
protected void stopStrikeout() { --fStrikeout; if (fStrikeout == 0) { finishAndReinitializeCurrentStyle(fCounter); fCurrentStyleRange.strikeout= false; } }