Fixed Scroll Bar on ConditionWidget
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-expression-widget@92406 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
fec8161c58
commit
08b43ede6e
|
@ -30,6 +30,7 @@ import com.sencha.gxt.data.shared.ListStore;
|
|||
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutData;
|
||||
import com.sencha.gxt.widget.core.client.container.HBoxLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.VBoxLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer.VerticalLayoutData;
|
||||
import com.sencha.gxt.widget.core.client.event.BeforeShowEvent;
|
||||
|
@ -78,7 +79,10 @@ public class ConditionWidget extends SimpleContainer {
|
|||
itemIdBtnDel = "BtnDel"+column.getName();
|
||||
|
||||
VerticalLayoutContainer baseLayout = new VerticalLayoutContainer();
|
||||
|
||||
//baseLayout.setAdjustForScroll(true);
|
||||
//baseLayout.setScrollMode(ScrollMode.AUTOY);
|
||||
//baseLayout.getScrollSupport().setScrollMode(ScrollMode.AUTO);
|
||||
|
||||
Radio radioAll = new Radio();
|
||||
radioAll.setName("All");
|
||||
radioAll.setBoxLabel("All conditions");
|
||||
|
@ -106,11 +110,22 @@ public class ConditionWidget extends SimpleContainer {
|
|||
vert = new VerticalLayoutContainer();
|
||||
vert.setScrollMode(ScrollMode.AUTO);
|
||||
vert.setAdjustForScroll(true);
|
||||
/*if(baseLayout.getScrollSupport()==null){
|
||||
Log.error("ScrollSupport is null");
|
||||
} else {
|
||||
Log.info("ScrollSupport:"+baseLayout.getScrollSupport());
|
||||
baseLayout.getScrollSupport().setScrollMode(ScrollMode.AUTO);
|
||||
}*/
|
||||
|
||||
|
||||
setup();
|
||||
|
||||
baseLayout.add(vert, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||
baseLayout.add(vert, new VerticalLayoutData(1, 1, new Margins(0)));
|
||||
|
||||
add(baseLayout);
|
||||
|
||||
|
||||
|
||||
show();
|
||||
|
||||
|
||||
|
@ -141,6 +156,7 @@ public class ConditionWidget extends SimpleContainer {
|
|||
matchLabel.setVisible(true);
|
||||
addCondition();
|
||||
thisCont.forceLayout();
|
||||
vert.forceLayout();
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -163,6 +179,7 @@ public class ConditionWidget extends SimpleContainer {
|
|||
}
|
||||
}
|
||||
thisCont.forceLayout();
|
||||
vert.forceLayout();
|
||||
|
||||
}
|
||||
});
|
||||
|
@ -252,7 +269,7 @@ public class ConditionWidget extends SimpleContainer {
|
|||
horiz.add(btnAdd, new BoxLayoutData(new Margins(2, 0, 2, 0)));
|
||||
horiz.add(btnDel, new BoxLayoutData(new Margins(2, 0, 2, 0)));
|
||||
|
||||
vert.add(horiz, new VerticalLayoutData(-1, -1, new Margins(1)));
|
||||
vert.add(horiz, new VerticalLayoutData(-1,-1,new Margins(1)));
|
||||
|
||||
addBeforeShowHandler(new BeforeShowEvent.BeforeShowHandler() {
|
||||
|
||||
|
@ -262,6 +279,9 @@ public class ConditionWidget extends SimpleContainer {
|
|||
|
||||
}
|
||||
});
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
|
||||
|
@ -292,6 +312,7 @@ public class ConditionWidget extends SimpleContainer {
|
|||
matchLabel.setVisible(true);
|
||||
addCondition();
|
||||
thisCont.forceLayout();
|
||||
vert.forceLayout();
|
||||
}
|
||||
});
|
||||
btnAdd.setVisible(false);
|
||||
|
@ -313,6 +334,7 @@ public class ConditionWidget extends SimpleContainer {
|
|||
}
|
||||
}
|
||||
thisCont.forceLayout();
|
||||
vert.forceLayout();
|
||||
}
|
||||
});
|
||||
|
||||
|
@ -400,9 +422,9 @@ public class ConditionWidget extends SimpleContainer {
|
|||
horiz.add(secondArg, new BoxLayoutData(new Margins(0)));
|
||||
horiz.add(btnAdd, new BoxLayoutData(new Margins(2, 0, 2, 0)));
|
||||
horiz.add(btnDel, new BoxLayoutData(new Margins(2, 0, 2, 0)));
|
||||
|
||||
vert.add(horiz, new VerticalLayoutData(-1, -1, new Margins(1)));
|
||||
|
||||
|
||||
vert.add(horiz, new VerticalLayoutData(-1,-1,new Margins(1)));
|
||||
|
||||
}
|
||||
|
||||
public C_Expression getExpression() {
|
||||
|
|
Loading…
Reference in New Issue