Class FormWysiwygViewer

java.lang.Object
org.eclipse.jface.viewers.Viewer
com._1c.g5.v8.dt.form.presentation.wysiwyg.FormWysiwygViewer
All Implemented Interfaces:
IInputProvider, IInputSelectionProvider, ISelectionProvider
Direct Known Subclasses:
FormPresentationViewer

public class FormWysiwygViewer extends Viewer
Viewer for WYSIWYG form representation.
  • Constructor Details

    • FormWysiwygViewer

      public FormWysiwygViewer(org.eclipse.swt.widgets.Composite parent, MappingController controller, IBmModel bmModel, TransformatorServiceProvider transformatorServiceProvider, ChartImageServiceProvider chartImageServiceProvider, IChartProvider chartProvider, IRuntimeVersionSupport versionSupport, CompatibilityMode compatibilityMode, List<IDropDelegate> dropDelegates)
      Creates new WYSIWYG viewer.
      Parameters:
      parent - the parent composite, cannot be null
      controller - the mapping controller, cannot be null
      chartImageServiceProvider - the provider of the service for chart images obtaining, cannot be null
      chartProvider - the provider of the charts, cannot be null
      versionSupport - , the runtime version service, cannot be null
      bmModel - the BM model, cannot be null
      transformatorServiceProvider - the provider for the transformation service, cannot be null
      compatibilityMode - the project compatibility mode, cannot be null
      dropDelegates - , list of drop delegates for DnD support
  • Method Details

    • close

      public void close()
      Must be called on closing of WYSIWYG editor.
    • getTargetWidth

      public int getTargetWidth()
      Returns current target width which the WYSIWYG is built for.
      Returns:
      the target width
    • getTargetHeight

      public int getTargetHeight()
      Returns current target height which the WYSIWYG is built for.
      Returns:
      the target width
    • setTargetResolution

      public void setTargetResolution(int width, int height)
      Sets WYSIWYG's target resolution to be built for.
      Parameters:
      width - the width
      height - the height
    • setCompactView

      public void setCompactView(boolean isCompact)
      Sets WYSIWYG's compact or usual view.
      Parameters:
      isCompact - the view type, compact or usual
    • isCompactView

      public boolean isCompactView()
      Tells whether compact view is used.
      Returns:
      true if compact view, false otherwise
    • setLanguageCode

      public void setLanguageCode(String languageCode)
      Sets new language.
      Parameters:
      languageCode - the language
    • getControl

      public org.eclipse.swt.widgets.Control getControl()
      Specified by:
      getControl in class Viewer
    • getInput

      public Object getInput()
      Specified by:
      getInput in interface IInputProvider
      Specified by:
      getInput in class Viewer
    • setInput

      public void setInput(Object input)
      Sets new form to represent by WYSIWYG.
      Specified by:
      setInput in class Viewer
      Parameters:
      input - the Form object, cannot be null
    • getSelection

      public ISelection getSelection()
      Specified by:
      getSelection in interface ISelectionProvider
      Specified by:
      getSelection in class Viewer
    • getStructuredSelection

      public IStructuredSelection getStructuredSelection()
      Returns currently selected objects on WYSIWYG.
      Returns:
      the selection
    • setSelection

      public void setSelection(ISelection selection, boolean reveal)
      Specified by:
      setSelection in class Viewer
    • refresh

      public void refresh()
      Specified by:
      refresh in class Viewer