Skip to content

Commit

Permalink
Fixed a couple of compiler warnings
Browse files Browse the repository at this point in the history
  • Loading branch information
pescuma committed Oct 13, 2013
1 parent b46ab62 commit f08e462
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 4 deletions.
5 changes: 3 additions & 2 deletions src/org/pescuma/jfg/gui/swt/AllInSameLineLayoutBuilder.java
Expand Up @@ -24,6 +24,7 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Layout;

public class AllInSameLineLayoutBuilder implements SWTLayoutBuilder, Cloneable
{
Expand Down Expand Up @@ -53,7 +54,7 @@ public void init(Composite root, Runnable layoutListener, JfgFormData data)
this.layoutListener = layoutListener;
this.data = data;

GridLayout layout = (GridLayout) parent.getLayout();
Layout layout = parent.getLayout();

if (layout == null)
parent.setLayout(createBorderlessGridLayout(1, false));
Expand All @@ -62,7 +63,7 @@ else if (!(layout instanceof GridLayout))
throw new IllegalArgumentException("SWTAllInSameLineBuilder needs a GridLayout");

else
layout.numColumns = 1;
((GridLayout) layout).numColumns = 1;
}

private void updateColumns(int columnsToAdd)
Expand Down
Expand Up @@ -24,6 +24,7 @@
import org.eclipse.swt.widgets.Control;
import org.eclipse.swt.widgets.Group;
import org.eclipse.swt.widgets.Label;
import org.eclipse.swt.widgets.Layout;

public class OneAttributePerLineFormLayout implements SWTLayoutBuilder, Cloneable
{
Expand All @@ -41,7 +42,7 @@ public void init(Composite parent, Runnable layoutListener, JfgFormData data)
this.layoutListener = layoutListener;
this.data = data;

GridLayout layout = (GridLayout) this.parent.getLayout();
Layout layout = this.parent.getLayout();

if (layout == null)
this.parent.setLayout(createBorderlessGridLayout(2, false));
Expand All @@ -50,7 +51,7 @@ else if (!(layout instanceof GridLayout))
throw new IllegalArgumentException("SWTSimpleFormBuilder needs a GridLayout");

else
layout.numColumns = 2;
((GridLayout) layout).numColumns = 2;
}

@Override
Expand Down

0 comments on commit f08e462

Please sign in to comment.