/** * Generates a GridLayout for the given composite by examining its child * controls and attaching layout data to any immediate children that do not * already have layout data. * * @param toGenerate * composite to generate a layout for */ public static void generateLayout(Composite toGenerate) { Control[] children = toGenerate.getChildren(); for (int i = 0; i < children.length; i++) { Control control = children[i]; // Skip any children that already have layout data if (control.getLayoutData() != null) { continue; } applyLayoutDataTo(control); } }
/** * Generates a GridLayout for the given composite by examining its child * controls and attaching layout data to any immediate children that do not * already have layout data. * * @param toGenerate * composite to generate a layout for */ public static void generateLayout(Composite toGenerate) { Control[] children = toGenerate.getChildren(); for (Control control : children) { // Skip any children that already have layout data if (control.getLayoutData() != null) { continue; } applyLayoutDataTo(control); } }
/** * Generates a GridLayout for the given composite by examining its child * controls and attaching layout data to any immediate children that do not * already have layout data. * * @param toGenerate * composite to generate a layout for */ public static void generateLayout(Composite toGenerate) { Control[] children = toGenerate.getChildren(); for (int i = 0; i < children.length; i++) { Control control = children[i]; // Skip any children that already have layout data if (control.getLayoutData() != null) { continue; } applyLayoutDataTo(control); } }