/** * Returns a GridDataFactory initialized with heuristicly generated defaults for the given control. * To be precise, this method picks the default values that GridLayoutFactory.generateLayout * would have assigned to the control. Does not attach GridData to the control. Callers must * additionally call applyTo(theControl) if they wish to use the generated values. * * <p> * This method is intended for situations where generateLayout is generating layout data * for a particular control that is not quite right for the desired layout. * This allows callers to start with the generated values and tweak one or two settings * before applying the GridData to the control. * </p> * * @see GridLayoutFactory#generateLayout(org.eclipse.swt.widgets.Composite) * @param theControl * @return a GridLayoutFactory initialized with defaults that GridLayoutFactory would have */ public static GridDataFactory defaultsFor(Control theControl) { return LayoutGenerator.defaultsFor(theControl); }
/** * Returns a GridDataFactory initialized with heuristicly generated defaults for the given control. * To be precise, this method picks the default values that GridLayoutFactory.generateLayout * would have assigned to the control. Does not attach GridData to the control. Callers must * additionally call applyTo(theControl) if they wish to use the generated values. * * <p> * This method is intended for situations where generateLayout is generating layout data * for a particular control that is not quite right for the desired layout. * This allows callers to start with the generated values and tweak one or two settings * before applying the GridData to the control. * </p> * * @see GridLayoutFactory#generateLayout(org.eclipse.swt.widgets.Composite) * @param theControl * @return a GridLayoutFactory initialized with defaults that GridLayoutFactory would have * @since 3.3 */ public static GridDataFactory defaultsFor(Control theControl) { return LayoutGenerator.defaultsFor(theControl); }
/** * Returns a GridDataFactory initialized with heuristicly generated defaults for the given control. * To be precise, this method picks the default values that GridLayoutFactory.generateLayout * would have assigned to the control. Does not attach GridData to the control. Callers must * additionally call applyTo(theControl) if they wish to use the generated values. * * <p> * This method is intended for situations where generateLayout is generating layout data * for a particular control that is not quite right for the desired layout. * This allows callers to start with the generated values and tweak one or two settings * before applying the GridData to the control. * </p> * * @see GridLayoutFactory#generateLayout(org.eclipse.swt.widgets.Composite) * @param theControl * @return a GridDataFactory initialized with defaults that GridLayoutFactory would have assigned * @since 3.3 */ public static GridDataFactory defaultsFor(Control theControl) { return LayoutGenerator.defaultsFor(theControl); }
private static void applyLayoutDataTo(Control control) { defaultsFor(control).applyTo(control); }
private static void applyLayoutDataTo(Control control) { defaultsFor(control).applyTo(control); }
private static void applyLayoutDataTo(Control control) { defaultsFor(control).applyTo(control); }