Class PropsUi

  • All Implemented Interfaces:
    Cloneable

    public class PropsUi
    extends Props
    We use Props to store all kinds of user interactive information such as the selected colors, fonts, positions of windows, etc.
    • Field Detail

      • DEFAULT_MAX_EXECUTION_LOGGING_TEXT_SIZE

        public static final int DEFAULT_MAX_EXECUTION_LOGGING_TEXT_SIZE
        See Also:
        Constant Field Values
      • globalZoomFactorLevels

        protected static final String[] globalZoomFactorLevels
    • Method Detail

      • getInstance

        public static PropsUi getInstance()
      • reCalculateNativeZoomFactor

        public void reCalculateNativeZoomFactor()
        Re-calculate the static native zoom factor. Do not make this method static because Sonar recommends it.
      • setDefault

        public void setDefault()
        Overrides:
        setDefault in class Props
      • setFixedFont

        public void setFixedFont​(org.eclipse.swt.graphics.FontData fd)
      • getFixedFont

        public org.eclipse.swt.graphics.FontData getFixedFont()
      • getDefaultFont

        public org.eclipse.swt.graphics.FontData getDefaultFont()
      • setDefaultFont

        public void setDefaultFont​(org.eclipse.swt.graphics.FontData fd)
      • setGraphFont

        public void setGraphFont​(org.eclipse.swt.graphics.FontData fd)
      • getGraphFont

        public org.eclipse.swt.graphics.FontData getGraphFont()
      • setNoteFont

        public void setNoteFont​(org.eclipse.swt.graphics.FontData fd)
      • getNoteFont

        public org.eclipse.swt.graphics.FontData getNoteFont()
      • setIconSize

        public void setIconSize​(int size)
      • getIconSize

        public int getIconSize()
      • setZoomFactor

        public void setZoomFactor​(double factor)
      • getZoomFactor

        public double getZoomFactor()
      • getMargin

        public static int getMargin()
        The margin between the different dialog components & widgets
      • setLineWidth

        public void setLineWidth​(int width)
      • getLineWidth

        public int getLineWidth()
      • setLastPreview

        public void setLastPreview​(String[] lastpreview,
                                   int[] transformsize)
      • getLastPreview

        public String[] getLastPreview()
      • getLastPreviewSize

        public int[] getLastPreviewSize()
      • getDefaultFontData

        public org.eclipse.swt.graphics.FontData getDefaultFontData()
      • setMaxUndo

        public void setMaxUndo​(int max)
      • getMaxUndo

        public int getMaxUndo()
      • setMiddlePct

        public void setMiddlePct​(int pct)
      • getMiddlePct

        public int getMiddlePct()
        The percentage of the width of screen where we consider the middle of a dialog.
      • getFormMargin

        public static int getFormMargin()
        The horizontal and vertical margin of a dialog box.
      • setScreen

        public void setScreen​(WindowProperty windowProperty)
      • setOpenLastFile

        public void setOpenLastFile​(boolean open)
      • openLastFile

        public boolean openLastFile()
      • setAutoSave

        public void setAutoSave​(boolean autosave)
      • getAutoSave

        public boolean getAutoSave()
      • setSaveConfirmation

        public void setSaveConfirmation​(boolean saveconf)
      • getSaveConfirmation

        public boolean getSaveConfirmation()
      • setAutoSplit

        public void setAutoSplit​(boolean autosplit)
      • getAutoSplit

        public boolean getAutoSplit()
      • setExitWarningShown

        public void setExitWarningShown​(boolean show)
      • isShowCanvasGridEnabled

        public boolean isShowCanvasGridEnabled()
      • setShowCanvasGridEnabled

        public void setShowCanvasGridEnabled​(boolean anti)
      • isHideViewportEnabled

        public boolean isHideViewportEnabled()
      • setHideViewportEnabled

        public void setHideViewportEnabled​(boolean anti)
      • showExitWarning

        public boolean showExitWarning()
      • isShowTableViewToolbar

        public boolean isShowTableViewToolbar()
      • setShowTableViewToolbar

        public void setShowTableViewToolbar​(boolean show)
      • setLook

        public static void setLook​(org.eclipse.swt.widgets.Widget widget)
      • setLook

        public static void setLook​(org.eclipse.swt.widgets.Widget widget,
                                   int style)
      • setLookOnWindows

        protected static void setLookOnWindows​(org.eclipse.swt.widgets.Widget widget,
                                               int style)
      • setLookOnMac

        protected static void setLookOnMac​(org.eclipse.swt.widgets.Widget widget,
                                           int style)
      • setLookOnLinux

        protected static void setLookOnLinux​(org.eclipse.swt.widgets.Widget widget,
                                             int style)
      • getDisplay

        public static org.eclipse.swt.widgets.Display getDisplay()
        Returns:
        Returns the display.
      • setDefaultPreviewSize

        public void setDefaultPreviewSize​(int size)
      • getDefaultPreviewSize

        public int getDefaultPreviewSize()
      • showCopyOrDistributeWarning

        public boolean showCopyOrDistributeWarning()
      • setShowCopyOrDistributeWarning

        public void setShowCopyOrDistributeWarning​(boolean show)
      • setDialogSize

        public void setDialogSize​(org.eclipse.swt.widgets.Shell shell,
                                  String styleProperty)
      • useDoubleClick

        public boolean useDoubleClick()
      • setUseDoubleClickOnCanvas

        public void setUseDoubleClickOnCanvas​(boolean use)
      • useGlobalFileBookmarks

        public boolean useGlobalFileBookmarks()
      • setUseGlobalFileBookmarks

        public void setUseGlobalFileBookmarks​(boolean use)
      • isDarkMode

        public boolean isDarkMode()
      • setDarkMode

        public void setDarkMode​(boolean darkMode)
      • showToolTips

        public boolean showToolTips()
      • setShowToolTips

        public void setShowToolTips​(boolean show)
      • isShowingHelpToolTips

        public boolean isShowingHelpToolTips()
      • setHidingMenuBar

        public void setHidingMenuBar​(boolean show)
      • isHidingMenuBar

        public boolean isHidingMenuBar()
      • setSortFieldByName

        public void setSortFieldByName​(boolean sort)
      • isSortFieldByName

        public boolean isSortFieldByName()
      • setShowingHelpToolTips

        public void setShowingHelpToolTips​(boolean show)
      • getCanvasGridSize

        public int getCanvasGridSize()
      • setCanvasGridSize

        public void setCanvasGridSize​(int gridSize)
      • getSupportedVersion

        public int getSupportedVersion​(String property)
        Gets the supported version of the requested software.
        Parameters:
        property - the key for the software version
        Returns:
        an integer that represents the supported version for the software.
      • isBrowserEnvironmentCheckDisabled

        public boolean isBrowserEnvironmentCheckDisabled()
        Ask if the browsing environment checks are disabled.
        Returns:
        'true' if disabled 'false' otherwise.
      • isLegacyPerspectiveMode

        public boolean isLegacyPerspectiveMode()
      • setLocation

        public static void setLocation​(IGuiPosition guiElement,
                                       int x,
                                       int y)
      • calculateGridPosition

        public static Point calculateGridPosition​(Point p)
      • isIndicateSlowPipelineTransformsEnabled

        public boolean isIndicateSlowPipelineTransformsEnabled()
      • setIndicateSlowPipelineTransformsEnabled

        public void setIndicateSlowPipelineTransformsEnabled​(boolean indicate)
      • getNativeZoomFactor

        public static double getNativeZoomFactor()
        Gets nativeZoomFactor
        Returns:
        value of nativeZoomFactor
      • setNativeZoomFactor

        public static void setNativeZoomFactor​(double nativeZoomFactor)
        Parameters:
        nativeZoomFactor - The nativeZoomFactor to set
      • contrastColor

        public org.eclipse.swt.graphics.RGB contrastColor​(org.eclipse.swt.graphics.RGB rgb)
        Parameters:
        rgb - the color to contrast if the system is in "Dark Mode"
        Returns:
        The contrasted color
      • contrastColor

        public org.eclipse.swt.graphics.RGB contrastColor​(int r,
                                                          int g,
                                                          int b)
      • getContrastingColorStrings

        public Map<String,​String> getContrastingColorStrings()
      • getContrastingColors

        public Map<org.eclipse.swt.graphics.RGB,​org.eclipse.swt.graphics.RGB> getContrastingColors()
        Gets contrastingColors
        Returns:
        value of contrastingColors
      • setContrastingColors

        public void setContrastingColors​(Map<org.eclipse.swt.graphics.RGB,​org.eclipse.swt.graphics.RGB> contrastingColors)
        Parameters:
        contrastingColors - The contrastingColors to set
      • getGlobalZoomFactor

        public double getGlobalZoomFactor()
      • setGlobalZoomFactor

        public void setGlobalZoomFactor​(double globalZoomFactor)
      • getMaxExecutionLoggingTextSize

        public int getMaxExecutionLoggingTextSize()
      • setMaxExecutionLoggingTextSize

        public void setMaxExecutionLoggingTextSize​(int maxExecutionLoggingTextSize)
      • getGlobalZoomFactorLevels

        public static final String[] getGlobalZoomFactorLevels()
      • createFormLayout

        public org.eclipse.swt.widgets.Layout createFormLayout()