1
0
Fork 0
mirror of https://github.com/eclipse-cdt/cdt synced 2025-04-29 19:45:01 +02:00

Cosmetics

This commit is contained in:
Sergey Prigogin 2013-01-10 14:41:10 -08:00
parent 55e2872e32
commit 4de71f6542
2 changed files with 13 additions and 16 deletions

View file

@ -648,7 +648,6 @@ public class NameStyleBlock extends OptionsConfigurationBlock {
private class NameStyleAdapter extends ViewerComparator
implements ITreeListAdapter<Category>, IDialogFieldListener {
@Override
public void selectionChanged(TreeListDialogField<Category> field) {
updateConfigurationBlock(field.getSelectedElements());

View file

@ -10,7 +10,6 @@
*******************************************************************************/
package org.eclipse.cdt.utils.ui.controls;
import org.eclipse.swt.SWT;
import org.eclipse.swt.graphics.Point;
import org.eclipse.swt.graphics.Rectangle;
@ -22,34 +21,33 @@ import org.eclipse.swt.widgets.Layout;
* @noextend This class is not intended to be subclassed by clients.
*/
public class TabFolderLayout extends Layout {
@Override
protected Point computeSize (Composite composite, int wHint, int hHint, boolean flushCache) {
protected Point computeSize(Composite composite, int wHint, int hHint, boolean flushCache) {
if (wHint != SWT.DEFAULT && hHint != SWT.DEFAULT)
return new Point(wHint, hHint);
Control [] children = composite.getChildren ();
Control[] children = composite.getChildren();
int count = children.length;
int maxWidth = 0, maxHeight = 0;
for (int i=0; i<count; i++) {
for (int i = 0; i < count; i++) {
Control child = children [i];
Point pt = child.computeSize (SWT.DEFAULT, SWT.DEFAULT, flushCache);
maxWidth = Math.max (maxWidth, pt.x);
maxHeight = Math.max (maxHeight, pt.y);
Point pt = child.computeSize(SWT.DEFAULT, SWT.DEFAULT, flushCache);
maxWidth = Math.max(maxWidth, pt.x);
maxHeight = Math.max(maxHeight, pt.y);
}
if (wHint != SWT.DEFAULT)
maxWidth= wHint;
if (hHint != SWT.DEFAULT)
maxHeight= hHint;
return new Point(maxWidth, maxHeight);
return new Point(maxWidth, maxHeight);
}
@Override
protected void layout (Composite composite, boolean flushCache) {
protected void layout(Composite composite, boolean flushCache) {
Rectangle rect= composite.getClientArea();
Control[] children = composite.getChildren();
for (int i = 0; i < children.length; i++) {
children[i].setBounds(rect);