/** * Returns the width of the sashes when the controls in the SashForm are * laid out. * * @return the width of the sashes * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @since 1.2 */ public int getSashWidth() { checkWidget(); return SASH_WIDTH; }
/** * Returns the width of the sashes when the controls in the SashForm are * laid out. * * @return the width of the sashes * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @since 3.4 */ public int getSashWidth() { checkWidget(); return SASH_WIDTH; } @Override
/** * Returns the width of the sashes when the controls in the SashForm are * laid out. * * @return the width of the sashes * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @since 3.4 */ public int getSashWidth() { checkWidget(); return SASH_WIDTH; } @Override
/** * Returns the width of the sashes when the controls in the SashForm are * laid out. * * @return the width of the sashes * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @since 3.4 */ public int getSashWidth() { checkWidget(); return SASH_WIDTH; } public int getStyle() {
/** * Returns the width of the sashes when the controls in the SashForm are * laid out. * * @return the width of the sashes * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @since 3.4 */ public int getSashWidth() { checkWidget(); return SASH_WIDTH; } @Override
/** * Returns the width of the sashes when the controls in the SashForm are * laid out. * * @return the width of the sashes * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @since 3.4 */ public int getSashWidth() { checkWidget(); return SASH_WIDTH; } @Override
/** * Sets the layout which is associated with the receiver to be * the argument which may be null. * <p> * Note: No Layout can be set on this Control because it already * manages the size and position of its children. * </p> * * @param layout the receiver's new layout or null * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ @Override public void setLayout( Layout layout ) { checkWidget(); return; }
/** * Sets the layout which is associated with the receiver to be * the argument which may be null. * <p> * Note: No Layout can be set on this Control because it already * manages the size and position of its children. * </p> * * @param layout the receiver's new layout or null * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public void setLayout (Layout layout) { checkWidget(); return; } /**
/** * Sets the layout which is associated with the receiver to be * the argument which may be null. * <p> * Note: No Layout can be set on this Control because it already * manages the size and position of its children. * </p> * * @param layout the receiver's new layout or null * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ @Override public void setLayout (Layout layout) { checkWidget(); return; } /**
/** * Sets the layout which is associated with the receiver to be * the argument which may be null. * <p> * Note: No Layout can be set on this Control because it already * manages the size and position of its children. * </p> * * @param layout the receiver's new layout or null * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ @Override public void setLayout (Layout layout) { checkWidget(); return; } /**
/** * Sets the layout which is associated with the receiver to be * the argument which may be null. * <p> * Note: No Layout can be set on this Control because it already * manages the size and position of its children. * </p> * * @param layout the receiver's new layout or null * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ @Override public void setLayout (Layout layout) { checkWidget(); return; } /**
/** * Sets the layout which is associated with the receiver to be * the argument which may be null. * <p> * Note: No Layout can be set on this Control because it already * manages the size and position of its children. * </p> * * @param layout the receiver's new layout or null * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ @Override public void setLayout (Layout layout) { checkWidget(); return; } /**
/** * Specify the width of the sashes when the controls in the SashForm are * laid out. * * @param width the width of the sashes * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @since 3.4 */ public void setSashWidth(int width) { checkWidget(); if (SASH_WIDTH == width) return; SASH_WIDTH = width; layout(false); } public void setToolTipText(String string) {
/** * Specify the width of the sashes when the controls in the SashForm are * laid out. * * @param width the width of the sashes * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @since 3.4 */ public void setSashWidth(int width) { checkWidget(); if (SASH_WIDTH == width) return; SASH_WIDTH = width; layout(false); } @Override
/** * Specify the width of the sashes when the controls in the SashForm are * laid out. * * @param width the width of the sashes * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @since 3.4 */ public void setSashWidth(int width) { checkWidget(); if (SASH_WIDTH == width) return; SASH_WIDTH = width; layout(false); } @Override
/** * Specify the width of the sashes when the controls in the SashForm are * laid out. * * @param width the width of the sashes * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @since 3.4 */ public void setSashWidth(int width) { checkWidget(); if (SASH_WIDTH == width) return; SASH_WIDTH = width; layout(false); } @Override
/** * Specify the width of the sashes when the controls in the SashForm are * laid out. * * @param width the width of the sashes * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @since 3.4 */ public void setSashWidth(int width) { checkWidget(); if (SASH_WIDTH == width) return; SASH_WIDTH = width; layout(false); } @Override
/** * Specify the width of the sashes when the controls in the SashForm are * laid out. * * @param width the width of the sashes * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> * * @since 1.2 */ public void setSashWidth( int width ) { checkWidget(); if( SASH_WIDTH == width ) { return; } SASH_WIDTH = width; layout( false ); }
/** * Answer the relative weight of each child in the SashForm. The weight represents the * percent of the total width (if SashForm has Horizontal orientation) or * total height (if SashForm has Vertical orientation) each control occupies. * The weights are returned in order of the creation of the widgets (weight[0] * corresponds to the weight of the first child created). * * @return the relative weight of each child * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public int[] getWeights() { checkWidget(); Control[] cArray = getControls( false ); int[] ratios = new int[ cArray.length ]; for( int i = 0; i < cArray.length; i++ ) { Object data = cArray[ i ].getLayoutData(); if( data != null && data instanceof SashFormData ) { ratios[ i ] = ( int )( ( ( SashFormData )data ).weight * 1000 >> 16 ); } else { ratios[ i ] = 200; } } return ratios; }
/** * Answer the relative weight of each child in the SashForm. The weight represents the * percent of the total width (if SashForm has Horizontal orientation) or * total height (if SashForm has Vertical orientation) each control occupies. * The weights are returned in order of the creation of the widgets (weight[0] * corresponds to the weight of the first child created). * * @return the relative weight of each child * * @exception SWTException <ul> * <li>ERROR_WIDGET_DISPOSED - if the receiver has been disposed</li> * <li>ERROR_THREAD_INVALID_ACCESS - if not called from the thread that created the receiver</li> * </ul> */ public int[] getWeights() { checkWidget(); Control[] cArray = getControls(false); int[] ratios = new int[cArray.length]; for (int i = 0; i < cArray.length; i++) { Object data = cArray[i].getLayoutData(); if (data != null && data instanceof SashFormData) { ratios[i] = (int)(((SashFormData)data).weight * 1000 >> 16); } else { ratios[i] = 200; } } return ratios; } Control[] getControls(boolean onlyVisible) {