Class Splitter

All Implemented Interfaces:
Drawable

public class Splitter extends SashForm
The Splitter adds support for nesting to a SashForm.

If Splitters are nested directly:

  • changing the visibility of a child may propagate upward to the parent Splitter if the child is the last child to become invisible or the first to become visible.
  • maximizing a child makes it as large as the topmost enclosing Splitter
Since:
2.1
  • Constructor Details

    • Splitter

      public Splitter(Composite parent, int style)
      Constructs a new instance of this class given its parent and a style value describing its behavior and appearance.

      The style value is either one of the style constants defined in class SWT which is applicable to instances of this class, or must be built by bitwise OR'ing together (that is, using the int "|" operator) two or more of those SWT style constants. The class description lists the style constants that are applicable to the class. Style bits are also inherited from superclasses.

      Parameters:
      parent - a widget which will be the parent of the new instance (cannot be null)
      style - the style of widget to construct
      Throws:
      IllegalArgumentException -
      • ERROR_NULL_ARGUMENT - if the parent is null
      SWTException -
      • ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the parent
  • Method Details

    • setVisible

      public void setVisible(Control child, boolean visible)
      Sets the visibility of the given child in this Splitter. If this change affects the visibility state of the whole Splitter, and if the Splitter is directly nested in one or more Splitters, this method recursively propagates the new state upward.
      Parameters:
      child - the child control for which the visibility is changed
      visible - the new visibility state
    • setMaximizedControl

      public void setMaximizedControl(Control control)
      Description copied from class: SashForm
      Specify the control that should take up the entire client area of the SashForm. If one control has been maximized, and this method is called with a different control, the previous control will be minimized and the new control will be maximized. If the value of control is null, the SashForm will minimize all controls and return to the default layout where all controls are laid out separated by sashes.
      Overrides:
      setMaximizedControl in class SashForm
      Parameters:
      control - the control to be maximized or null