1452: Implement a GUI for StatMan Algorithms Importer

Task-Url: https://support.d4science.org/issues/1452

Updated algorithm info description field

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/statistical-algorithms-importer@122382 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2016-01-20 16:22:29 +00:00
parent 7293907826
commit f7b80e548a
1 changed files with 16 additions and 9 deletions

View File

@ -36,6 +36,7 @@ import com.sencha.gxt.widget.core.client.event.CompleteEditEvent.CompleteEditHan
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.form.FieldLabel;
import com.sencha.gxt.widget.core.client.form.TextArea;
import com.sencha.gxt.widget.core.client.form.TextField;
import com.sencha.gxt.widget.core.client.form.validator.RegExValidator;
import com.sencha.gxt.widget.core.client.grid.ColumnConfig;
@ -54,10 +55,12 @@ import com.sencha.gxt.widget.core.client.toolbar.ToolBar;
*/
public class ProjectInfoPanel extends ContentPanel {
private static final int LABAEL_WIDTH = 120;
private static final String DESCRIPTION_FIELD_HEIGHT = "40px";
@SuppressWarnings("unused")
private EventBus eventBus;
private TextField algorithmName;
private TextField algorithmDescription;
private TextArea algorithmDescription;
private ListStore<RequestedVRE> storeRequestedVRE;
private Grid<RequestedVRE> gridRequestedVRE;
private GridRowEditing<RequestedVRE> gridRequestedVREEditing;
@ -103,14 +106,17 @@ public class ProjectInfoPanel extends ContentPanel {
}
});
FieldLabel packageNameLabel = new FieldLabel(algorithmName, "Name");
algorithmDescription = new TextField();
FieldLabel nameLabel = new FieldLabel(algorithmName, "Name");
nameLabel.setLabelWidth(LABAEL_WIDTH);
algorithmDescription = new TextArea();
algorithmDescription.setHeight(DESCRIPTION_FIELD_HEIGHT);
algorithmDescription.setAllowBlank(false);
algorithmDescription.setEmptyText("Enter description...");
FieldLabel projectDescriptionLabel = new FieldLabel(
FieldLabel descriptionLabel = new FieldLabel(
algorithmDescription, "Description");
descriptionLabel.setLabelWidth(LABAEL_WIDTH);
// Grid
RequestedVREProperties props = GWT
.create(RequestedVREProperties.class);
@ -271,7 +277,8 @@ public class ProjectInfoPanel extends ContentPanel {
// /
FieldLabel requestedVRELabel = new FieldLabel(null, "Requested VREs");
requestedVRELabel.setLabelWidth(LABAEL_WIDTH);
ToolBar toolBar = new ToolBar();
toolBar.add(btnAdd, new BoxLayoutData(new Margins(0)));
@ -279,8 +286,8 @@ public class ProjectInfoPanel extends ContentPanel {
vlc.setAdjustForScroll(false);
vlc.setScrollMode(ScrollMode.NONE);
vlc.add(packageNameLabel, new VerticalLayoutData(1, -1, new Margins(0)));
vlc.add(projectDescriptionLabel, new VerticalLayoutData(1, -1,
vlc.add(nameLabel, new VerticalLayoutData(1, -1, new Margins(0)));
vlc.add(descriptionLabel, new VerticalLayoutData(1, -1,
new Margins(0)));
vlc.add(requestedVRELabel, new VerticalLayoutData(1, -1,
new Margins(0)));