Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@93329 82a268e6-3cf1-43bd-a215-b396298e98cf
|
@ -28,7 +28,7 @@ public class BatchReplaceDialog extends Window {
|
|||
this.columnName=columnName;
|
||||
initWindow();
|
||||
|
||||
BatchReplacePanel batchRepalcePanel= new BatchReplacePanel(trId,columnName,eventBus);
|
||||
BatchReplacePanel batchRepalcePanel= new BatchReplacePanel(this, trId,columnName,eventBus);
|
||||
add(batchRepalcePanel);
|
||||
}
|
||||
|
||||
|
|
|
@ -22,6 +22,7 @@ import com.google.gwt.safecss.shared.SafeStylesBuilder;
|
|||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||
import com.google.gwt.user.client.ui.HTML;
|
||||
import com.google.web.bindery.event.shared.EventBus;
|
||||
import com.sencha.gxt.cell.core.client.ButtonCell.IconAlign;
|
||||
import com.sencha.gxt.core.client.IdentityValueProvider;
|
||||
import com.sencha.gxt.core.client.Style.SelectionMode;
|
||||
import com.sencha.gxt.core.client.resources.ThemeStyles;
|
||||
|
@ -37,6 +38,11 @@ import com.sencha.gxt.data.shared.loader.ListLoadResultBean;
|
|||
import com.sencha.gxt.data.shared.loader.ListLoader;
|
||||
import com.sencha.gxt.data.shared.loader.LoadResultListStoreBinding;
|
||||
import com.sencha.gxt.widget.core.client.FramedPanel;
|
||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutData;
|
||||
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutPack;
|
||||
import com.sencha.gxt.widget.core.client.container.HBoxLayoutContainer;
|
||||
import com.sencha.gxt.widget.core.client.container.HBoxLayoutContainer.HBoxLayoutAlign;
|
||||
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.SelectEvent;
|
||||
|
@ -64,16 +70,21 @@ public class BatchReplacePanel extends FramedPanel {
|
|||
protected TRId trId;
|
||||
protected String columnName;
|
||||
protected ColumnData column;
|
||||
|
||||
protected BatchReplaceDialog batchReplaceDialog;
|
||||
|
||||
protected static final String DON_T_REPLACE = "Don't replace";
|
||||
|
||||
private TextButton btnApply;
|
||||
private TextButton btnClose;
|
||||
|
||||
|
||||
protected ListLoader<ListLoadConfig, ListLoadResult<ReplaceEntry>> loader;
|
||||
protected Grid<ReplaceEntry> grid;
|
||||
protected ListStore<ReplaceEntry> store;
|
||||
protected HTML info;
|
||||
|
||||
public BatchReplacePanel(TRId trId, String columnName, EventBus eventBus) {
|
||||
public BatchReplacePanel(BatchReplaceDialog batchReplaceDialog, TRId trId, String columnName, EventBus eventBus) {
|
||||
this.batchReplaceDialog=batchReplaceDialog;
|
||||
Log.debug("BatchReplacePanel:["+trId+", columnName:"+columnName+"]");
|
||||
setWidth(WIDTH);
|
||||
setHeight(HEIGHT);
|
||||
|
@ -157,12 +168,6 @@ public class BatchReplacePanel extends FramedPanel {
|
|||
|
||||
});
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
RpcProxy<ListLoadConfig, ListLoadResult<ReplaceEntry>> proxy = new RpcProxy<ListLoadConfig, ListLoadResult<ReplaceEntry>>() {
|
||||
|
||||
|
@ -198,7 +203,7 @@ public class BatchReplacePanel extends FramedPanel {
|
|||
number.initPlugin(grid);
|
||||
// grid.getView().setAutoExpandColumn(labelCol);
|
||||
// grid.setHeight(360);
|
||||
grid.setHeight("454px");
|
||||
grid.setHeight("418px");
|
||||
grid.getView().setStripeRows(true);
|
||||
grid.getView().setColumnLines(true);
|
||||
grid.getView().setAutoFill(true);
|
||||
|
@ -215,10 +220,46 @@ public class BatchReplacePanel extends FramedPanel {
|
|||
toolBar.addStyleName(ThemeStyles.getStyle().borderTop());
|
||||
toolBar.getElement().getStyle().setProperty("borderBottom", "none");
|
||||
|
||||
btnApply = new TextButton("Save");
|
||||
btnApply.setIcon(ResourceBundle.INSTANCE.save());
|
||||
btnApply.setIconAlign(IconAlign.RIGHT);
|
||||
btnApply.setTitle("Apply Filter");
|
||||
btnApply.addSelectHandler(new SelectHandler() {
|
||||
|
||||
public void onSelect(SelectEvent event) {
|
||||
Log.debug("Pressed Apply");
|
||||
save();
|
||||
|
||||
}
|
||||
});
|
||||
|
||||
btnClose = new TextButton("Close");
|
||||
btnClose.setIcon(ResourceBundle.INSTANCE.close());
|
||||
btnClose.setIconAlign(IconAlign.RIGHT);
|
||||
btnClose.setTitle("Cancel filter");
|
||||
btnClose.addSelectHandler(new SelectHandler() {
|
||||
|
||||
public void onSelect(SelectEvent event) {
|
||||
Log.debug("Pressed Close");
|
||||
close();
|
||||
}
|
||||
});
|
||||
|
||||
HBoxLayoutContainer flowButton = new HBoxLayoutContainer();
|
||||
flowButton.setHBoxLayoutAlign(HBoxLayoutAlign.MIDDLE);
|
||||
flowButton.setPack(BoxLayoutPack.CENTER);
|
||||
|
||||
flowButton
|
||||
.add(btnApply, new BoxLayoutData(new Margins(2, 4, 2, 4)));
|
||||
flowButton
|
||||
.add(btnClose, new BoxLayoutData(new Margins(2, 4, 2, 4)));
|
||||
|
||||
|
||||
VerticalLayoutContainer v = new VerticalLayoutContainer();
|
||||
v.add(grid, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||
v.add(toolBar,new VerticalLayoutData(1, 25, new Margins(0)));
|
||||
|
||||
v.add(flowButton, new VerticalLayoutData(-1, 36, new Margins(
|
||||
5, 2, 5, 2)));
|
||||
add(v);
|
||||
|
||||
|
||||
|
@ -330,7 +371,13 @@ public class BatchReplacePanel extends FramedPanel {
|
|||
return data;
|
||||
}
|
||||
|
||||
protected void save(){
|
||||
|
||||
}
|
||||
|
||||
protected void close(){
|
||||
batchReplaceDialog.close();
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -39,5 +39,20 @@ public interface ResourceBundle extends ClientBundle {
|
|||
|
||||
@Source("column-values_32.png")
|
||||
ImageResource replace32();
|
||||
|
||||
@Source("close-red.png")
|
||||
ImageResource close();
|
||||
|
||||
@Source("close-red_32.png")
|
||||
ImageResource close32();
|
||||
|
||||
@Source("disk.png")
|
||||
ImageResource save();
|
||||
|
||||
@Source("disk_32.png")
|
||||
ImageResource save32();
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
After Width: | Height: | Size: 693 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 482 B |
After Width: | Height: | Size: 886 B |
After Width: | Height: | Size: 693 B |
After Width: | Height: | Size: 1.6 KiB |
After Width: | Height: | Size: 482 B |
After Width: | Height: | Size: 886 B |