Package com.iizix.swt

Class CustomSashForm

All Implemented Interfaces:
Drawable
Direct Known Subclasses:
TablePanel

public class CustomSashForm extends SashForm
A SashForm that allows hide/restore controls on sash. It only works with one sash (two children). It doesn't make sense for the arrows when there is more than one sash. Things get confusing for a restore position.
  • Field Details Link icon

    • NO_HIDE_LEFT Link icon

      public static final int NO_HIDE_LEFT
      Custom style bits. They set whether hide to one side of the other is not permitted. For example, if NO_HIDE_UP, then there will be only one arrow. When not hidden, it will point down (and will do a hide down), and when hidden down, it will point up (and will do a restore to the previous weight). There won't be a hide to the top arrow.
      See Also:
    • NO_HIDE_UP Link icon

      public static final int NO_HIDE_UP
      Custom style bits. They set whether hide to one side of the other is not permitted. For example, if NO_HIDE_UP, then there will be only one arrow. When not hidden, it will point down (and will do a hide down), and when hidden down, it will point up (and will do a restore to the previous weight). There won't be a hide to the top arrow.
      See Also:
    • NO_HIDE_RIGHT Link icon

      public static final int NO_HIDE_RIGHT
      Custom style bits. They set whether hide to one side of the other is not permitted. For example, if NO_HIDE_UP, then there will be only one arrow. When not hidden, it will point down (and will do a hide down), and when hidden down, it will point up (and will do a restore to the previous weight). There won't be a hide to the top arrow.
      See Also:
    • NO_HIDE_DOWN Link icon

      public static final int NO_HIDE_DOWN
      Custom style bits. They set whether hide to one side of the other is not permitted. For example, if NO_HIDE_UP, then there will be only one arrow. When not hidden, it will point down (and will do a hide down), and when hidden down, it will point up (and will do a restore to the previous weight). There won't be a hide to the top arrow.
      See Also:
    • appUI Link icon

      protected final ApplicationUI appUI
    • currentSashInfo Link icon

      protected com.iizix.swt.CustomSashForm.SashInfo currentSashInfo
    • inMouseClick Link icon

      protected boolean inMouseClick
    • sashBorders Link icon

      protected boolean[] sashBorders
    • noHideUp Link icon

      protected boolean noHideUp
    • noHideDown Link icon

      protected boolean noHideDown
    • customSashFormListeners Link icon

      protected List<CustomSashForm.ICustomSashFormListener> customSashFormListeners
    • UP_RESTORE_ARROW Link icon

      protected static final int UP_RESTORE_ARROW
      See Also:
    • UP_HIDE_ARROW Link icon

      protected static final int UP_HIDE_ARROW
      See Also:
    • DOWN_RESTORE_ARROW Link icon

      protected static final int DOWN_RESTORE_ARROW
      See Also:
    • DOWN_HIDE_ARROW Link icon

      protected static final int DOWN_HIDE_ARROW
      See Also:
    • HIDE_ARROWS Link icon

      protected static final int HIDE_ARROWS
      See Also:
    • ARROW_TYPE_INDEX Link icon

      protected static final int ARROW_TYPE_INDEX
      See Also:
    • ARROW_DRAWN_INDEX Link icon

      protected static final int ARROW_DRAWN_INDEX
      See Also:
    • X_INDEX Link icon

      protected static final int X_INDEX
      See Also:
    • Y_INDEX Link icon

      protected static final int Y_INDEX
      See Also:
    • WIDTH_INDEX Link icon

      protected static final int WIDTH_INDEX
      See Also:
    • HEIGHT_INDEX Link icon

      protected static final int HEIGHT_INDEX
      See Also:
    • ARROW_WIDTH Link icon

      protected static final int ARROW_WIDTH
      See Also:
    • ARROW_HEIGHT Link icon

      protected static final int ARROW_HEIGHT
      See Also:
    • ARROW_MARGIN Link icon

      protected static final int ARROW_MARGIN
      See Also:
    • arrowColor Link icon

      protected Color arrowColor
    • borderColor Link icon

      protected Color borderColor
  • Constructor Details Link icon

    • CustomSashForm Link icon

      public CustomSashForm(Composite parent, int style)
      Constructor for CustomSashForm.
      Parameters:
      parent -
      style -
    • CustomSashForm Link icon

      public CustomSashForm(Composite parent, int style, int customStyle)
      Constructor taking a custom style too. Or in the Custom style bits defined above (e.g. NO_HIDE_RIGHT,...)
  • Method Details Link icon

    • isNoHideUp Link icon

      public boolean isNoHideUp()
      Returns the noHideUp setting for vertical CustomSashForm.
      Returns:
      The no-hide-up flag.
    • isNoHideDown Link icon

      public boolean isNoHideDown()
      Returns the noHideDown setting for vertical CustomSashForm.
      Returns:
      The no-hide-down flag.
    • isNoHideLeft Link icon

      public boolean isNoHideLeft()
      Returns the noHideLeft setting for horizontal CustomSashForm.
      Returns:
      The no-hide-left flag.
    • isNoHideRight Link icon

      public boolean isNoHideRight()
      Returns the noHideRight setting for horizontal CustomSashForm.
      Returns:
      The no-hide-right flag.
    • setNoHideUp Link icon

      public void setNoHideUp(boolean bHide)
      Sets the noHideUp setting for vertical CustomSashForm.
      Parameters:
      bHide -
    • setNoHideDown Link icon

      public void setNoHideDown(boolean bHide)
      Sets the noHideDown setting for vertical CustomSashForm.
      Parameters:
      bHide -
    • setNoHideLeft Link icon

      public void setNoHideLeft(boolean bHide)
      Sets the noHideLeft setting for horizontal CustomSashForm.
      Parameters:
      bHide -
    • setNoHideRight Link icon

      public void setNoHideRight(boolean bHide)
      Sets the noHideRight setting for horizontal CustomSashForm.
      Parameters:
      bHide -
    • hideUp Link icon

      public void hideUp()
      Call to set to hide up
    • hideLeft Link icon

      public void hideLeft()
      Call to set to hide left
    • hideDown Link icon

      public void hideDown()
      Call to set to hide down
    • hideRight Link icon

      public void hideRight()
      Call to set to hide right
    • setSashBorders Link icon

      public void setSashBorders(boolean[] sashBorders)
      Set the need sash borders for the controls.
    • layout Link icon

      public void layout(boolean changed)
      Overrides:
      layout in class Composite
      See Also:
    • recomputeSashInfo Link icon

      protected void recomputeSashInfo()
    • upRestoreClicked Link icon

      protected void upRestoreClicked(com.iizix.swt.CustomSashForm.SashInfo sashinfo)
    • upHideClicked Link icon

      protected void upHideClicked(com.iizix.swt.CustomSashForm.SashInfo sashinfo)
    • downRestoreClicked Link icon

      protected void downRestoreClicked(com.iizix.swt.CustomSashForm.SashInfo sashinfo)
    • isFirstSashVisible Link icon

      public boolean isFirstSashVisible()
      Returns if the first sash part is visible.
    • isSecondSashVisible Link icon

      public boolean isSecondSashVisible()
      Returns if the second sash part is visible.
    • setFirstSashVisible Link icon

      public boolean setFirstSashVisible()
      Makes the first sash visible if it is not.
      Returns:
      true for success, false for no change.
    • setSecondSashVisible Link icon

      public boolean setSecondSashVisible()
      Makes the first sash visible if it is not.
      Returns:
      true for success, false for no change.
    • downHideClicked Link icon

      protected void downHideClicked(com.iizix.swt.CustomSashForm.SashInfo sashinfo)
    • isFocusAncestorA Link icon

      protected boolean isFocusAncestorA(Control control)
    • getNewSashArray Link icon

      protected void getNewSashArray(com.iizix.swt.CustomSashForm.SashInfo sashInfo, int[] addArrowTypes, int[] drawArrowTypes)
    • drawSashBorder Link icon

      protected void drawSashBorder(GC gc, Sash sash, boolean leftBorder)
    • drawArrow Link icon

      protected void drawArrow(GC gc, int[] sashLoc, boolean selected)
    • drawUpRestoreArrow Link icon

      protected void drawUpRestoreArrow(GC gc, int x, int y)
    • drawUpHideArrow Link icon

      protected void drawUpHideArrow(GC gc, int x, int y)
    • drawDownRestoreArrow Link icon

      protected void drawDownRestoreArrow(GC gc, int x, int y)
    • drawDownHideArrow Link icon

      protected void drawDownHideArrow(GC gc, int x, int y)
    • drawLeftRestoreArrow Link icon

      protected void drawLeftRestoreArrow(GC gc, int x, int y)
    • drawLeftHideArrow Link icon

      protected void drawLeftHideArrow(GC gc, int x, int y)
    • drawRightRestoreArrow Link icon

      protected void drawRightRestoreArrow(GC gc, int x, int y)
    • drawRightHideArrow Link icon

      protected void drawRightHideArrow(GC gc, int x, int y)
    • getRestoreWeight Link icon

      public int getRestoreWeight()
    • getSash Link icon

      protected Sash getSash()
    • setRestoreWeight Link icon

      public void setRestoreWeight(int weight)
    • getSavedSizes Link icon

      public Point[] getSavedSizes()
    • addCustomSashFormListener Link icon

      public void addCustomSashFormListener(CustomSashForm.ICustomSashFormListener listener)
      Adds a custom sashform listener. This listener will be removed when this control is disposed.
      Parameters:
      listener -
      Since:
      1.2.0
    • removeCustomSashFormListener Link icon

      public void removeCustomSashFormListener(CustomSashForm.ICustomSashFormListener listener)
      Removes the custom sashform listener.
      Parameters:
      listener -
      Since:
      1.2.0
    • fireDividerMoved Link icon

      protected void fireDividerMoved()
    • setWeights Link icon

      public void setWeights(int... rc)
      Overrides:
      setWeights in class SashForm
    • getWeightsForSave Link icon

      public int[] getWeightsForSave()
      Get heights for save. Negative value indicates it's been hidden.