Package com.iizix.swt
Class CustomSashForm
- All Implemented Interfaces:
- Drawable
- Direct Known Subclasses:
- TablePanel
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.
- Nested Class SummaryNested Classes
- Field SummaryFieldsModifier and TypeFieldDescription- protected final ApplicationUI- protected static final int- protected static final int- protected static final int- protected static final int- protected static final int- protected Color- protected Color- protected com.iizix.swt.CustomSashForm.SashInfo- protected List<CustomSashForm.ICustomSashFormListener>- protected static final int- protected static final int- protected static final int- protected static final int- protected boolean- static final intCustom style bits.- static final intCustom style bits.- static final intCustom style bits.- static final intCustom style bits.- protected boolean- protected boolean- protected boolean[]- protected static final int- protected static final int- protected static final int- protected static final int- protected static final int- Fields inherited from class org.eclipse.swt.custom.SashForm- SASH_WIDTH
- Constructor SummaryConstructorsConstructorDescription- CustomSashForm- (Composite parent, int style) Constructor for CustomSashForm.- CustomSashForm- (Composite parent, int style, int customStyle) Constructor taking a custom style too.
- Method SummaryModifier and TypeMethodDescription- voidAdds a custom sashform listener.- protected void- downHideClicked- (com.iizix.swt.CustomSashForm.SashInfo sashinfo) - protected void- downRestoreClicked- (com.iizix.swt.CustomSashForm.SashInfo sashinfo) - protected void- protected void- drawDownHideArrow- (GC gc, int x, int y) - protected void- drawDownRestoreArrow- (GC gc, int x, int y) - protected void- drawLeftHideArrow- (GC gc, int x, int y) - protected void- drawLeftRestoreArrow- (GC gc, int x, int y) - protected void- drawRightHideArrow- (GC gc, int x, int y) - protected void- drawRightRestoreArrow- (GC gc, int x, int y) - protected void- drawSashBorder- (GC gc, Sash sash, boolean leftBorder) - protected void- drawUpHideArrow- (GC gc, int x, int y) - protected void- drawUpRestoreArrow- (GC gc, int x, int y) - protected void- protected void- getNewSashArray- (com.iizix.swt.CustomSashForm.SashInfo sashInfo, int[] addArrowTypes, int[] drawArrowTypes) - int- protected Sash- getSash()- Point[]- int[]Get heights for save.- void- hideDown()Call to set to hide down- void- hideLeft()Call to set to hide left- voidCall to set to hide right- void- hideUp()Call to set to hide up- booleanReturns if the first sash part is visible.- protected boolean- isFocusAncestorA- (Control control) - booleanReturns the- noHideDownsetting for vertical CustomSashForm.- booleanReturns the- noHideLeftsetting for horizontal CustomSashForm.- booleanReturns the- noHideRightsetting for horizontal CustomSashForm.- booleanReturns the- noHideUpsetting for vertical CustomSashForm.- booleanReturns if the second sash part is visible.- void- layout- (boolean changed) - protected void- voidRemoves the custom sashform listener.- booleanMakes the first sash visible if it is not.- void- setNoHideDown- (boolean bHide) Sets the- noHideDownsetting for vertical CustomSashForm.- void- setNoHideLeft- (boolean bHide) Sets the- noHideLeftsetting for horizontal CustomSashForm.- void- setNoHideRight- (boolean bHide) Sets the- noHideRightsetting for horizontal CustomSashForm.- void- setNoHideUp- (boolean bHide) Sets the- noHideUpsetting for vertical CustomSashForm.- void- setRestoreWeight- (int weight) - void- setSashBorders- (boolean[] sashBorders) Set the need sash borders for the controls.- booleanMakes the first sash visible if it is not.- void- setWeights- (int... rc) - protected void- upHideClicked- (com.iizix.swt.CustomSashForm.SashInfo sashinfo) - protected void- upRestoreClicked- (com.iizix.swt.CustomSashForm.SashInfo sashinfo) - Methods inherited from class org.eclipse.swt.custom.SashForm- getMaximizedControl, getOrientation, getSashWidth, getStyle, getWeights, setBackground, setForeground, setLayout, setMaximizedControl, setOrientation, setSashWidth, setToolTipText- Methods inherited from class org.eclipse.swt.widgets.Composite- changed, checkSubclass, computeSize, drawBackground, getBackgroundMode, getChildren, getLayout, getLayoutDeferred, getTabList, isLayoutDeferred, layout, layout, layout, layout, redraw, setBackgroundMode, setFocus, setLayoutDeferred, setTabList, toString- Methods inherited from class org.eclipse.swt.widgets.Scrollable- computeTrim, getClientArea, getHorizontalBar, getScrollbarsMode, getVerticalBar- Methods inherited from class org.eclipse.swt.widgets.Control- addControlListener, addDragDetectListener, addFocusListener, addGestureListener, addHelpListener, addKeyListener, addMenuDetectListener, addMouseListener, addMouseMoveListener, addMouseTrackListener, addMouseWheelListener, addPaintListener, addTouchListener, addTraverseListener, computeSize, dragDetect, dragDetect, forceFocus, getAccessible, getBackground, getBackgroundImage, getBorderWidth, getBounds, getCursor, getDragDetect, getEnabled, getFont, getForeground, getLayoutData, getLocation, getMenu, getMonitor, getParent, getRegion, getShell, getSize, getTextDirection, getToolTipText, getTouchEnabled, getVisible, internal_dispose_GC, internal_new_GC, isEnabled, isFocusControl, isReparentable, isVisible, moveAbove, moveBelow, pack, pack, print, redraw, removeControlListener, removeDragDetectListener, removeFocusListener, removeGestureListener, removeHelpListener, removeKeyListener, removeMenuDetectListener, removeMouseListener, removeMouseMoveListener, removeMouseTrackListener, removeMouseWheelListener, removePaintListener, removeTouchListener, removeTraverseListener, requestLayout, setBackgroundImage, setBounds, setBounds, setCapture, setCursor, setDragDetect, setEnabled, setFont, setLayoutData, setLocation, setLocation, setMenu, setParent, setRedraw, setRegion, setSize, setSize, setTextDirection, setTouchEnabled, setVisible, toControl, toControl, toDisplay, toDisplay, traverse, traverse, traverse, update- Methods inherited from class org.eclipse.swt.widgets.Widget- addDisposeListener, addListener, checkWidget, dispose, getData, getData, getDisplay, getListeners, isAutoDirection, isDisposed, isListening, notifyListeners, removeDisposeListener, removeListener, removeListener, reskin, setData, setData- Methods inherited from class java.lang.Object- clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait- Methods inherited from interface org.eclipse.swt.graphics.Drawable- isAutoScalable
- Field Details- NO_HIDE_LEFTpublic static final int NO_HIDE_LEFTCustom 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_UPpublic static final int NO_HIDE_UPCustom 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_RIGHTpublic static final int NO_HIDE_RIGHTCustom 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_DOWNpublic static final int NO_HIDE_DOWNCustom 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
- currentSashInfoprotected com.iizix.swt.CustomSashForm.SashInfo currentSashInfo
- inMouseClickprotected boolean inMouseClick
- sashBordersprotected boolean[] sashBorders
- noHideUpprotected boolean noHideUp
- noHideDownprotected boolean noHideDown
- customSashFormListeners
- UP_RESTORE_ARROWprotected static final int UP_RESTORE_ARROW- See Also:
 
- UP_HIDE_ARROWprotected static final int UP_HIDE_ARROW- See Also:
 
- DOWN_RESTORE_ARROWprotected static final int DOWN_RESTORE_ARROW- See Also:
 
- DOWN_HIDE_ARROWprotected static final int DOWN_HIDE_ARROW- See Also:
 
- HIDE_ARROWSprotected static final int HIDE_ARROWS- See Also:
 
- ARROW_TYPE_INDEXprotected static final int ARROW_TYPE_INDEX- See Also:
 
- ARROW_DRAWN_INDEXprotected static final int ARROW_DRAWN_INDEX- See Also:
 
- X_INDEXprotected static final int X_INDEX- See Also:
 
- Y_INDEXprotected static final int Y_INDEX- See Also:
 
- WIDTH_INDEXprotected static final int WIDTH_INDEX- See Also:
 
- HEIGHT_INDEXprotected static final int HEIGHT_INDEX- See Also:
 
- ARROW_WIDTHprotected static final int ARROW_WIDTH- See Also:
 
- ARROW_HEIGHTprotected static final int ARROW_HEIGHT- See Also:
 
- ARROW_MARGINprotected static final int ARROW_MARGIN- See Also:
 
- arrowColor
- borderColor
 
- Constructor Details- CustomSashFormConstructor for CustomSashForm.- Parameters:
- parent-
- style-
 
- CustomSashFormConstructor taking a custom style too. Or in the Custom style bits defined above (e.g. NO_HIDE_RIGHT,...)
 
- Method Details- isNoHideUppublic boolean isNoHideUp()Returns the- noHideUpsetting for vertical CustomSashForm.- Returns:
- The no-hide-up flag.
 
- isNoHideDownpublic boolean isNoHideDown()Returns the- noHideDownsetting for vertical CustomSashForm.- Returns:
- The no-hide-down flag.
 
- isNoHideLeftpublic boolean isNoHideLeft()Returns the- noHideLeftsetting for horizontal CustomSashForm.- Returns:
- The no-hide-left flag.
 
- isNoHideRightpublic boolean isNoHideRight()Returns the- noHideRightsetting for horizontal CustomSashForm.- Returns:
- The no-hide-right flag.
 
- setNoHideUppublic void setNoHideUp- (boolean bHide) Sets the- noHideUpsetting for vertical CustomSashForm.- Parameters:
- bHide-
 
- setNoHideDownpublic void setNoHideDown- (boolean bHide) Sets the- noHideDownsetting for vertical CustomSashForm.- Parameters:
- bHide-
 
- setNoHideLeftpublic void setNoHideLeft- (boolean bHide) Sets the- noHideLeftsetting for horizontal CustomSashForm.- Parameters:
- bHide-
 
- setNoHideRightpublic void setNoHideRight- (boolean bHide) Sets the- noHideRightsetting for horizontal CustomSashForm.- Parameters:
- bHide-
 
- hideUppublic void hideUp()Call to set to hide up
- hideLeftpublic void hideLeft()Call to set to hide left
- hideDownpublic void hideDown()Call to set to hide down
- hideRightpublic void hideRight()Call to set to hide right
- setSashBorderspublic void setSashBorders- (boolean[] sashBorders) Set the need sash borders for the controls.
- layoutpublic void layout- (boolean changed) 
- recomputeSashInfoprotected void recomputeSashInfo()
- upRestoreClickedprotected void upRestoreClicked- (com.iizix.swt.CustomSashForm.SashInfo sashinfo) 
- upHideClickedprotected void upHideClicked- (com.iizix.swt.CustomSashForm.SashInfo sashinfo) 
- downRestoreClickedprotected void downRestoreClicked- (com.iizix.swt.CustomSashForm.SashInfo sashinfo) 
- isFirstSashVisiblepublic boolean isFirstSashVisible()Returns if the first sash part is visible.
- isSecondSashVisiblepublic boolean isSecondSashVisible()Returns if the second sash part is visible.
- setFirstSashVisiblepublic boolean setFirstSashVisible()Makes the first sash visible if it is not.- Returns:
- true for success, false for no change.
 
- setSecondSashVisiblepublic boolean setSecondSashVisible()Makes the first sash visible if it is not.- Returns:
- true for success, false for no change.
 
- downHideClickedprotected void downHideClicked- (com.iizix.swt.CustomSashForm.SashInfo sashinfo) 
- isFocusAncestorA
- getNewSashArrayprotected void getNewSashArray- (com.iizix.swt.CustomSashForm.SashInfo sashInfo, int[] addArrowTypes, int[] drawArrowTypes) 
- drawSashBorder
- drawArrow
- drawUpRestoreArrow
- drawUpHideArrow
- drawDownRestoreArrow
- drawDownHideArrow
- drawLeftRestoreArrow
- drawLeftHideArrow
- drawRightRestoreArrow
- drawRightHideArrow
- getRestoreWeightpublic int getRestoreWeight()
- getSash
- setRestoreWeightpublic void setRestoreWeight- (int weight) 
- getSavedSizes
- addCustomSashFormListenerAdds a custom sashform listener. This listener will be removed when this control is disposed.- Parameters:
- listener-
- Since:
- 1.2.0
 
- removeCustomSashFormListenerRemoves the custom sashform listener.- Parameters:
- listener-
- Since:
- 1.2.0
 
- fireDividerMovedprotected void fireDividerMoved()
- setWeightspublic void setWeights- (int... rc) - Overrides:
- setWeightsin class- SashForm
 
- getWeightsForSavepublic int[] getWeightsForSave()Get heights for save. Negative value indicates it's been hidden.