Class JFaceHelper


  • public class JFaceHelper
    extends java.lang.Object
    Helper class for different JFace routines.
    Author:
    Christopher Mindus
    • Constructor Summary

      Constructors 
      ConstructorDescription
      JFaceHelper() 
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and TypeMethodDescription
      static voidsaveWeights​(org.eclipse.swt.custom.SashForm sashForm, org.eclipse.ui.IMemento memento, java.lang.String name)
      Saves the sash form 2 weights to a memento.
      static voidsetWeigths​(org.eclipse.swt.custom.SashForm sashForm, org.eclipse.ui.IMemento memento, java.lang.String name, int defaultWeight1, int defaultWeight2)
      Helper to read sash 2 weights from a memento, and if not found, to set the defaults.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • JFaceHelper

        public JFaceHelper()
    • Method Detail

      • setWeigths

        public static void setWeigths​(org.eclipse.swt.custom.SashForm sashForm,
                                      org.eclipse.ui.IMemento memento,
                                      java.lang.String name,
                                      int defaultWeight1,
                                      int defaultWeight2)
        Helper to read sash 2 weights from a memento, and if not found, to set the defaults.

        This method should not be used for sash forms that doesn't contain exactly 2 children.

        Parameters:
        sashForm - The sash form.
        memento - The memento to initialize from, can be null.
        name - Name of sash data in memento.
        defaultWeight1 - Default weight 1 value.
        defaultWeight2 - Default weight 2 value.
      • saveWeights

        public static void saveWeights​(org.eclipse.swt.custom.SashForm sashForm,
                                       org.eclipse.ui.IMemento memento,
                                       java.lang.String name)
        Saves the sash form 2 weights to a memento.

        This method should not be used for sash forms that doesn't contain exactly 2 children.

        Parameters:
        sashForm - The sash form.
        memento - The memento to initialize from, can be null.
        name - Name of sash data in memento.