Class FormattedTextViewerFx

    • Field Summary

      • Fields inherited from class org.eclipse.swt.widgets.Control

        handle
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      void addListener​(int eventType, org.eclipse.swt.widgets.Listener listener)  
      org.eclipse.swt.graphics.Point computeSize​(int width, int height, boolean changed)  
      void dispose()  
      protected javafx.embed.swt.FXCanvas getOrCreateCanvas()
      Returns FXCanvas instance to which formatted text view can be attached.
      void hideScrollBars​(boolean hide)
      Hides scroll bars of the viewer.
      void resizeView​(org.eclipse.swt.graphics.Rectangle rect, Runnable onContentLoaded)
      Resizes view containment.
      protected void setView​(FormattedTextViewFx view)
      Sets view of formatted text.
      void updateFormattedStringSettings​(FormattedStringSettings settings, Runnable onContentLoaded)
      Updates the FormattedStringSettings.
      • Methods inherited from class org.eclipse.swt.widgets.Composite

        changed, checkSubclass, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, layout, setBackgroundMode, setFocus, setLayout, setLayoutDeferred, setTabList
      • Methods inherited from class org.eclipse.swt.widgets.Scrollable

        computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar
      • Methods inherited from class org.eclipse.swt.widgets.Control

        addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getOrientation, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackground, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setForeground, setLayoutData, setLocation, setLocation, setMenu, setOrientation, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setToolTipText, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update
      • Methods inherited from class org.eclipse.swt.widgets.Widget

        addDisposeListener, checkWidget, getData, getData, getDisplay, getListeners, getStyle, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData, toString
      • Methods inherited from interface org.eclipse.swt.graphics.Drawable

        isAutoScalable
    • Constructor Detail

      • FormattedTextViewerFx

        public FormattedTextViewerFx​(org.eclipse.swt.widgets.Composite parent,
                                     String content,
                                     Runnable onContentLoaded,
                                     IV8Project v8Project,
                                     IMdObjectByTypeProvider objectByTypeProvider,
                                     IColorProvider colorProvider,
                                     IFontProvider fontProvider,
                                     int scale,
                                     double preferredWidth,
                                     double preferredHeight,
                                     FormattedStringSettings formattedStringSettings)
        Creates new instance of the control with single FormattedTextView view attached.
        Parameters:
        parent - parent control, cannot be null
        content - formatted text content
        onContentLoaded - callback to be called when content has been loaded
        v8Project - V8 project, cannot be null
        objectByTypeProvider - object by type provider, cannot be null
        colorProvider - the color provider, cannot be null
        fontProvider - the font provider, cannot be null
        scale - the form scale in percent
        preferredWidth - the preferred width of the formatted text, use SWT.DEFAULT to ignore limit
        preferredHeight - the preferred height of the formatted text, use SWT.DEFAULT to ignore limit
        formatStringSettings - the formatted text default settings
      • FormattedTextViewerFx

        protected FormattedTextViewerFx​(org.eclipse.swt.widgets.Composite parent)
        Creates new instance of the control without any views attached. Can be used by descendants to attach custom views of a formatted text.
        Parameters:
        parent - parent control, cannot be null
    • Method Detail

      • computeSize

        public org.eclipse.swt.graphics.Point computeSize​(int width,
                                                          int height,
                                                          boolean changed)
        Overrides:
        computeSize in class org.eclipse.swt.widgets.Control
      • hideScrollBars

        public void hideScrollBars​(boolean hide)
        Hides scroll bars of the viewer.
        Overrides:
        hideScrollBars in class AbstractFormattedTextViewer
        Parameters:
        hide - if true, then scroll bars will never appear
      • addListener

        public void addListener​(int eventType,
                                org.eclipse.swt.widgets.Listener listener)
        Overrides:
        addListener in class org.eclipse.swt.widgets.Widget
      • updateFormattedStringSettings

        public void updateFormattedStringSettings​(FormattedStringSettings settings,
                                                  Runnable onContentLoaded)
        Updates the FormattedStringSettings. If default font style is changed you should use this method to set correct settings.
        Specified by:
        updateFormattedStringSettings in class AbstractFormattedTextViewer
        Parameters:
        settings - new formatted text settings
        onContentLoaded - callback to be called when content has been loaded
      • dispose

        public void dispose()
        Overrides:
        dispose in class org.eclipse.swt.widgets.Widget
      • getOrCreateCanvas

        protected javafx.embed.swt.FXCanvas getOrCreateCanvas()
        Returns FXCanvas instance to which formatted text view can be attached. The canvas is created by first call of this method.
        Returns:
        the canvas
      • resizeView

        public void resizeView​(org.eclipse.swt.graphics.Rectangle rect,
                               Runnable onContentLoaded)
        Resizes view containment.
        Specified by:
        resizeView in class AbstractFormattedTextViewer
        Parameters:
        rect - new size
        onContentLoaded - callback to be called when content has been loaded
      • setView

        protected void setView​(FormattedTextViewFx view)
        Sets view of formatted text.
        Parameters:
        view - the view