2521: Explore the possibility to port the StatMan interface onto Dataminer
https://support.d4science.org/issues/2521 Fixed Layout for FileFld git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/data-miner-manager@127017 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
b7094db85a
commit
201fcbc59c
|
@ -80,9 +80,9 @@ public class ComputationExecutionPanel extends FramedPanel {
|
||||||
final ComputationStatusPanel statusPanel = new ComputationStatusPanel(
|
final ComputationStatusPanel statusPanel = new ComputationStatusPanel(
|
||||||
operator);
|
operator);
|
||||||
computationStatusPanels.add(statusPanel);
|
computationStatusPanels.add(statusPanel);
|
||||||
Log.debug("Added status bar ");
|
Log.debug("Added status bar");
|
||||||
v.insert(statusPanel, 0, new VerticalLayoutData(1, -1,
|
v.insert(statusPanel, 0, new VerticalLayoutData(1, -1,
|
||||||
new Margins(0)));
|
new Margins(20)));
|
||||||
removeAllButton.setEnabled(true);
|
removeAllButton.setEnabled(true);
|
||||||
|
|
||||||
DataMinerManager.getService().startComputation(operator,
|
DataMinerManager.getService().startComputation(operator,
|
||||||
|
@ -135,22 +135,22 @@ public class ComputationExecutionPanel extends FramedPanel {
|
||||||
computationItem.getOperator());
|
computationItem.getOperator());
|
||||||
computationStatusPanels.add(statusPanel);
|
computationStatusPanels.add(statusPanel);
|
||||||
v.insert(statusPanel, 0, new VerticalLayoutData(1, -1,
|
v.insert(statusPanel, 0, new VerticalLayoutData(1, -1,
|
||||||
new Margins(0)));
|
new Margins(20)));
|
||||||
removeAllButton.setEnabled(true);
|
removeAllButton.setEnabled(true);
|
||||||
|
|
||||||
DataMinerManager.getService().resubmit(
|
DataMinerManager.getService().resubmit(
|
||||||
computationItem.getComputationId(),
|
computationItem.getComputationId(),
|
||||||
new AsyncCallback<ComputationId>() {
|
new AsyncCallback<ComputationId>() {
|
||||||
@Override
|
@Override
|
||||||
public void onSuccess(ComputationId id) {
|
public void onSuccess(ComputationId computationId) {
|
||||||
if (id == null)
|
if (computationId == null)
|
||||||
UtilsGXT3
|
UtilsGXT3
|
||||||
.alert("ERROR",
|
.alert("ERROR",
|
||||||
"Failed to resubmit computation "
|
"Failed to resubmit computation "
|
||||||
+ computationItem.getName()
|
+ computationItem.getName()
|
||||||
+ ", the computation id is null (1)");
|
+ ", the computation id is null (1)");
|
||||||
else {
|
else {
|
||||||
statusPanel.computationStarted(id);
|
statusPanel.computationStarted(computationId);
|
||||||
EventBusProvider.INSTANCE
|
EventBusProvider.INSTANCE
|
||||||
.fireEvent(new JobsGridGotDirtyEvent());
|
.fireEvent(new JobsGridGotDirtyEvent());
|
||||||
}
|
}
|
||||||
|
|
|
@ -86,7 +86,9 @@ public class ComputationParametersPanel extends SimpleContainer {
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init() {
|
private void init() {
|
||||||
addStyleName("workflow");
|
setStylePrimaryName("workflow");
|
||||||
|
setResize(true);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void create() {
|
private void create() {
|
||||||
|
@ -107,7 +109,7 @@ public class ComputationParametersPanel extends SimpleContainer {
|
||||||
String descr = operator.getDescription();
|
String descr = operator.getDescription();
|
||||||
descr = (descr == null || descr.contentEquals("")) ? "no-description"
|
descr = (descr == null || descr.contentEquals("")) ? "no-description"
|
||||||
: operator.getDescription();
|
: operator.getDescription();
|
||||||
HtmlLayoutContainer description = new HtmlLayoutContainer("<span>"
|
HtmlLayoutContainer description = new HtmlLayoutContainer("<span style='padding-right:10px;'>"
|
||||||
+ descr + "</span>");
|
+ descr + "</span>");
|
||||||
description.addStyleName("workflow-description");
|
description.addStyleName("workflow-description");
|
||||||
v.add(description, new VerticalLayoutData(-1, -1, new Margins(0, 5, 0,
|
v.add(description, new VerticalLayoutData(-1, -1, new Margins(0, 5, 0,
|
||||||
|
@ -133,22 +135,22 @@ public class ComputationParametersPanel extends SimpleContainer {
|
||||||
|
|
||||||
};
|
};
|
||||||
//parametersPanel = new FramedPanel();
|
//parametersPanel = new FramedPanel();
|
||||||
parametersPanel.setDeferHeight(false);
|
|
||||||
parametersPanel.setBorders(false);
|
parametersPanel.setBorders(false);
|
||||||
|
parametersPanel.getElement().getStyle().setPaddingBottom(20, Unit.PX);
|
||||||
// parametersPanel.getElement().getStyle().setMargin(20, px);
|
|
||||||
parametersFieldSet = new FieldSet();
|
parametersFieldSet = new FieldSet();
|
||||||
parametersFieldSet.setHeadingText("Parameters");
|
parametersFieldSet.setHeadingText("Parameters");
|
||||||
|
|
||||||
vParameters = new VerticalLayoutContainer();
|
vParameters = new VerticalLayoutContainer();
|
||||||
|
|
||||||
Image imgLoading = new Image(PRELOAD_IMAGE);
|
Image imgLoading = new Image(PRELOAD_IMAGE);
|
||||||
vParameters.add(imgLoading, new VerticalLayoutData(1, -1, new Margins(5)));
|
vParameters.add(imgLoading, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||||
|
|
||||||
parametersFieldSet.add(vParameters, new MarginData(0));
|
parametersFieldSet.add(vParameters, new MarginData(new Margins(0)));
|
||||||
parametersFieldSet.setCollapsible(false);
|
parametersFieldSet.setCollapsible(false);
|
||||||
parametersPanel.add(parametersFieldSet, new MarginData(new Margins(5)));
|
parametersPanel.add(parametersFieldSet);
|
||||||
v.add(parametersPanel, new VerticalLayoutData(1, -1, new Margins()));
|
|
||||||
|
v.add(parametersPanel, new VerticalLayoutData(1, -1, new Margins(5)));
|
||||||
|
|
||||||
submit = new TextButton("Start Computation");
|
submit = new TextButton("Start Computation");
|
||||||
submit.setToolTip(START_BUTTON_TOOLTIP);
|
submit.setToolTip(START_BUTTON_TOOLTIP);
|
||||||
|
@ -177,8 +179,9 @@ public class ComputationParametersPanel extends SimpleContainer {
|
||||||
//, new VerticalLayoutData(-1, -1, new Margins(0, 0, 20, 20)));
|
//, new VerticalLayoutData(-1, -1, new Margins(0, 0, 20, 20)));
|
||||||
submit.setVisible(false);
|
submit.setVisible(false);
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
forceLayout();
|
forceLayout();
|
||||||
|
|
||||||
loadOperatorParameters();
|
loadOperatorParameters();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
@ -274,7 +277,7 @@ public class ComputationParametersPanel extends SimpleContainer {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
parametersPanel.getElement().getStyle().setPaddingBottom(0, Unit.PX);
|
||||||
submit.setVisible(true);
|
submit.setVisible(true);
|
||||||
forceLayout();
|
forceLayout();
|
||||||
} catch (Throwable e) {
|
} catch (Throwable e) {
|
||||||
|
|
|
@ -18,33 +18,63 @@ import org.gcube.portlets.user.dataminermanager.shared.data.ComputationId;
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.exception.ExpiredSessionServiceException;
|
import org.gcube.portlets.user.dataminermanager.shared.exception.ExpiredSessionServiceException;
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
|
import com.google.gwt.core.client.GWT;
|
||||||
import com.google.gwt.dom.client.Style.Unit;
|
import com.google.gwt.dom.client.Style.Unit;
|
||||||
import com.google.gwt.i18n.client.NumberFormat;
|
import com.google.gwt.i18n.client.NumberFormat;
|
||||||
|
import com.google.gwt.resources.client.ClientBundle;
|
||||||
|
import com.google.gwt.resources.client.ImageResource;
|
||||||
|
import com.google.gwt.resources.client.ClientBundle.Source;
|
||||||
|
import com.google.gwt.resources.client.ImageResource.ImageOptions;
|
||||||
|
import com.google.gwt.resources.client.ImageResource.RepeatStyle;
|
||||||
|
import com.google.gwt.safehtml.shared.SafeHtmlBuilder;
|
||||||
import com.google.gwt.user.client.Timer;
|
import com.google.gwt.user.client.Timer;
|
||||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
import com.google.gwt.user.client.ui.HTML;
|
import com.google.gwt.user.client.ui.HTML;
|
||||||
|
import com.sencha.gxt.cell.core.client.ProgressBarCell;
|
||||||
|
import com.sencha.gxt.cell.core.client.ProgressBarCell.ProgressBarAppearanceOptions;
|
||||||
|
import com.sencha.gxt.core.client.util.Margins;
|
||||||
|
import com.sencha.gxt.theme.base.client.progress.ProgressBarDefaultAppearance;
|
||||||
|
import com.sencha.gxt.theme.base.client.progress.ProgressBarDefaultAppearance.ProgressBarResources;
|
||||||
|
import com.sencha.gxt.theme.base.client.progress.ProgressBarDefaultAppearance.ProgressBarStyle;
|
||||||
|
import com.sencha.gxt.theme.base.client.progress.ProgressBarDefaultAppearance.ProgressBarTemplate;
|
||||||
|
import com.sencha.gxt.theme.blue.client.progress.BlueProgressBarAppearance.BlueProgressBarResources;
|
||||||
import com.sencha.gxt.widget.core.client.ProgressBar;
|
import com.sencha.gxt.widget.core.client.ProgressBar;
|
||||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.HtmlLayoutContainer;
|
||||||
import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
||||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
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;
|
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||||
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
|
||||||
import com.sencha.gxt.widget.core.client.info.Info;
|
import com.sencha.gxt.widget.core.client.info.Info;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ceras
|
*
|
||||||
|
* @author Giancarlo Panichi
|
||||||
|
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ComputationStatusPanel extends SimpleContainer {
|
public class ComputationStatusPanel extends SimpleContainer {
|
||||||
|
|
||||||
|
/*
|
||||||
|
private class ProgressBarColoredAppearance extends ProgressBarDefaultAppearance {
|
||||||
|
|
||||||
|
public ProgressBarColoredAppearance(ProgressBarResources resources,
|
||||||
|
ProgressBarTemplate template) {
|
||||||
|
super(resources, template);
|
||||||
|
// TODO Auto-generated constructor stub
|
||||||
|
}
|
||||||
|
|
||||||
|
}*/
|
||||||
|
|
||||||
|
|
||||||
private ProgressBar progressBar = new ProgressBar();
|
|
||||||
|
private ProgressBar progressBar;
|
||||||
private ComputationId computationId;
|
private ComputationId computationId;
|
||||||
private Operator operator;
|
private Operator operator;
|
||||||
private boolean terminated=false;
|
private boolean terminated=false;
|
||||||
private ComputationTimer timer = new ComputationTimer();
|
private ComputationTimer timer = new ComputationTimer();
|
||||||
private TextButton cancelComputationButton;
|
private TextButton cancelComputationBtn;
|
||||||
private VerticalLayoutContainer vert;
|
private VerticalLayoutContainer vert;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -52,53 +82,85 @@ public class ComputationStatusPanel extends SimpleContainer {
|
||||||
*/
|
*/
|
||||||
public ComputationStatusPanel(Operator operator) {
|
public ComputationStatusPanel(Operator operator) {
|
||||||
super();
|
super();
|
||||||
this.operator=operator;
|
this.operator=operator;
|
||||||
init();
|
init();
|
||||||
|
create();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void init(){
|
private void init(){
|
||||||
|
setStylePrimaryName("computationStatusPanel");
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
private void create(){
|
||||||
vert=new VerticalLayoutContainer();
|
vert=new VerticalLayoutContainer();
|
||||||
HTML title = new HTML("<div class='computationTitle'>Computation of <b>" + operator.getName() + "</b></div>");
|
HtmlLayoutContainer title = new HtmlLayoutContainer("<div class='computationStatusTitle'><p>Computation of <b>" + operator.getName() + "</b></p></div>");
|
||||||
HTML date = new HTML("<div class='computationDate'>" + new Date().toString() + "</div>");
|
HtmlLayoutContainer date = new HtmlLayoutContainer("<div class='computationStatusDate'><p>" + new Date().toString() + "</p></div>");
|
||||||
vert.add(title);
|
|
||||||
vert.add(date);
|
vert.add(title, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||||
|
vert.add(date,new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||||
|
|
||||||
add(vert);
|
add(vert);
|
||||||
forceLayout();
|
forceLayout();
|
||||||
}
|
}
|
||||||
|
/*
|
||||||
/* (non-Javadoc)
|
private void custom(){
|
||||||
* @see com.extjs.gxt.ui.client.widget.Container#onAttach()
|
ProgressBarCell cell=new ProgressBarCell(new GreenProgressBarAppearance());
|
||||||
*/
|
|
||||||
@Override
|
|
||||||
protected void onAttach() {
|
|
||||||
super.onAttach();
|
|
||||||
progressBar.redraw();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public class GreenProgressBarAppearance extends ProgressBarDefaultAppearance {
|
||||||
|
|
||||||
|
public interface GreenProgressBarResources extends ProgressBarResources, ClientBundle {
|
||||||
|
|
||||||
|
@Source({"com/sencha/gxt/theme/base/client/progress/ProgressBar.css", "ProgressBar.css"})
|
||||||
|
@Override
|
||||||
|
ProgressBarStyle style();
|
||||||
|
|
||||||
|
@Source("progress-bg.gif")
|
||||||
|
@Override
|
||||||
|
@ImageOptions(repeatStyle = RepeatStyle.Horizontal)
|
||||||
|
ImageResource bar();
|
||||||
|
|
||||||
|
@Source("bg.gif")
|
||||||
|
@ImageOptions(repeatStyle = RepeatStyle.Horizontal)
|
||||||
|
ImageResource innerBar();
|
||||||
|
}
|
||||||
|
|
||||||
|
public GreenProgressBarAppearance() {
|
||||||
|
super(GWT.<ProgressBarResources> create(GreenProgressBarResources.class),
|
||||||
|
GWT.<ProgressBarTemplate> create(ProgressBarTemplate.class));
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
*/
|
||||||
/**
|
/**
|
||||||
* @param computationId the computationId to set
|
* @param computationId the computationId to set
|
||||||
*/
|
*/
|
||||||
public void computationStarted(ComputationId computationId) {
|
public void computationStarted(ComputationId computationId) {
|
||||||
this.computationId = computationId;
|
this.computationId = computationId;
|
||||||
vert.add(new HTML("Created, the id is "+computationId.getId()+" [<a href='"+computationId.getUrlId()+"' >link</a>]"));
|
vert.add(new HtmlLayoutContainer("<p>Created, the id is "+computationId.getId()+" [<a href='"+computationId.getUrlId()+"' >link</a>]</p>"));
|
||||||
progressBar.getElement().getStyle().setMargin(20, Unit.PX);
|
//progressBar.getElement().getStyle().setMargin(20, Unit.PX);
|
||||||
|
progressBar = new ProgressBar();
|
||||||
progressBar.updateProgress(0, "Starting...");
|
progressBar.updateProgress(0, "Starting...");
|
||||||
vert.add(progressBar);
|
vert.add(progressBar,new VerticalLayoutData(1, -1, new Margins(20)));
|
||||||
|
|
||||||
|
cancelComputationBtn = new TextButton("Cancel");
|
||||||
|
|
||||||
cancelComputationButton = new TextButton("Cancel");
|
cancelComputationBtn.addSelectHandler(new SelectHandler() {
|
||||||
|
|
||||||
cancelComputationButton.addSelectHandler(new SelectHandler() {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
cancelComputationButton.disable();
|
cancelComputationBtn.disable();
|
||||||
cancelComputation();
|
cancelComputation();
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
vert.add(cancelComputationButton);
|
|
||||||
|
cancelComputationBtn.getElement().getStyle().setMarginBottom(36, Unit.PX);
|
||||||
|
|
||||||
|
vert.add(cancelComputationBtn,new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||||
forceLayout();
|
forceLayout();
|
||||||
timer.scheduleRepeating(Constants.TIME_UPDATE_COMPUTATION_STATUS_PANEL);
|
timer.scheduleRepeating(Constants.TIME_UPDATE_COMPUTATION_STATUS_PANEL);
|
||||||
}
|
}
|
||||||
|
@ -139,7 +201,7 @@ public class ComputationStatusPanel extends SimpleContainer {
|
||||||
Log.debug("Computation Status:"+computationStatus);
|
Log.debug("Computation Status:"+computationStatus);
|
||||||
if (terminated == false) {
|
if (terminated == false) {
|
||||||
terminated = true;
|
terminated = true;
|
||||||
cancelComputationButton.setVisible(false);
|
cancelComputationBtn.setVisible(false);
|
||||||
if (computationStatus.isComplete()) {
|
if (computationStatus.isComplete()) {
|
||||||
Log.debug("Computation is Complete");
|
Log.debug("Computation is Complete");
|
||||||
Info.display("Terminated", "The computation "+computationId.getId()+" of "+operator.getName()+" is terminated correctly.");
|
Info.display("Terminated", "The computation "+computationId.getId()+" of "+operator.getName()+" is terminated correctly.");
|
||||||
|
@ -163,8 +225,8 @@ public class ComputationStatusPanel extends SimpleContainer {
|
||||||
UtilsGXT3.alert("Failed", "The computation "+computationId.getId()+" of "+operator.getName()+" has failed.</br>"
|
UtilsGXT3.alert("Failed", "The computation "+computationId.getId()+" of "+operator.getName()+" has failed.</br>"
|
||||||
+"Message: "+errorMessage, null);
|
+"Message: "+errorMessage, null);
|
||||||
progressBar.updateProgress(1, "Computation Fail");
|
progressBar.updateProgress(1, "Computation Fail");
|
||||||
|
progressBar.getElement().getStyle().setMarginBottom(36, Unit.PX);
|
||||||
progressBar.addStyleName("progressBar-failed");
|
progressBar.addStyleName("progressBar-failed");
|
||||||
|
|
||||||
//
|
//
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -177,9 +239,11 @@ public class ComputationStatusPanel extends SimpleContainer {
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
private void showOutput() {
|
private void showOutput() {
|
||||||
vert.add(new HTML(" The computation "+operator.getName()+" finished."));
|
HtmlLayoutContainer computationEndMessage=new HtmlLayoutContainer("<p>The computation "+operator.getName()+" finished.</p>");
|
||||||
|
vert.add(computationEndMessage, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||||
ComputationOutputPanel computationOutputPanel = new ComputationOutputPanel(computationId);
|
ComputationOutputPanel computationOutputPanel = new ComputationOutputPanel(computationId);
|
||||||
vert.add(computationOutputPanel);
|
computationOutputPanel.getElement().getStyle().setMarginBottom(36, Unit.PX);
|
||||||
|
vert.add(computationOutputPanel, new VerticalLayoutData(-1, -1, new Margins(0)));
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -212,6 +276,7 @@ public class ComputationStatusPanel extends SimpleContainer {
|
||||||
@Override
|
@Override
|
||||||
public void onFailure(Throwable caught) {
|
public void onFailure(Throwable caught) {
|
||||||
progressBar.updateProgress(1, "Failed to get the status");
|
progressBar.updateProgress(1, "Failed to get the status");
|
||||||
|
progressBar.getElement().getStyle().setMarginBottom(36, Unit.PX);
|
||||||
progressBar.addStyleName("progressBar-failed");
|
progressBar.addStyleName("progressBar-failed");
|
||||||
// MessageBox.alert("Error", ""+caught.getLocalizedMessage()+"\nCause: "+caught.getCause()+"\nStackTrace: "+caught.getStackTrace().toString(), null);
|
// MessageBox.alert("Error", ""+caught.getLocalizedMessage()+"\nCause: "+caught.getCause()+"\nStackTrace: "+caught.getStackTrace().toString(), null);
|
||||||
// computationTerminated(computationId, operator, TerminationMode.FAILED2);
|
// computationTerminated(computationId, operator, TerminationMode.FAILED2);
|
||||||
|
|
|
@ -42,11 +42,10 @@ public abstract class AbstractFld {
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
*
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public boolean isValid() {
|
public boolean isValid() {
|
||||||
// is valid by dafault
|
|
||||||
// (for string, int, float, double and boolean) the built-in validation is enough
|
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -41,9 +41,10 @@ public class BooleanFld extends AbstractFld {
|
||||||
if (p.getDefaultValue() != null)
|
if (p.getDefaultValue() != null)
|
||||||
checkBox.setValue(!p.getDefaultValue().toUpperCase()
|
checkBox.setValue(!p.getDefaultValue().toUpperCase()
|
||||||
.equals("FALSE"));
|
.equals("FALSE"));
|
||||||
else checkBox.setValue(false);
|
else
|
||||||
|
checkBox.setValue(false);
|
||||||
checkBox.setBoxLabel(p.getName());
|
checkBox.setBoxLabel(p.getName());
|
||||||
|
|
||||||
HtmlLayoutContainer descr;
|
HtmlLayoutContainer descr;
|
||||||
|
|
||||||
if (p.getDescription() == null) {
|
if (p.getDescription() == null) {
|
||||||
|
|
|
@ -37,16 +37,12 @@ import com.sencha.gxt.widget.core.client.form.ComboBox;
|
||||||
public class ColumnFld extends AbstractFld implements
|
public class ColumnFld extends AbstractFld implements
|
||||||
TabularFldChangeEventHandler {
|
TabularFldChangeEventHandler {
|
||||||
|
|
||||||
//private VerticalLayoutContainer vp;
|
|
||||||
|
|
||||||
private String defaultColumn;
|
private String defaultColumn;
|
||||||
|
|
||||||
private ComboBox<ColumnItem> comboBox;
|
private ComboBox<ColumnItem> comboBox;
|
||||||
private ListStore<ColumnItem> store;
|
private ListStore<ColumnItem> store;
|
||||||
private String referredTabularParameterName;
|
private String referredTabularParameterName;
|
||||||
|
|
||||||
private SimpleContainer fieldContainer;
|
private SimpleContainer fieldContainer;
|
||||||
|
|
||||||
private SimpleContainer vContainer;
|
private SimpleContainer vContainer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -54,19 +50,18 @@ public class ColumnFld extends AbstractFld implements
|
||||||
*/
|
*/
|
||||||
public ColumnFld(Parameter parameter) {
|
public ColumnFld(Parameter parameter) {
|
||||||
super(parameter);
|
super(parameter);
|
||||||
|
|
||||||
|
|
||||||
ColumnParameter p = (ColumnParameter) parameter;
|
ColumnParameter columnParameter = (ColumnParameter) parameter;
|
||||||
|
|
||||||
referredTabularParameterName = p.getReferredTabularParameterName();
|
referredTabularParameterName = columnParameter
|
||||||
defaultColumn = p.getDefaultColumn();
|
.getReferredTabularParameterName();
|
||||||
|
defaultColumn = columnParameter.getDefaultColumn();
|
||||||
|
|
||||||
fieldContainer = new SimpleContainer();
|
fieldContainer = new SimpleContainer();
|
||||||
HBoxLayoutContainer horiz = new HBoxLayoutContainer();
|
HBoxLayoutContainer horiz = new HBoxLayoutContainer();
|
||||||
horiz.setPack(BoxLayoutPack.START);
|
horiz.setPack(BoxLayoutPack.START);
|
||||||
horiz.setEnableOverflow(false);
|
horiz.setEnableOverflow(false);
|
||||||
|
|
||||||
|
|
||||||
ColumnItemPropertiesCombo props = GWT
|
ColumnItemPropertiesCombo props = GWT
|
||||||
.create(ColumnItemPropertiesCombo.class);
|
.create(ColumnItemPropertiesCombo.class);
|
||||||
|
|
||||||
|
@ -81,73 +76,54 @@ public class ColumnFld extends AbstractFld implements
|
||||||
|
|
||||||
HtmlLayoutContainer descr;
|
HtmlLayoutContainer descr;
|
||||||
|
|
||||||
if (p.getDescription() == null) {
|
if (columnParameter.getDescription() == null) {
|
||||||
descr = new HtmlLayoutContainer("<p style='margin-left:5px;'></p>");
|
descr = new HtmlLayoutContainer("<p style='margin-left:5px;'></p>");
|
||||||
descr.addStyleName("workflow-fieldDescription");
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
comboBox.setToolTip(p.getDescription());
|
comboBox.setToolTip(columnParameter.getDescription());
|
||||||
descr = new HtmlLayoutContainer("<p style='margin-left:5px;'>"
|
descr = new HtmlLayoutContainer("<p style='margin-left:5px;'>"
|
||||||
+ p.getDescription() + "</p>");
|
+ columnParameter.getDescription() + "</p>");
|
||||||
descr.addStyleName("workflow-fieldDescription");
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
}
|
}
|
||||||
|
|
||||||
vContainer=new SimpleContainer();
|
vContainer = new SimpleContainer();
|
||||||
showNoSelectionField();
|
showNoSelectionField();
|
||||||
horiz.add(vContainer, new BoxLayoutData(new Margins()));
|
horiz.add(vContainer, new BoxLayoutData(new Margins()));
|
||||||
horiz.add(descr, new BoxLayoutData(new Margins()));
|
horiz.add(descr, new BoxLayoutData(new Margins()));
|
||||||
|
|
||||||
fieldContainer.add(horiz);
|
fieldContainer.add(horiz);
|
||||||
fieldContainer.forceLayout();
|
fieldContainer.forceLayout();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showNoSelectionField() {
|
private void showNoSelectionField() {
|
||||||
vContainer.clear();
|
vContainer.clear();
|
||||||
VerticalLayoutContainer vField = new VerticalLayoutContainer();
|
VerticalLayoutContainer vField = new VerticalLayoutContainer();
|
||||||
HtmlLayoutContainer typeDescription= new HtmlLayoutContainer(
|
HtmlLayoutContainer typeDescription = new HtmlLayoutContainer(
|
||||||
"<div class='workflow-parameters-description'><p>Select table from parameter "
|
"<div class='workflow-parameters-description'><p>Select table from parameter "
|
||||||
+ Format.ellipse(referredTabularParameterName,30) + "</p></div>");
|
+ Format.ellipse(referredTabularParameterName, 30)
|
||||||
|
+ "</p></div>");
|
||||||
typeDescription.setStylePrimaryName("workflow-parameters-description");
|
typeDescription.setStylePrimaryName("workflow-parameters-description");
|
||||||
vField.add(comboBox, new VerticalLayoutData(1,-1,new Margins(0)));
|
vField.add(comboBox, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||||
vField.add(typeDescription, new VerticalLayoutData(-1,-1,new Margins(0)));
|
vField.add(typeDescription, new VerticalLayoutData(-1, -1, new Margins(
|
||||||
|
0)));
|
||||||
vContainer.add(vField);
|
vContainer.add(vField);
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showFieldWithSelection(TableItemSimple tableItem) {
|
private void showFieldWithSelection(TableItemSimple tableItem) {
|
||||||
vContainer.clear();
|
vContainer.clear();
|
||||||
VerticalLayoutContainer vField = new VerticalLayoutContainer();
|
VerticalLayoutContainer vField = new VerticalLayoutContainer();
|
||||||
HtmlLayoutContainer typeDescription= new HtmlLayoutContainer(
|
HtmlLayoutContainer typeDescription = new HtmlLayoutContainer(
|
||||||
"<div class='workflow-parameters-description'><p>Columns of Table "
|
"<div class='workflow-parameters-description'><p>Columns of Table "
|
||||||
+ Format.ellipse(tableItem.getName(),30) + "</p></div>");
|
+ Format.ellipse(tableItem.getName(), 30)
|
||||||
|
+ "</p></div>");
|
||||||
typeDescription.setStylePrimaryName("workflow-parameters-description");
|
typeDescription.setStylePrimaryName("workflow-parameters-description");
|
||||||
vField.add(comboBox, new VerticalLayoutData(1,-1,new Margins(0)));
|
vField.add(comboBox, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||||
vField.add(typeDescription, new VerticalLayoutData(-1,-1,new Margins(0)));
|
vField.add(typeDescription, new VerticalLayoutData(-1, -1, new Margins(
|
||||||
|
0)));
|
||||||
vContainer.add(vField);
|
vContainer.add(vField);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
|
|
||||||
private void showNoSelectionField() {
|
|
||||||
vp.clear();
|
|
||||||
vp.add(comboBox);
|
|
||||||
vp.add(new HTML(
|
|
||||||
"<div class='workflow-parameters-description'>Select table from parameter "
|
|
||||||
+ referredTabularParameterName + "</div>"));
|
|
||||||
vp.forceLayout();
|
|
||||||
}
|
|
||||||
|
|
||||||
private void showFieldWithSelection(TableItemSimple tableItem) {
|
|
||||||
vp.clear();
|
|
||||||
vp.add(comboBox);
|
|
||||||
vp.add(new HTML(
|
|
||||||
"<div class='workflow-parameters-description'>Columns of Table "
|
|
||||||
+ tableItem.getName() + "</div>"));
|
|
||||||
vp.forceLayout();
|
|
||||||
} */
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -166,6 +142,11 @@ public class ColumnFld extends AbstractFld implements
|
||||||
return fieldContainer;
|
return fieldContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValid() {
|
||||||
|
return comboBox.isValid();
|
||||||
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onChange(TabularFldChangeEvent event) {
|
public void onChange(TabularFldChangeEvent event) {
|
||||||
TableItemSimple tableItemSimple = event.getTableItemSimple();
|
TableItemSimple tableItemSimple = event.getTableItemSimple();
|
||||||
|
|
|
@ -15,12 +15,19 @@ import org.gcube.portlets.user.dataminermanager.shared.data.ColumnItem;
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.data.TableItemSimple;
|
import org.gcube.portlets.user.dataminermanager.shared.data.TableItemSimple;
|
||||||
|
|
||||||
import com.google.gwt.core.client.GWT;
|
import com.google.gwt.core.client.GWT;
|
||||||
import com.google.gwt.user.client.ui.HTML;
|
|
||||||
import com.google.gwt.user.client.ui.Widget;
|
import com.google.gwt.user.client.ui.Widget;
|
||||||
import com.sencha.gxt.core.client.IdentityValueProvider;
|
import com.sencha.gxt.core.client.IdentityValueProvider;
|
||||||
import com.sencha.gxt.core.client.Style.SelectionMode;
|
import com.sencha.gxt.core.client.Style.SelectionMode;
|
||||||
|
import com.sencha.gxt.core.client.util.Format;
|
||||||
|
import com.sencha.gxt.core.client.util.Margins;
|
||||||
import com.sencha.gxt.data.shared.ListStore;
|
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.BoxLayoutContainer.BoxLayoutPack;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.HBoxLayoutContainer;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.HtmlLayoutContainer;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
||||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
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.grid.CheckBoxSelectionModel;
|
import com.sencha.gxt.widget.core.client.grid.CheckBoxSelectionModel;
|
||||||
import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
|
import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
|
||||||
import com.sencha.gxt.widget.core.client.grid.ColumnModel;
|
import com.sencha.gxt.widget.core.client.grid.ColumnModel;
|
||||||
|
@ -35,11 +42,13 @@ import com.sencha.gxt.widget.core.client.grid.Grid;
|
||||||
public class ColumnListFld extends AbstractFld implements
|
public class ColumnListFld extends AbstractFld implements
|
||||||
TabularFldChangeEventHandler {
|
TabularFldChangeEventHandler {
|
||||||
|
|
||||||
private VerticalLayoutContainer vp;
|
// private VerticalLayoutContainer vp;
|
||||||
private ColumnListParameter columnListParameter;
|
private ColumnListParameter columnListParameter;
|
||||||
private ListStore<ColumnItem> store;
|
private ListStore<ColumnItem> store;
|
||||||
private Grid<ColumnItem> grid;
|
private Grid<ColumnItem> grid;
|
||||||
private CheckBoxSelectionModel<ColumnItem> sm;
|
private CheckBoxSelectionModel<ColumnItem> sm;
|
||||||
|
private SimpleContainer fieldContainer;
|
||||||
|
private SimpleContainer vContainer;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -48,13 +57,40 @@ public class ColumnListFld extends AbstractFld implements
|
||||||
public ColumnListFld(Parameter parameter) {
|
public ColumnListFld(Parameter parameter) {
|
||||||
super(parameter);
|
super(parameter);
|
||||||
|
|
||||||
this.columnListParameter = (ColumnListParameter) parameter;
|
columnListParameter = (ColumnListParameter) parameter;
|
||||||
vp = new VerticalLayoutContainer();
|
// vp = new VerticalLayoutContainer();
|
||||||
init();
|
|
||||||
|
fieldContainer = new SimpleContainer();
|
||||||
|
HBoxLayoutContainer horiz = new HBoxLayoutContainer();
|
||||||
|
horiz.setPack(BoxLayoutPack.START);
|
||||||
|
horiz.setEnableOverflow(false);
|
||||||
|
|
||||||
|
createGrid();
|
||||||
|
|
||||||
|
HtmlLayoutContainer descr;
|
||||||
|
|
||||||
|
if (columnListParameter.getDescription() == null) {
|
||||||
|
descr = new HtmlLayoutContainer("<p style='margin-left:5px;'></p>");
|
||||||
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
grid.setToolTip(columnListParameter.getDescription());
|
||||||
|
descr = new HtmlLayoutContainer("<p style='margin-left:5px;'>"
|
||||||
|
+ columnListParameter.getDescription() + "</p>");
|
||||||
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
|
}
|
||||||
|
|
||||||
|
vContainer = new SimpleContainer();
|
||||||
showNoSelectionField();
|
showNoSelectionField();
|
||||||
|
horiz.add(vContainer, new BoxLayoutData(new Margins()));
|
||||||
|
horiz.add(descr, new BoxLayoutData(new Margins()));
|
||||||
|
|
||||||
|
fieldContainer.add(horiz);
|
||||||
|
fieldContainer.forceLayout();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void init() {
|
private void createGrid() {
|
||||||
ColumnItemProperties props = GWT.create(ColumnItemProperties.class);
|
ColumnItemProperties props = GWT.create(ColumnItemProperties.class);
|
||||||
|
|
||||||
ColumnConfig<ColumnItem, String> labelCol = new ColumnConfig<ColumnItem, String>(
|
ColumnConfig<ColumnItem, String> labelCol = new ColumnConfig<ColumnItem, String>(
|
||||||
|
@ -87,29 +123,33 @@ public class ColumnListFld extends AbstractFld implements
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private void showNoSelectionField() {
|
private void showNoSelectionField() {
|
||||||
vp.clear();
|
vContainer.clear();
|
||||||
vp.add(grid);
|
VerticalLayoutContainer vField = new VerticalLayoutContainer();
|
||||||
vp.add(new HTML(
|
HtmlLayoutContainer typeDescription = new HtmlLayoutContainer(
|
||||||
"<div class='workflow-parameters-description'>Select table from parameter "
|
"<div class='workflow-parameters-description'><p>Select table from parameter "
|
||||||
+ this.columnListParameter
|
+ Format.ellipse(columnListParameter
|
||||||
.getReferredTabularParameterName() + "</div>"));
|
.getReferredTabularParameterName(), 30)
|
||||||
vp.forceLayout();
|
+ "</p></div>");
|
||||||
|
typeDescription.setStylePrimaryName("workflow-parameters-description");
|
||||||
|
vField.add(grid, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||||
|
vField.add(typeDescription, new VerticalLayoutData(-1, -1, new Margins(
|
||||||
|
0)));
|
||||||
|
vContainer.add(vField);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
private void showFieldWithSelection(TableItemSimple tableItem) {
|
private void showFieldWithSelection(TableItemSimple tableItem) {
|
||||||
vp.clear();
|
vContainer.clear();
|
||||||
vp.add(grid);
|
VerticalLayoutContainer vField = new VerticalLayoutContainer();
|
||||||
vp.add(new HTML(
|
HtmlLayoutContainer typeDescription = new HtmlLayoutContainer(
|
||||||
"<div class='workflow-parameters-description'>Columns of Data Set "
|
"<div class='workflow-parameters-description'><p>Columns of Table "
|
||||||
+ tableItem.getName() + "</div>"));
|
+ Format.ellipse(tableItem.getName(), 30)
|
||||||
vp.forceLayout();
|
+ "</p></div>");
|
||||||
|
typeDescription.setStylePrimaryName("workflow-parameters-description");
|
||||||
|
vField.add(grid, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||||
|
vField.add(typeDescription, new VerticalLayoutData(-1, -1, new Margins(
|
||||||
|
0)));
|
||||||
|
vContainer.add(vField);
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -134,17 +174,15 @@ public class ColumnListFld extends AbstractFld implements
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Widget getWidget() {
|
public Widget getWidget() {
|
||||||
return vp;
|
return fieldContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isValid() {
|
public boolean isValid() {
|
||||||
return store.size() > 0;
|
return (sm.getSelection() != null && sm.getSelection().size() > 0);
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@ -163,7 +201,7 @@ public class ColumnListFld extends AbstractFld implements
|
||||||
grid.enable();
|
grid.enable();
|
||||||
showFieldWithSelection(tableItemSimple);
|
showFieldWithSelection(tableItemSimple);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,8 +41,7 @@ public class DoubleFld extends AbstractFld {
|
||||||
|
|
||||||
if (p.getDefaultValue() != null)
|
if (p.getDefaultValue() != null)
|
||||||
numberField.setValue(Double.parseDouble(p.getDefaultValue()));
|
numberField.setValue(Double.parseDouble(p.getDefaultValue()));
|
||||||
else
|
numberField.setAllowBlank(false);
|
||||||
numberField.setAllowBlank(false);
|
|
||||||
|
|
||||||
HtmlLayoutContainer descr;
|
HtmlLayoutContainer descr;
|
||||||
|
|
||||||
|
@ -89,5 +88,14 @@ public class DoubleFld extends AbstractFld {
|
||||||
public Widget getWidget() {
|
public Widget getWidget() {
|
||||||
return fieldContainer;
|
return fieldContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public boolean isValid() {
|
||||||
|
return numberField.isValid();
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -82,7 +82,12 @@ public class EnumFld extends AbstractFld {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Widget getWidget() {
|
public Widget getWidget() {
|
||||||
return listBox;
|
return fieldContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValid() {
|
||||||
|
return listBox.isValid();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -8,6 +8,7 @@ import java.util.Arrays;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
||||||
|
import org.gcube.portlets.user.dataminermanager.client.bean.parameters.FileParameter;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.parameters.Parameter;
|
import org.gcube.portlets.user.dataminermanager.client.bean.parameters.Parameter;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.rpc.DataMinerPortletServiceAsync;
|
import org.gcube.portlets.user.dataminermanager.client.rpc.DataMinerPortletServiceAsync;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
import org.gcube.portlets.user.dataminermanager.client.util.UtilsGXT3;
|
||||||
|
@ -20,14 +21,19 @@ import org.gcube.portlets.widgets.wsexplorer.shared.ItemType;
|
||||||
|
|
||||||
import com.allen_sauer.gwt.log.client.Log;
|
import com.allen_sauer.gwt.log.client.Log;
|
||||||
import com.google.gwt.user.client.rpc.AsyncCallback;
|
import com.google.gwt.user.client.rpc.AsyncCallback;
|
||||||
import com.google.gwt.user.client.ui.HTML;
|
|
||||||
import com.google.gwt.user.client.ui.Widget;
|
import com.google.gwt.user.client.ui.Widget;
|
||||||
import com.sencha.gxt.core.client.dom.XDOM;
|
import com.sencha.gxt.core.client.dom.XDOM;
|
||||||
import com.sencha.gxt.core.client.util.Format;
|
import com.sencha.gxt.core.client.util.Margins;
|
||||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||||
import com.sencha.gxt.widget.core.client.container.HorizontalLayoutContainer;
|
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.HtmlLayoutContainer;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.MarginData;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
||||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
||||||
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||||
|
import com.sencha.gxt.widget.core.client.form.TextField;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
|
@ -44,26 +50,58 @@ public class FileFld extends AbstractFld {
|
||||||
private TextButton selectButton, selectButton2, cancelButton;
|
private TextButton selectButton, selectButton2, cancelButton;
|
||||||
private ItemDescription selectedFileItem = null;
|
private ItemDescription selectedFileItem = null;
|
||||||
|
|
||||||
|
private FileParameter fileParameter;
|
||||||
|
|
||||||
|
private SimpleContainer fieldContainer;
|
||||||
|
|
||||||
|
private HBoxLayoutContainer horiz;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param parameter
|
* @param parameter
|
||||||
*/
|
*/
|
||||||
public FileFld(Parameter parameter) {
|
public FileFld(Parameter parameter) {
|
||||||
super(parameter);
|
super(parameter);
|
||||||
|
fileParameter = (FileParameter) parameter;
|
||||||
|
|
||||||
|
SimpleContainer tabContainer=new SimpleContainer();
|
||||||
vp=new VerticalLayoutContainer();
|
vp=new VerticalLayoutContainer();
|
||||||
/*
|
init();
|
||||||
* fileSelector = new FileSelector() {
|
tabContainer.add(vp, new MarginData(new Margins(0)));
|
||||||
*
|
|
||||||
* @Override public void fireSelection(TableItemSimple fileItem) {
|
fieldContainer = new SimpleContainer();
|
||||||
* super.fireSelection(fileItem); selectedFileItem = fileItem;
|
horiz = new HBoxLayoutContainer();
|
||||||
* showFieldWithSelection(); } };
|
horiz.setPack(BoxLayoutPack.START);
|
||||||
*/
|
horiz.setEnableOverflow(false);
|
||||||
|
|
||||||
|
HtmlLayoutContainer descr;
|
||||||
|
|
||||||
|
if (fileParameter.getDescription() == null) {
|
||||||
|
descr = new HtmlLayoutContainer("<p style='margin-left:5px;'></p>");
|
||||||
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
descr = new HtmlLayoutContainer("<p style='margin-left:5px;'>"
|
||||||
|
+ fileParameter.getDescription() + "</p>");
|
||||||
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
|
}
|
||||||
|
|
||||||
|
horiz.add(tabContainer, new BoxLayoutData(new Margins()));
|
||||||
|
horiz.add(descr, new BoxLayoutData(new Margins()));
|
||||||
|
|
||||||
|
fieldContainer.add(horiz);
|
||||||
|
showNoSelectionField();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
private void init(){
|
||||||
|
|
||||||
List<ItemType> selectableTypes = new ArrayList<ItemType>();
|
List<ItemType> selectableTypes = new ArrayList<ItemType>();
|
||||||
selectableTypes.add(ItemType.EXTERNAL_FILE);
|
selectableTypes.add(ItemType.EXTERNAL_FILE);
|
||||||
List<ItemType> showableTypes = new ArrayList<ItemType>();
|
List<ItemType> showableTypes = new ArrayList<ItemType>();
|
||||||
showableTypes.addAll(Arrays.asList(ItemType.values()));
|
showableTypes.addAll(Arrays.asList(ItemType.values()));
|
||||||
|
|
||||||
wselectDialog = new WorkspaceExplorerSelectDialog("Select CSV", false);
|
wselectDialog = new WorkspaceExplorerSelectDialog("Select File", false);
|
||||||
// filterCriteria, selectableTypes);
|
// filterCriteria, selectableTypes);
|
||||||
|
|
||||||
WorskpaceExplorerSelectNotificationListener handler = new WorskpaceExplorerSelectNotificationListener() {
|
WorskpaceExplorerSelectNotificationListener handler = new WorskpaceExplorerSelectNotificationListener() {
|
||||||
|
@ -72,7 +110,7 @@ public class FileFld extends AbstractFld {
|
||||||
public void onSelectedItem(Item item) {
|
public void onSelectedItem(Item item) {
|
||||||
|
|
||||||
if (item.isFolder() || item.isRoot()) {
|
if (item.isFolder() || item.isRoot()) {
|
||||||
UtilsGXT3.info("Attention", "Select a valid csv!");
|
UtilsGXT3.info("Attention", "Select a valid file!");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
retrieveFileInformation(item);
|
retrieveFileInformation(item);
|
||||||
|
@ -96,7 +134,7 @@ public class FileFld extends AbstractFld {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onNotValidSelection() {
|
public void onNotValidSelection() {
|
||||||
UtilsGXT3.info("Attention", "Select a valid csv!");
|
UtilsGXT3.info("Attention", "Select a valid file!");
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
@ -138,8 +176,7 @@ public class FileFld extends AbstractFld {
|
||||||
showNoSelectionField();
|
showNoSelectionField();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
showNoSelectionField();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void retrieveFileInformation(final Item item) {
|
private void retrieveFileInformation(final Item item) {
|
||||||
|
@ -157,7 +194,6 @@ public class FileFld extends AbstractFld {
|
||||||
+ caught.getMessage());
|
+ caught.getMessage());
|
||||||
if (caught instanceof ExpiredSessionServiceException) {
|
if (caught instanceof ExpiredSessionServiceException) {
|
||||||
UtilsGXT3.alert("Error", "Expired Session");
|
UtilsGXT3.alert("Error", "Expired Session");
|
||||||
// sessionExpiredShowDelayed();
|
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
UtilsGXT3.alert(
|
UtilsGXT3.alert(
|
||||||
|
@ -182,24 +218,34 @@ public class FileFld extends AbstractFld {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
private void showNoSelectionField() {
|
private void showNoSelectionField() {
|
||||||
vp.clear();
|
vp.clear();
|
||||||
vp.add(selectButton);
|
vp.add(selectButton);
|
||||||
vp.forceLayout();
|
vp.forceLayout();
|
||||||
|
fieldContainer.forceLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
private void showFieldWithSelection() {
|
private void showFieldWithSelection() {
|
||||||
// final String fileId = selectedFileItem.getId();
|
String fileName = selectedFileItem.getName();
|
||||||
final String fileName = selectedFileItem.getName();
|
|
||||||
|
if(fileName==null|| fileName.isEmpty()){
|
||||||
|
fileName="NoName";
|
||||||
|
}
|
||||||
|
|
||||||
|
TextField tableDescription=new TextField();
|
||||||
|
tableDescription.setValue(fileName);
|
||||||
|
tableDescription.setReadOnly(true);
|
||||||
|
|
||||||
|
HBoxLayoutContainer h=new HBoxLayoutContainer();
|
||||||
|
h.add(tableDescription,new BoxLayoutData(new Margins()));
|
||||||
|
h.add(selectButton2,new BoxLayoutData(new Margins()));
|
||||||
|
h.add(cancelButton,new BoxLayoutData(new Margins()));
|
||||||
vp.clear();
|
vp.clear();
|
||||||
HorizontalLayoutContainer hp = new HorizontalLayoutContainer();
|
vp.add(h);
|
||||||
hp.add(new HTML("<div class='workflow-parameters-tableDescription'>"
|
|
||||||
+ Format.ellipse(fileName, 30) + "</div>"));
|
|
||||||
hp.add(selectButton2);
|
|
||||||
hp.add(cancelButton);
|
|
||||||
vp.add(hp);
|
|
||||||
vp.forceLayout();
|
vp.forceLayout();
|
||||||
|
fieldContainer.forceLayout();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -212,7 +258,7 @@ public class FileFld extends AbstractFld {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public Widget getWidget() {
|
public Widget getWidget() {
|
||||||
return vp;
|
return fieldContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
|
|
@ -16,12 +16,12 @@ import com.sencha.gxt.widget.core.client.form.FloatField;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Giancarlo Panichi
|
* @author Giancarlo Panichi email: <a
|
||||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class FloatFld extends AbstractFld {
|
public class FloatFld extends AbstractFld {
|
||||||
|
|
||||||
private SimpleContainer fieldContainer;
|
private SimpleContainer fieldContainer;
|
||||||
private FloatField numberField;
|
private FloatField numberField;
|
||||||
|
|
||||||
|
@ -30,21 +30,18 @@ public class FloatFld extends AbstractFld {
|
||||||
*/
|
*/
|
||||||
public FloatFld(Parameter parameter) {
|
public FloatFld(Parameter parameter) {
|
||||||
super(parameter);
|
super(parameter);
|
||||||
fieldContainer=new SimpleContainer();
|
fieldContainer = new SimpleContainer();
|
||||||
HBoxLayoutContainer horiz = new HBoxLayoutContainer();
|
HBoxLayoutContainer horiz = new HBoxLayoutContainer();
|
||||||
horiz.setPack(BoxLayoutPack.START);
|
horiz.setPack(BoxLayoutPack.START);
|
||||||
horiz.setEnableOverflow(false);
|
horiz.setEnableOverflow(false);
|
||||||
|
|
||||||
ObjectParameter p = (ObjectParameter) parameter;
|
ObjectParameter p = (ObjectParameter) parameter;
|
||||||
|
|
||||||
|
|
||||||
numberField = new FloatField();
|
numberField = new FloatField();
|
||||||
|
|
||||||
if (p.getDefaultValue() != null)
|
if (p.getDefaultValue() != null)
|
||||||
numberField.setValue(Float.parseFloat(p.getDefaultValue()));
|
numberField.setValue(Float.parseFloat(p.getDefaultValue()));
|
||||||
else
|
numberField.setAllowBlank(false);
|
||||||
numberField.setAllowBlank(false);
|
|
||||||
|
|
||||||
|
|
||||||
HtmlLayoutContainer descr;
|
HtmlLayoutContainer descr;
|
||||||
|
|
||||||
|
@ -59,21 +56,22 @@ public class FloatFld extends AbstractFld {
|
||||||
descr.addStyleName("workflow-fieldDescription");
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
}
|
}
|
||||||
|
|
||||||
SimpleContainer vContainer=new SimpleContainer();
|
SimpleContainer vContainer = new SimpleContainer();
|
||||||
VerticalLayoutContainer vField = new VerticalLayoutContainer();
|
VerticalLayoutContainer vField = new VerticalLayoutContainer();
|
||||||
HtmlLayoutContainer typeDescription = new HtmlLayoutContainer(
|
HtmlLayoutContainer typeDescription = new HtmlLayoutContainer(
|
||||||
"Float Value");
|
"Float Value");
|
||||||
typeDescription.setStylePrimaryName("workflow-parameters-description");
|
typeDescription.setStylePrimaryName("workflow-parameters-description");
|
||||||
vField.add(numberField, new VerticalLayoutData(1,-1,new Margins(0)));
|
vField.add(numberField, new VerticalLayoutData(1, -1, new Margins(0)));
|
||||||
vField.add(typeDescription, new VerticalLayoutData(-1,-1,new Margins(0)));
|
vField.add(typeDescription, new VerticalLayoutData(-1, -1, new Margins(
|
||||||
|
0)));
|
||||||
vContainer.add(vField);
|
vContainer.add(vField);
|
||||||
|
|
||||||
horiz.add(vContainer, new BoxLayoutData(new Margins()));
|
horiz.add(vContainer, new BoxLayoutData(new Margins()));
|
||||||
horiz.add(descr, new BoxLayoutData(new Margins()));
|
horiz.add(descr, new BoxLayoutData(new Margins()));
|
||||||
|
|
||||||
fieldContainer.add(horiz);
|
fieldContainer.add(horiz);
|
||||||
fieldContainer.forceLayout();
|
fieldContainer.forceLayout();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -92,4 +90,9 @@ public class FloatFld extends AbstractFld {
|
||||||
public Widget getWidget() {
|
public Widget getWidget() {
|
||||||
return fieldContainer;
|
return fieldContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValid() {
|
||||||
|
return numberField.isValid();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -41,8 +41,7 @@ public class IntFld extends AbstractFld {
|
||||||
|
|
||||||
if (p.getDefaultValue() != null)
|
if (p.getDefaultValue() != null)
|
||||||
numberField.setValue(Integer.parseInt(p.getDefaultValue()));
|
numberField.setValue(Integer.parseInt(p.getDefaultValue()));
|
||||||
else
|
numberField.setAllowBlank(false);
|
||||||
numberField.setAllowBlank(false);
|
|
||||||
|
|
||||||
HtmlLayoutContainer descr;
|
HtmlLayoutContainer descr;
|
||||||
|
|
||||||
|
@ -90,5 +89,11 @@ public class IntFld extends AbstractFld {
|
||||||
public Widget getWidget() {
|
public Widget getWidget() {
|
||||||
return fieldContainer;
|
return fieldContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValid() {
|
||||||
|
return numberField.isValid();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -12,14 +12,23 @@ import org.gcube.portlets.user.dataminermanager.client.bean.parameters.ObjectPar
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.parameters.Parameter;
|
import org.gcube.portlets.user.dataminermanager.client.bean.parameters.Parameter;
|
||||||
|
|
||||||
import com.google.gwt.user.client.ui.Widget;
|
import com.google.gwt.user.client.ui.Widget;
|
||||||
|
import com.sencha.gxt.core.client.util.Margins;
|
||||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
import com.sencha.gxt.widget.core.client.button.TextButton;
|
||||||
import com.sencha.gxt.widget.core.client.container.HorizontalLayoutContainer;
|
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.HtmlLayoutContainer;
|
||||||
|
import com.sencha.gxt.widget.core.client.container.MarginData;
|
||||||
import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
import com.sencha.gxt.widget.core.client.container.SimpleContainer;
|
||||||
import com.sencha.gxt.widget.core.client.container.VerticalLayoutContainer;
|
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;
|
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||||
|
import com.sencha.gxt.widget.core.client.form.IntegerField;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @author ceras
|
*
|
||||||
|
* @author Giancarlo Panichi
|
||||||
|
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ListIntFld extends AbstractFld {
|
public class ListIntFld extends AbstractFld {
|
||||||
|
@ -28,6 +37,9 @@ public class ListIntFld extends AbstractFld {
|
||||||
private SimpleContainer simpleContainer;
|
private SimpleContainer simpleContainer;
|
||||||
private VerticalLayoutContainer vp;
|
private VerticalLayoutContainer vp;
|
||||||
private ListParameter listParameter;
|
private ListParameter listParameter;
|
||||||
|
private SimpleContainer listContainer;
|
||||||
|
private SimpleContainer fieldContainer;
|
||||||
|
private HBoxLayoutContainer horiz;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param parameter
|
* @param parameter
|
||||||
|
@ -35,11 +47,38 @@ public class ListIntFld extends AbstractFld {
|
||||||
public ListIntFld(Parameter parameter) {
|
public ListIntFld(Parameter parameter) {
|
||||||
super(parameter);
|
super(parameter);
|
||||||
this.listParameter = (ListParameter) parameter;
|
this.listParameter = (ListParameter) parameter;
|
||||||
simpleContainer=new SimpleContainer();
|
|
||||||
|
listContainer = new SimpleContainer();
|
||||||
vp = new VerticalLayoutContainer();
|
vp = new VerticalLayoutContainer();
|
||||||
simpleContainer.add(vp);
|
|
||||||
items = new ArrayList<Item>();
|
items = new ArrayList<Item>();
|
||||||
addField(null);
|
addField(null);
|
||||||
|
listContainer.add(vp, new MarginData(new Margins()));
|
||||||
|
|
||||||
|
fieldContainer = new SimpleContainer();
|
||||||
|
horiz = new HBoxLayoutContainer();
|
||||||
|
horiz.setPack(BoxLayoutPack.START);
|
||||||
|
horiz.setEnableOverflow(false);
|
||||||
|
|
||||||
|
HtmlLayoutContainer descr;
|
||||||
|
|
||||||
|
if (listParameter.getDescription() == null) {
|
||||||
|
descr = new HtmlLayoutContainer("<p style='margin-left:5px;'></p>");
|
||||||
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
|
|
||||||
|
} else {
|
||||||
|
listContainer.setToolTip(listParameter.getDescription());
|
||||||
|
descr = new HtmlLayoutContainer("<p style='margin-left:5px;'>"
|
||||||
|
+ listParameter.getDescription() + "</p>");
|
||||||
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
|
}
|
||||||
|
|
||||||
|
horiz.add(listContainer, new BoxLayoutData(new Margins(0)));
|
||||||
|
horiz.add(descr, new BoxLayoutData(new Margins(0)));
|
||||||
|
|
||||||
|
fieldContainer.add(horiz);
|
||||||
|
fieldContainer.forceLayout();
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
private void addField(Item upperItem) {
|
private void addField(Item upperItem) {
|
||||||
|
@ -50,7 +89,7 @@ public class ListIntFld extends AbstractFld {
|
||||||
if (upperItem == null) {
|
if (upperItem == null) {
|
||||||
Item item = new Item(objPar, true);
|
Item item = new Item(objPar, true);
|
||||||
items.add(item);
|
items.add(item);
|
||||||
vp.add(item);
|
vp.add(item, new VerticalLayoutData(1, -1, new Margins()));
|
||||||
} else {
|
} else {
|
||||||
// search the position of the upper item
|
// search the position of the upper item
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
|
@ -66,7 +105,6 @@ public class ListIntFld extends AbstractFld {
|
||||||
vp.insert(item, pos + 1);
|
vp.insert(item, pos + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
simpleContainer.forceLayout();
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -94,8 +132,8 @@ public class ListIntFld extends AbstractFld {
|
||||||
String value = "";
|
String value = "";
|
||||||
boolean first = true;
|
boolean first = true;
|
||||||
for (Item item : items) {
|
for (Item item : items) {
|
||||||
String itemValue = item.getValue();
|
Integer itemValue = item.getValue();
|
||||||
if (itemValue != null && !itemValue.contentEquals("")) {
|
if (itemValue != null) {
|
||||||
value += (first ? "" : separator) + itemValue;
|
value += (first ? "" : separator) + itemValue;
|
||||||
first = false;
|
first = false;
|
||||||
}
|
}
|
||||||
|
@ -108,7 +146,7 @@ public class ListIntFld extends AbstractFld {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public Widget getWidget() {
|
public Widget getWidget() {
|
||||||
return simpleContainer;
|
return fieldContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -116,75 +154,84 @@ public class ListIntFld extends AbstractFld {
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public boolean isValid() {
|
public boolean isValid() {
|
||||||
boolean valid = false;
|
|
||||||
for (Item item : items)
|
for (Item item : items)
|
||||||
if (item.getField().getValue() != null) {
|
if (!item.isValid()) {
|
||||||
valid = true;
|
return false;
|
||||||
break;
|
|
||||||
}
|
}
|
||||||
return valid;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private class Item extends HorizontalLayoutContainer {
|
private class Item extends HBoxLayoutContainer {
|
||||||
|
|
||||||
private IntFld field;
|
private IntegerField field;
|
||||||
private TextButton addButton;
|
private TextButton addBtn;
|
||||||
private TextButton removeButton;
|
private TextButton removeBtn;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param objPar
|
* @param objPar
|
||||||
*/
|
*/
|
||||||
public Item(ObjectParameter objectParameter, boolean first) {
|
public Item(ObjectParameter objectParameter, boolean first) {
|
||||||
super();
|
super();
|
||||||
this.field = new IntFld(objectParameter);
|
|
||||||
this.add(field.getWidget());
|
field = new IntegerField();
|
||||||
|
field.setAllowBlank(false);
|
||||||
|
|
||||||
|
addBtn = new TextButton("");
|
||||||
|
|
||||||
addButton = new TextButton("");
|
addBtn.setIcon(DataMinerManager.resources.add());
|
||||||
|
|
||||||
addButton.setIcon(DataMinerManager.resources.add());
|
addBtn.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||||
|
|
||||||
addButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
addField(Item.this);
|
addField(Item.this);
|
||||||
|
forceLayout();
|
||||||
|
vp.forceLayout();
|
||||||
|
fieldContainer.forceLayout();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
removeButton = new TextButton("");
|
removeBtn = new TextButton("");
|
||||||
|
|
||||||
removeButton.setIcon(DataMinerManager.resources.cancel());
|
removeBtn.setIcon(DataMinerManager.resources.cancel());
|
||||||
|
|
||||||
removeButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
removeBtn.addSelectHandler(new SelectEvent.SelectHandler() {
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void onSelect(SelectEvent event) {
|
public void onSelect(SelectEvent event) {
|
||||||
removeField(Item.this);
|
removeField(Item.this);
|
||||||
|
forceLayout();
|
||||||
|
vp.forceLayout();
|
||||||
|
fieldContainer.forceLayout();
|
||||||
|
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
|
|
||||||
removeButton.setVisible(!first);
|
removeBtn.setVisible(!first);
|
||||||
|
|
||||||
this.add(addButton);
|
setPack(BoxLayoutPack.START);
|
||||||
this.add(removeButton);
|
setEnableOverflow(false);
|
||||||
|
add(field, new BoxLayoutData(new Margins()));
|
||||||
|
add(addBtn, new BoxLayoutData(new Margins()));
|
||||||
|
add(removeBtn, new BoxLayoutData(new Margins()));
|
||||||
|
|
||||||
|
forceLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
public void showCancelButton() {
|
public void showCancelButton() {
|
||||||
removeButton.setVisible(true);
|
removeBtn.setVisible(true);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void hideCancelButton() {
|
public void hideCancelButton() {
|
||||||
removeButton.setVisible(false);
|
removeBtn.setVisible(false);
|
||||||
}
|
}
|
||||||
|
|
||||||
public String getValue() {
|
public Integer getValue() {
|
||||||
return field.getValue();
|
return field.getCurrentValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public IntFld getField() {
|
public boolean isValid() {
|
||||||
return field;
|
return field.isValid();
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -11,12 +11,8 @@ import org.gcube.portlets.user.dataminermanager.client.bean.parameters.ListParam
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.parameters.ObjectParameter;
|
import org.gcube.portlets.user.dataminermanager.client.bean.parameters.ObjectParameter;
|
||||||
import org.gcube.portlets.user.dataminermanager.client.bean.parameters.Parameter;
|
import org.gcube.portlets.user.dataminermanager.client.bean.parameters.Parameter;
|
||||||
|
|
||||||
import com.google.gwt.editor.client.Editor.Path;
|
|
||||||
import com.google.gwt.user.client.ui.Widget;
|
import com.google.gwt.user.client.ui.Widget;
|
||||||
import com.sencha.gxt.core.client.ValueProvider;
|
|
||||||
import com.sencha.gxt.core.client.util.Margins;
|
import com.sencha.gxt.core.client.util.Margins;
|
||||||
import com.sencha.gxt.data.shared.ModelKeyProvider;
|
|
||||||
import com.sencha.gxt.data.shared.PropertyAccess;
|
|
||||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
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.BoxLayoutData;
|
||||||
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutPack;
|
import com.sencha.gxt.widget.core.client.container.BoxLayoutContainer.BoxLayoutPack;
|
||||||
|
@ -31,38 +27,39 @@ import com.sencha.gxt.widget.core.client.form.TextField;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @author Giancarlo Panichi
|
* @author Giancarlo Panichi email: <a
|
||||||
* email: <a href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
* href="mailto:g.panichi@isti.cnr.it">g.panichi@isti.cnr.it</a>
|
||||||
*
|
*
|
||||||
*/
|
*/
|
||||||
public class ListStringFld extends AbstractFld {
|
public class ListStringFld extends AbstractFld {
|
||||||
|
|
||||||
private SimpleContainer fieldContainer;
|
private SimpleContainer fieldContainer;
|
||||||
private HBoxLayoutContainer horiz;
|
private HBoxLayoutContainer horiz;
|
||||||
private SimpleContainer listContainer;
|
private SimpleContainer listContainer;
|
||||||
private VerticalLayoutContainer vp;
|
private VerticalLayoutContainer vp;
|
||||||
private List<Item> items;
|
private List<Item> items;
|
||||||
private ListParameter listParameter;
|
private ListParameter listParameter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param parameter
|
* @param parameter
|
||||||
*/
|
*/
|
||||||
public ListStringFld(Parameter parameter) {
|
public ListStringFld(Parameter parameter) {
|
||||||
super(parameter);
|
super(parameter);
|
||||||
|
|
||||||
listParameter = (ListParameter) parameter;
|
listParameter = (ListParameter) parameter;
|
||||||
|
|
||||||
listContainer = new SimpleContainer();
|
listContainer = new SimpleContainer();
|
||||||
vp = new VerticalLayoutContainer();
|
vp = new VerticalLayoutContainer();
|
||||||
items = new ArrayList<Item>();
|
items = new ArrayList<Item>();
|
||||||
addField(null);
|
addField(null);
|
||||||
listContainer.add(vp, new MarginData(new Margins()));
|
listContainer.add(vp, new MarginData(new Margins()));
|
||||||
|
|
||||||
fieldContainer = new SimpleContainer();
|
fieldContainer = new SimpleContainer();
|
||||||
horiz = new HBoxLayoutContainer();
|
horiz = new HBoxLayoutContainer();
|
||||||
horiz.setPack(BoxLayoutPack.START);
|
horiz.setPack(BoxLayoutPack.START);
|
||||||
horiz.setEnableOverflow(false);
|
horiz.setEnableOverflow(false);
|
||||||
|
|
||||||
HtmlLayoutContainer descr;
|
HtmlLayoutContainer descr;
|
||||||
|
|
||||||
if (listParameter.getDescription() == null) {
|
if (listParameter.getDescription() == null) {
|
||||||
|
@ -70,7 +67,7 @@ public class ListStringFld extends AbstractFld {
|
||||||
descr.addStyleName("workflow-fieldDescription");
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
listContainer.setToolTip(listParameter.getDescription());
|
/*listContainer.setToolTip(listParameter.getDescription());*/
|
||||||
descr = new HtmlLayoutContainer("<p style='margin-left:5px;'>"
|
descr = new HtmlLayoutContainer("<p style='margin-left:5px;'>"
|
||||||
+ listParameter.getDescription() + "</p>");
|
+ listParameter.getDescription() + "</p>");
|
||||||
descr.addStyleName("workflow-fieldDescription");
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
|
@ -82,63 +79,6 @@ public class ListStringFld extends AbstractFld {
|
||||||
fieldContainer.add(horiz);
|
fieldContainer.add(horiz);
|
||||||
fieldContainer.forceLayout();
|
fieldContainer.forceLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
public interface ItemStringProperties extends PropertyAccess<ItemString> {
|
|
||||||
|
|
||||||
@Path("id")
|
|
||||||
ModelKeyProvider<ItemString> id();
|
|
||||||
ValueProvider<ItemString, String> label();
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public class ItemString{
|
|
||||||
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
/*
|
|
||||||
private void gridDef(){
|
|
||||||
ColumnConfig<Stock, String> nameCol = new ColumnConfig<Stock, String>(props.name(), 50, "Company");
|
|
||||||
ColumnConfig<Stock, String> symbolCol = new ColumnConfig<Stock, String>(props.symbol(), 75, "Symbol");
|
|
||||||
ColumnConfig<Stock, Double> lastCol = new ColumnConfig<Stock, Double>(props.last(), 75, "Last");
|
|
||||||
ColumnConfig<Stock, Double> changeCol = new ColumnConfig<Stock, Double>(props.change(), 75, "Change");
|
|
||||||
ColumnConfig<Stock, Date> lastTransCol = new ColumnConfig<Stock, Date>(props.lastTrans(), 100, "Last Updated");
|
|
||||||
|
|
||||||
final NumberFormat number = NumberFormat.getFormat("0.00");
|
|
||||||
changeCol.setCell(new AbstractCell<Double>() {
|
|
||||||
@Override
|
|
||||||
public void render(Context context, Double value, SafeHtmlBuilder sb) {
|
|
||||||
String style = "style='color: " + (value < 0 ? "red" : "green") + "'";
|
|
||||||
String v = number.format(value);
|
|
||||||
sb.appendHtmlConstant("<span " + style + ">" + v + "</span>");
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
lastTransCol.setCell(new DateCell(DateTimeFormat.getFormat("MM/dd/yyyy")));
|
|
||||||
|
|
||||||
List<ColumnConfig<Stock, ?>> columns = new ArrayList<ColumnConfig<Stock, ?>>();
|
|
||||||
columns.add(nameCol);
|
|
||||||
columns.add(symbolCol);
|
|
||||||
columns.add(lastCol);
|
|
||||||
columns.add(changeCol);
|
|
||||||
columns.add(lastTransCol);
|
|
||||||
|
|
||||||
ColumnModel<Stock> cm = new ColumnModel<Stock>(columns);
|
|
||||||
|
|
||||||
ListStore<Stock> store = new ListStore<Stock>(props.key());
|
|
||||||
store.addAll(TestData.getStocks());
|
|
||||||
|
|
||||||
final Grid<Stock> grid = new Grid<Stock>(store, cm);
|
|
||||||
grid.setAllowTextSelection(true);
|
|
||||||
grid.getView().setAutoExpandColumn(nameCol);
|
|
||||||
grid.getView().setStripeRows(true);
|
|
||||||
grid.getView().setColumnLines(true);
|
|
||||||
grid.setBorders(false);
|
|
||||||
grid.setColumnReordering(true);
|
|
||||||
|
|
||||||
}
|
|
||||||
*/
|
|
||||||
|
|
||||||
private void addField(Item upperItem) {
|
private void addField(Item upperItem) {
|
||||||
|
|
||||||
|
@ -148,7 +88,7 @@ public class ListStringFld extends AbstractFld {
|
||||||
if (upperItem == null) {
|
if (upperItem == null) {
|
||||||
Item item = new Item(objPar, true);
|
Item item = new Item(objPar, true);
|
||||||
items.add(item);
|
items.add(item);
|
||||||
vp.add(item, new VerticalLayoutData(1,-1, new Margins()));
|
vp.add(item, new VerticalLayoutData(1, -1, new Margins()));
|
||||||
} else {
|
} else {
|
||||||
// search the position of the upper item
|
// search the position of the upper item
|
||||||
int pos = 0;
|
int pos = 0;
|
||||||
|
@ -163,7 +103,7 @@ public class ListStringFld extends AbstractFld {
|
||||||
items.add(pos + 1, item);
|
items.add(pos + 1, item);
|
||||||
vp.insert(item, pos + 1);
|
vp.insert(item, pos + 1);
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -177,8 +117,6 @@ public class ListStringFld extends AbstractFld {
|
||||||
if (items.size() == 1) {
|
if (items.size() == 1) {
|
||||||
items.get(0).hideCancelButton();
|
items.get(0).hideCancelButton();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -233,10 +171,10 @@ public class ListStringFld extends AbstractFld {
|
||||||
*/
|
*/
|
||||||
public Item(ObjectParameter objectParameter, boolean first) {
|
public Item(ObjectParameter objectParameter, boolean first) {
|
||||||
super();
|
super();
|
||||||
|
|
||||||
field = new TextField();
|
field = new TextField();
|
||||||
field.setAllowBlank(false);
|
field.setAllowBlank(false);
|
||||||
|
|
||||||
addBtn = new TextButton("");
|
addBtn = new TextButton("");
|
||||||
|
|
||||||
addBtn.setIcon(DataMinerManager.resources.add());
|
addBtn.setIcon(DataMinerManager.resources.add());
|
||||||
|
@ -270,13 +208,13 @@ public class ListStringFld extends AbstractFld {
|
||||||
});
|
});
|
||||||
|
|
||||||
removeBtn.setVisible(!first);
|
removeBtn.setVisible(!first);
|
||||||
|
|
||||||
setPack(BoxLayoutPack.START);
|
setPack(BoxLayoutPack.START);
|
||||||
setEnableOverflow(false);
|
setEnableOverflow(false);
|
||||||
add(field, new BoxLayoutData(new Margins()));
|
add(field, new BoxLayoutData(new Margins()));
|
||||||
add(addBtn,new BoxLayoutData(new Margins()));
|
add(addBtn, new BoxLayoutData(new Margins()));
|
||||||
add(removeBtn,new BoxLayoutData(new Margins()));
|
add(removeBtn, new BoxLayoutData(new Margins()));
|
||||||
|
|
||||||
forceLayout();
|
forceLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -291,12 +229,11 @@ public class ListStringFld extends AbstractFld {
|
||||||
public String getValue() {
|
public String getValue() {
|
||||||
return field.getCurrentValue();
|
return field.getCurrentValue();
|
||||||
}
|
}
|
||||||
|
|
||||||
public boolean isValid(){
|
public boolean isValid() {
|
||||||
return field.isValid();
|
return field.isValid();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,84 +0,0 @@
|
||||||
/**
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
package org.gcube.portlets.user.dataminermanager.client.parametersfield;
|
|
||||||
|
|
||||||
import org.gcube.portlets.user.dataminermanager.client.DataMinerManager;
|
|
||||||
import org.gcube.portlets.user.dataminermanager.shared.data.TableItemSimple;
|
|
||||||
|
|
||||||
import com.sencha.gxt.widget.core.client.Dialog;
|
|
||||||
import com.sencha.gxt.widget.core.client.button.TextButton;
|
|
||||||
import com.sencha.gxt.widget.core.client.event.HideEvent;
|
|
||||||
import com.sencha.gxt.widget.core.client.event.HideEvent.HideHandler;
|
|
||||||
import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @author ceras
|
|
||||||
*
|
|
||||||
*/
|
|
||||||
public abstract class OpenTableButton extends TextButton {
|
|
||||||
|
|
||||||
protected TableItemSimple tableItem=null;
|
|
||||||
protected boolean added = false;
|
|
||||||
|
|
||||||
public abstract void onOpenTable();
|
|
||||||
|
|
||||||
public abstract void onHideTable();
|
|
||||||
|
|
||||||
public OpenTableButton() {
|
|
||||||
super("Open Data Set", DataMinerManager.resources.table());
|
|
||||||
this.addSelectHandler(new SelectEvent.SelectHandler() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
//TabularData tabularData = DataMinerManager.getTabularData();
|
|
||||||
//TabularDataGridPanel gridPanel = tabularData.getGridPanel();
|
|
||||||
|
|
||||||
Dialog dialog = new Dialog();
|
|
||||||
dialog.setMaximizable(true);
|
|
||||||
dialog.setBodyBorder(false);
|
|
||||||
dialog.setExpanded(true);
|
|
||||||
dialog.setHeadingText("Data Set "+tableItem.getName());
|
|
||||||
dialog.setWidth(700);
|
|
||||||
dialog.setHeight(500);
|
|
||||||
dialog.setHideOnButtonClick(true);
|
|
||||||
dialog.setModal(true);
|
|
||||||
//dialog.add(gridPanel);
|
|
||||||
dialog.show();
|
|
||||||
|
|
||||||
dialog.addHideHandler(new HideHandler() {
|
|
||||||
@Override
|
|
||||||
public void onHide(HideEvent event) {
|
|
||||||
onHideTable();
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
onOpenTable();
|
|
||||||
|
|
||||||
//tabularData.openTable(tableItem.getId());
|
|
||||||
//gridPanel.setHeaderVisible(false);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setTable(TableItemSimple tableItem) {
|
|
||||||
this.tableItem = tableItem;
|
|
||||||
}
|
|
||||||
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @return the added
|
|
||||||
*/
|
|
||||||
public boolean isAdded() {
|
|
||||||
return added;
|
|
||||||
}
|
|
||||||
|
|
||||||
/**
|
|
||||||
* @param added the added to set
|
|
||||||
*/
|
|
||||||
public void setAdded(boolean added) {
|
|
||||||
this.added = added;
|
|
||||||
}
|
|
||||||
|
|
||||||
}
|
|
|
@ -81,4 +81,9 @@ public class StringFld extends AbstractFld {
|
||||||
return fieldContainer;
|
return fieldContainer;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public boolean isValid() {
|
||||||
|
return textField.isValid();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -57,15 +57,16 @@ public class TabularFld extends AbstractFld implements HasTabularFldChangeEventH
|
||||||
private TextButton selectButton, selectButton2, cancelButton;
|
private TextButton selectButton, selectButton2, cancelButton;
|
||||||
private HtmlLayoutContainer templatesList;
|
private HtmlLayoutContainer templatesList;
|
||||||
private TableItemSimple selectedTableItem = null;
|
private TableItemSimple selectedTableItem = null;
|
||||||
//private List<AbstractFld> listeners = new ArrayList<AbstractFld>();
|
private TabularParameter tabularParameter;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* @param parameter
|
* @param parameter
|
||||||
*/
|
*/
|
||||||
public TabularFld(Parameter parameter) {
|
public TabularFld(Parameter parameter) {
|
||||||
super(parameter);
|
super(parameter);
|
||||||
Log.debug("TabularField");
|
Log.debug("TabularField");
|
||||||
|
tabularParameter = (TabularParameter) parameter;
|
||||||
|
|
||||||
SimpleContainer tabContainer=new SimpleContainer();
|
SimpleContainer tabContainer=new SimpleContainer();
|
||||||
vp=new VerticalLayoutContainer();
|
vp=new VerticalLayoutContainer();
|
||||||
init();
|
init();
|
||||||
|
@ -78,14 +79,13 @@ public class TabularFld extends AbstractFld implements HasTabularFldChangeEventH
|
||||||
|
|
||||||
HtmlLayoutContainer descr;
|
HtmlLayoutContainer descr;
|
||||||
|
|
||||||
if (parameter.getDescription() == null) {
|
if (tabularParameter.getDescription() == null) {
|
||||||
descr = new HtmlLayoutContainer("<p style='margin-left:5px;'></p>");
|
descr = new HtmlLayoutContainer("<p style='margin-left:5px;'></p>");
|
||||||
descr.addStyleName("workflow-fieldDescription");
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
|
|
||||||
} else {
|
} else {
|
||||||
tabContainer.setToolTip(parameter.getDescription());
|
|
||||||
descr = new HtmlLayoutContainer("<p style='margin-left:5px;'>"
|
descr = new HtmlLayoutContainer("<p style='margin-left:5px;'>"
|
||||||
+ parameter.getDescription() + "</p>");
|
+ tabularParameter.getDescription() + "</p>");
|
||||||
descr.addStyleName("workflow-fieldDescription");
|
descr.addStyleName("workflow-fieldDescription");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -99,8 +99,7 @@ public class TabularFld extends AbstractFld implements HasTabularFldChangeEventH
|
||||||
|
|
||||||
|
|
||||||
private void init() {
|
private void init() {
|
||||||
TabularParameter p = (TabularParameter) parameter;
|
List<String> templates = tabularParameter.getTemplates();
|
||||||
List<String> templates = p.getTemplates();
|
|
||||||
|
|
||||||
List<ItemType> selectableTypes = new ArrayList<ItemType>();
|
List<ItemType> selectableTypes = new ArrayList<ItemType>();
|
||||||
selectableTypes.add(ItemType.EXTERNAL_FILE);
|
selectableTypes.add(ItemType.EXTERNAL_FILE);
|
||||||
|
@ -253,6 +252,7 @@ public class TabularFld extends AbstractFld implements HasTabularFldChangeEventH
|
||||||
vp.clear();
|
vp.clear();
|
||||||
vp.add(selectButton);
|
vp.add(selectButton);
|
||||||
vp.add(templatesList);
|
vp.add(templatesList);
|
||||||
|
vp.forceLayout();
|
||||||
fieldContainer.forceLayout();
|
fieldContainer.forceLayout();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -270,41 +270,6 @@ public class TabularFld extends AbstractFld implements HasTabularFldChangeEventH
|
||||||
tableDescription.setValue(tableName);
|
tableDescription.setValue(tableName);
|
||||||
tableDescription.setReadOnly(true);
|
tableDescription.setReadOnly(true);
|
||||||
|
|
||||||
/*HTML tableDescription=new HTML("<div class='workflow-parameters-tableDescription'>"
|
|
||||||
+ Format.ellipse(tableName, 30) + "</div>");*/
|
|
||||||
|
|
||||||
TextButton openTableButton = new TextButton("Open Data Set");
|
|
||||||
openTableButton.addSelectHandler(new SelectEvent.SelectHandler() {
|
|
||||||
|
|
||||||
@Override
|
|
||||||
public void onSelect(SelectEvent event) {
|
|
||||||
/*TabularData tabularData = DataMinerManager
|
|
||||||
.getTabularData();
|
|
||||||
TabularDataGridPanel gridPanel = tabularData
|
|
||||||
.getGridPanel();
|
|
||||||
gridPanel.setExpanded(true);
|
|
||||||
gridPanel.setBorders(true);
|
|
||||||
|
|
||||||
Dialog dialog = new Dialog();
|
|
||||||
dialog.setMaximizable(true);
|
|
||||||
dialog.setBodyBorder(false);
|
|
||||||
dialog.setExpanded(true);
|
|
||||||
|
|
||||||
dialog.setHeadingText("Data Set " + tableName);
|
|
||||||
dialog.setWidth(640);
|
|
||||||
dialog.setHeight(480);
|
|
||||||
dialog.setHideOnButtonClick(true);
|
|
||||||
dialog.setModal(true);
|
|
||||||
dialog.add(gridPanel);
|
|
||||||
dialog.show();
|
|
||||||
|
|
||||||
tabularData.openTable(tableId);
|
|
||||||
gridPanel.setHeaderVisible(false);*/
|
|
||||||
|
|
||||||
}
|
|
||||||
});
|
|
||||||
|
|
||||||
|
|
||||||
HBoxLayoutContainer h=new HBoxLayoutContainer();
|
HBoxLayoutContainer h=new HBoxLayoutContainer();
|
||||||
h.add(tableDescription,new BoxLayoutData(new Margins()));
|
h.add(tableDescription,new BoxLayoutData(new Margins()));
|
||||||
h.add(selectButton2,new BoxLayoutData(new Margins()));
|
h.add(selectButton2,new BoxLayoutData(new Margins()));
|
||||||
|
|
|
@ -32,8 +32,7 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent;
|
||||||
public class ComputationOutputPanel extends SimpleContainer {
|
public class ComputationOutputPanel extends SimpleContainer {
|
||||||
|
|
||||||
private ComputationId computationId;
|
private ComputationId computationId;
|
||||||
private final DataMinerPortletServiceAsync service = DataMinerManager
|
private final DataMinerPortletServiceAsync service = DataMinerManager.getService();
|
||||||
.getService();
|
|
||||||
private VerticalLayoutContainer v;
|
private VerticalLayoutContainer v;
|
||||||
|
|
||||||
public ComputationOutputPanel(ComputationId computationId) {
|
public ComputationOutputPanel(ComputationId computationId) {
|
||||||
|
|
|
@ -280,9 +280,7 @@
|
||||||
margin-top: 4px;
|
margin-top: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
.computationExcecutionPanel {
|
|
||||||
|
|
||||||
}
|
|
||||||
|
|
||||||
.workflow-parameters-tableDescription {
|
.workflow-parameters-tableDescription {
|
||||||
font-size: 12px;
|
font-size: 12px;
|
||||||
|
@ -334,139 +332,6 @@
|
||||||
vertical-align: middle;
|
vertical-align: middle;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* PENDING */
|
|
||||||
.progressBar-pending {
|
|
||||||
border: 1px solid #AAAAAA;
|
|
||||||
}
|
|
||||||
|
|
||||||
.progressBar-pending .x-progress-bar {
|
|
||||||
border: medium none;
|
|
||||||
background-image: url("images/progress-gray.gif");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* FAILED */
|
|
||||||
.progressBar-failed {
|
|
||||||
border: 1px solid #AA0000;
|
|
||||||
}
|
|
||||||
|
|
||||||
.progressBar-failed .x-progress-bar {
|
|
||||||
border: medium none;
|
|
||||||
background-image: url("images/progress-red.gif");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* COMPLETE */
|
|
||||||
.progressBar-complete {
|
|
||||||
border: 1px solid #00AA00;
|
|
||||||
}
|
|
||||||
|
|
||||||
.progressBar-complete .x-progress-bar {
|
|
||||||
border: medium none;
|
|
||||||
background-image: url("images/progress-green.gif");
|
|
||||||
}
|
|
||||||
|
|
||||||
/* JOB VIEWER */
|
|
||||||
.jobViewer-title {
|
|
||||||
font-size: 16px;
|
|
||||||
color: #000077;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.jobViewer-section {
|
|
||||||
box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.11), 0 0 0
|
|
||||||
rgba(255, 255, 255, 1), 0 0 1px rgba(196, 196, 196, 1), inset 0 0 1px
|
|
||||||
rgba(77, 77, 77, 1);
|
|
||||||
-moz-box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.11), 0 0 0
|
|
||||||
rgba(255, 255, 255, 1), 0 0 1px rgba(196, 196, 196, 1), inset 0 0 1px
|
|
||||||
rgba(77, 77, 77, 1);
|
|
||||||
-webkit-box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.11), 0 0 0
|
|
||||||
rgba(255, 255, 255, 1), 0 0 1px rgba(196, 196, 196, 1), inset 0 0 1px
|
|
||||||
rgba(77, 77, 77, 1);
|
|
||||||
-o-box-shadow: inset 0 0 28px rgba(0, 0, 0, 0.11), 0 0 0
|
|
||||||
rgba(255, 255, 255, 1), 0 0 1px rgba(196, 196, 196, 1), inset 0 0 1px
|
|
||||||
rgba(77, 77, 77, 1);
|
|
||||||
border-radius: 5px;
|
|
||||||
-moz-border-radius: 5px;
|
|
||||||
-webkit-border-radius: 5px;
|
|
||||||
-o-border-radius: 5px;
|
|
||||||
margin: 0px 5px 5px 10px; /* top right bottom left*/
|
|
||||||
padding: 5px;
|
|
||||||
/* overflow: hidden;*/
|
|
||||||
}
|
|
||||||
|
|
||||||
.jobViewer-section-header {
|
|
||||||
border-bottom: 1px solid gray;
|
|
||||||
margin-bottom: 10px;
|
|
||||||
margin-left: 5px;
|
|
||||||
margin-top: 20px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.jobViewer-section-header-title {
|
|
||||||
color: #333333;
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.jobViewer-section-header-image {
|
|
||||||
margin-right: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.jobViewer-table {
|
|
||||||
line-height: 1.6em;
|
|
||||||
font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
|
|
||||||
font-size: 12px;
|
|
||||||
margin: 15px;
|
|
||||||
width: 480px;
|
|
||||||
text-align: left;
|
|
||||||
border-collapse: collapse;
|
|
||||||
}
|
|
||||||
|
|
||||||
.jobViewer-table th {
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: normal;
|
|
||||||
padding: 12px 15px;
|
|
||||||
color: #039;
|
|
||||||
}
|
|
||||||
|
|
||||||
.jobViewer-table td {
|
|
||||||
padding: 3px 5px;
|
|
||||||
border-top: 1px solid #e8edff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.jobViewer-table-oce-first {
|
|
||||||
background: #d0dafd;
|
|
||||||
border-right: 10px solid transparent;
|
|
||||||
border-left: 10px solid transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.jobViewer-table tr:hover td {
|
|
||||||
color: #339;
|
|
||||||
background: #eff2ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.jobViewer-output-outputType {
|
|
||||||
background-color: #EEEEEE;
|
|
||||||
border: 1px solid #BDBDBD;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-bottom: 20px;
|
|
||||||
margin-top: 10px;
|
|
||||||
padding: 5px;
|
|
||||||
text-align: center;
|
|
||||||
}
|
|
||||||
|
|
||||||
.jobViewer-output-groupTitle {
|
|
||||||
font-style: italic;
|
|
||||||
font-weight: bold;
|
|
||||||
margin-bottom: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.jobViewer-output-separator {
|
|
||||||
border-top: 2px solid #AAAAAA;
|
|
||||||
height: 30px;
|
|
||||||
margin: 8px auto auto;
|
|
||||||
width: 400px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.menuImgLogo:HOVER {
|
.menuImgLogo:HOVER {
|
||||||
/* cursor: pointer;*/
|
/* cursor: pointer;*/
|
||||||
|
@ -490,164 +355,87 @@
|
||||||
cursor: auto;
|
cursor: auto;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* TABLE IMPORTER AND UPLOAD MONITOR */
|
|
||||||
.tableImporter, .uploadMonitor {
|
|
||||||
margin: auto;
|
|
||||||
margin-top: 20px;
|
|
||||||
padding: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tableImporter-title, .uploadMonitor-title {
|
/*
|
||||||
text-align: center;
|
* Computation Execution
|
||||||
font-size: 16px;
|
*/
|
||||||
font-weight: bold;
|
.computationExcecutionPanel {
|
||||||
color: #000077;
|
|
||||||
margin-top: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uploadMonitor-text {
|
|
||||||
margin-left: 5px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.uploadMonitor-description, .tableImporter-description {
|
|
||||||
font-size: 12px;
|
|
||||||
color: #505050;
|
|
||||||
margin-top: 2px;
|
|
||||||
padding-left: 2px;
|
|
||||||
padding-right: 2px;
|
|
||||||
width: 380px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tableImporter-form {
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tableImporter-form .x-panel-body {
|
|
||||||
border: none;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tableImporter-templateDescriptionsButton {
|
|
||||||
font-size: 14px;
|
|
||||||
font-weight: bold;
|
|
||||||
border: 1px dotted #BBBBBB;
|
|
||||||
color: #555555;
|
|
||||||
text-align: center;
|
|
||||||
margin-top: 10px;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tableImporter-templateDescriptionsButton:HOVER {
|
|
||||||
cursor: pointer;
|
|
||||||
color: #000077;
|
|
||||||
}
|
|
||||||
|
|
||||||
.tableImporter-templateDescriptions-textSelectTemplate {
|
|
||||||
font-size: 13px;
|
font-size: 13px;
|
||||||
margin: 10px;
|
color: black;
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tableImporter-templateDescriptorPanel {
|
.computationStatusPanel{
|
||||||
text-align: left;
|
border: 1px solid black;
|
||||||
margin: auto;
|
padding: 10px;
|
||||||
margin-top: 10px;
|
|
||||||
padding: 5px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tableImporter-templateDescriptorPanel-img {
|
.computationStatusTitle {
|
||||||
float: left;
|
|
||||||
position: relative;
|
|
||||||
left: 10px;
|
|
||||||
top: -20px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.imgCursor:hover {
|
.computationStatusDate {
|
||||||
cursor: pointer;
|
|
||||||
opacity: 0.7;
|
|
||||||
margin: auto;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tableImporter-fileName {
|
|
||||||
font-size: 10px;
|
/**
|
||||||
color: #505050;
|
* ProgressBar
|
||||||
margin: auto;
|
*/
|
||||||
|
|
||||||
|
|
||||||
|
.progressBar-pending {
|
||||||
|
border: 1px solid #AAAAAA;
|
||||||
}
|
}
|
||||||
|
|
||||||
.tableImporter-templateText {
|
.progressBar-pending .x-progress-bar {
|
||||||
font-size: 10px;
|
border: medium none;
|
||||||
color: #505050;
|
background-image: url("images/progress-gray.gif");
|
||||||
height: 25px;
|
|
||||||
vertical-align: bottom;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tableImporter-templateIcon {
|
.progressBar-failed {
|
||||||
margin: auto;
|
border: 1px solid #AA0000;
|
||||||
margin-bottom: -10px;
|
|
||||||
margin-top: -5px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.tableImporter-templateIcon:hover {
|
.progressBar-failed .x-progress-bar {
|
||||||
cursor: pointer;
|
border: medium none;
|
||||||
opacity: 0.7;
|
background-image: url("images/progress-red.gif");
|
||||||
}
|
}
|
||||||
|
|
||||||
.templateDescriptorPanel-description {
|
|
||||||
font-size: 13px;
|
.progressBar-complete .progressWrap {
|
||||||
color: #505050;
|
border-color:#00AA00;
|
||||||
margin-top: 17px;
|
|
||||||
padding-left: 30px;
|
|
||||||
padding-right: 20px;
|
|
||||||
padding-top: 28px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.templateDescriptorPanel-tableTemplateItem {
|
.progressBar-complete .progressInner {
|
||||||
border-bottom: 1px solid gray;
|
background-color:#bdefbd;
|
||||||
font-size: 13px;
|
background-image: url("images/bg-progress.gif");
|
||||||
font-weight: bold;
|
height: auto;
|
||||||
margin-left: 10px;
|
|
||||||
padding-top: 20px;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
.templateDescriptorPanel-table {
|
.progressBar-complete .progressBar {
|
||||||
line-height: 1.6em;
|
background-color:#4ec14e;
|
||||||
font-family: "Lucida Sans Unicode", "Lucida Grande", Sans-Serif;
|
background-image: url("images/green-progress.gif");
|
||||||
font-size: 12px;
|
background-repeat: repeat-x;
|
||||||
margin: 15px;
|
background-position: left center;
|
||||||
width: 480px;
|
height: 18px;
|
||||||
text-align: left;
|
border-top-color:#d1fdda;
|
||||||
border-collapse: collapse;
|
border-bottom-color:#7fe48a;
|
||||||
|
border-right-color:#7fe48a;
|
||||||
}
|
}
|
||||||
|
|
||||||
.templateDescriptorPanel-table th {
|
/*
|
||||||
font-size: 13px;
|
*
|
||||||
font-weight: normal;
|
*.progressBar-complete {
|
||||||
padding: 12px 15px;
|
* border: 1px solid #00AA00;
|
||||||
color: #039;
|
*}
|
||||||
}
|
*
|
||||||
|
*.progressBar-complete .x-progress-bar {
|
||||||
|
* border: medium none;
|
||||||
|
* background-image: url("images/progress-green.gif");
|
||||||
|
*}
|
||||||
|
*/
|
||||||
|
|
||||||
.templateDescriptorPanel-table td {
|
|
||||||
padding: 3px 5px;
|
|
||||||
color: #669;
|
|
||||||
border-top: 1px solid #e8edff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.templateDescriptorPanel-table-oce-first {
|
|
||||||
background: #d0dafd;
|
|
||||||
border-right: 10px solid transparent;
|
|
||||||
border-left: 10px solid transparent;
|
|
||||||
}
|
|
||||||
|
|
||||||
.templateDescriptorPanel-table tr:hover td {
|
|
||||||
color: #339;
|
|
||||||
background: #eff2ff;
|
|
||||||
}
|
|
||||||
|
|
||||||
.gcube_DialogBox .Caption {
|
|
||||||
font-family: Arial Unicode !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dataSpace-grid-templateImg {
|
|
||||||
display: inline;
|
|
||||||
}
|
|
||||||
|
|
||||||
.dataSpace-grid-tableName {
|
|
||||||
font-weight: bold;
|
|
||||||
}
|
|
Binary file not shown.
After Width: | Height: | Size: 1.1 KiB |
Binary file not shown.
After Width: | Height: | Size: 834 B |
Binary file not shown.
After Width: | Height: | Size: 99 B |
Binary file not shown.
After Width: | Height: | Size: 120 B |
249922
test.log.1
249922
test.log.1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Loading…
Reference in New Issue