Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-table-widget@120312 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-11-18 17:09:35 +00:00 committed by Giancarlo Panichi
parent 9618648d34
commit 51bcc8853a
5 changed files with 111 additions and 117 deletions

View File

@ -4,8 +4,8 @@ import com.google.gwt.i18n.client.Messages;
/** /**
* *
* @author giancarlo * @author giancarlo 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 interface TableWidgetMessages extends Messages { public interface TableWidgetMessages extends Messages {
@ -238,9 +238,4 @@ public interface TableWidgetMessages extends Messages {
@DefaultMessage("Attention no column selected!") @DefaultMessage("Attention no column selected!")
String attentionNoColumnSelected(); String attentionNoColumnSelected();
} }

View File

@ -13,8 +13,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
/** /**
* *
* @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 DenormalizeDialog extends Window { public class DenormalizeDialog extends Window {
@ -76,6 +76,4 @@ public class DenormalizeDialog extends Window {
} }
} }

View File

@ -88,7 +88,6 @@ public class DenormalizePanel extends FramedPanel implements
private CommonMessages msgsCommon; private CommonMessages msgsCommon;
private TableWidgetMessages msgs; private TableWidgetMessages msgs;
public DenormalizePanel(DenormalizeDialog parent, TRId trId, public DenormalizePanel(DenormalizeDialog parent, TRId trId,
EventBus eventBus) { EventBus eventBus) {
this.parent = parent; this.parent = parent;
@ -173,7 +172,8 @@ public class DenormalizePanel extends FramedPanel implements
comboValueColumn.setEditable(false); comboValueColumn.setEditable(false);
comboValueColumn.setTriggerAction(TriggerAction.ALL); comboValueColumn.setTriggerAction(TriggerAction.ALL);
FieldLabel comboValueColumnLabel=new FieldLabel(comboValueColumn, msgs.comboValueColumnLabel()); FieldLabel comboValueColumnLabel = new FieldLabel(comboValueColumn,
msgs.comboValueColumnLabel());
// Combo Attribute Column // Combo Attribute Column
storeComboAttributeColumn = new ListStore<ColumnData>( storeComboAttributeColumn = new ListStore<ColumnData>(
@ -216,8 +216,8 @@ public class DenormalizePanel extends FramedPanel implements
VerticalLayoutContainer v = new VerticalLayoutContainer(); VerticalLayoutContainer v = new VerticalLayoutContainer();
// v.setScrollMode(ScrollMode.AUTO); Set in GXT 3.0.1 // v.setScrollMode(ScrollMode.AUTO); Set in GXT 3.0.1
v.add(comboValueColumnLabel, v.add(comboValueColumnLabel, new VerticalLayoutData(1, -1, new Margins(
new VerticalLayoutData(1, -1, new Margins(1))); 1)));
v.add(comboAttributeColumnLabel, new VerticalLayoutData(1, -1, v.add(comboAttributeColumnLabel, new VerticalLayoutData(1, -1,
new Margins(1))); new Margins(1)));
@ -304,7 +304,8 @@ public class DenormalizePanel extends FramedPanel implements
} else { } else {
Log.error("load combo failure:" Log.error("load combo failure:"
+ caught.getLocalizedMessage()); + caught.getLocalizedMessage());
UtilsGXT3.alert(msgsCommon.error(), UtilsGXT3.alert(
msgsCommon.error(),
msgs.errorRetrievingColumsOfTabularResourceFixed() msgs.errorRetrievingColumsOfTabularResourceFixed()
+ trId.getId()); + trId.getId());
} }
@ -326,8 +327,8 @@ public class DenormalizePanel extends FramedPanel implements
} }
} }
if (columnsIntegerNumeric.size() < 1) { if (columnsIntegerNumeric.size() < 1) {
UtilsGXT3 UtilsGXT3.alert(
.alert(msgsCommon.attention(), msgsCommon.attention(),
msgs.attentionNoIntegerOrNumericColumnIsPresent()); msgs.attentionNoIntegerOrNumericColumnIsPresent());
return; return;
} }
@ -351,7 +352,8 @@ public class DenormalizePanel extends FramedPanel implements
ColumnData valueColumn = comboValueColumn.getCurrentValue(); ColumnData valueColumn = comboValueColumn.getCurrentValue();
if (valueColumn == null) { if (valueColumn == null) {
UtilsGXT3.alert(msgsCommon.attention(), msgs.attentionNoValueColumnSelected()); UtilsGXT3.alert(msgsCommon.attention(),
msgs.attentionNoValueColumnSelected());
return; return;
} }

View File

@ -13,8 +13,8 @@ import com.sencha.gxt.widget.core.client.event.SelectEvent.SelectHandler;
/** /**
* *
* @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 NormalizeDialog extends Window { public class NormalizeDialog extends Window {
@ -37,7 +37,6 @@ public class NormalizeDialog extends Window {
} }
protected void initWindow() { protected void initWindow() {
setWidth(WIDTH); setWidth(WIDTH);
setHeight(HEIGHT); setHeight(HEIGHT);
@ -72,6 +71,4 @@ public class NormalizeDialog extends Window {
} }
} }

View File

@ -140,7 +140,8 @@ public class NormalizePanel extends FramedPanel implements
msgs.valueColumnNameLabel()); msgs.valueColumnNameLabel());
valueColumnNameLabel.setLabelWidth(110); valueColumnNameLabel.setLabelWidth(110);
FieldLabel columnsToNormalizeLabel = new FieldLabel(null, msgs.columnsToNormalizeLabel()); FieldLabel columnsToNormalizeLabel = new FieldLabel(null,
msgs.columnsToNormalizeLabel());
columnsToNormalizeLabel.setLabelWidth(150); columnsToNormalizeLabel.setLabelWidth(150);
columnsToNormalizeLabel.getElement().applyStyles("font-weight:bold"); columnsToNormalizeLabel.getElement().applyStyles("font-weight:bold");
@ -209,8 +210,8 @@ public class NormalizePanel extends FramedPanel implements
v.setAdjustForScroll(true); v.setAdjustForScroll(true);
v.add(normalizedColumnNameLabel, new VerticalLayoutData(1, -1)); v.add(normalizedColumnNameLabel, new VerticalLayoutData(1, -1));
v.add(valueColumnNameLabel, new VerticalLayoutData(1, -1)); v.add(valueColumnNameLabel, new VerticalLayoutData(1, -1));
v.add(columnsToNormalizeLabel, new VerticalLayoutData(-1, -1, new Margins(2, 1, 5, v.add(columnsToNormalizeLabel, new VerticalLayoutData(-1, -1,
1))); new Margins(2, 1, 5, 1)));
v.add(grid, new VerticalLayoutData(1, -1, new Margins(0))); v.add(grid, new VerticalLayoutData(1, -1, new Margins(0)));
v.add(hBox, new VerticalLayoutData(-1, -1, new Margins(10, 0, 10, 0))); v.add(hBox, new VerticalLayoutData(-1, -1, new Margins(10, 0, 10, 0)));
add(v, new VerticalLayoutData(1, -1, new Margins(0))); add(v, new VerticalLayoutData(1, -1, new Margins(0)));
@ -264,8 +265,8 @@ public class NormalizePanel extends FramedPanel implements
} else { } else {
btnNormalize.disable(); btnNormalize.disable();
Log.error("This tabular resource has not Integer or Numeric columns, normalize is not applicable!"); Log.error("This tabular resource has not Integer or Numeric columns, normalize is not applicable!");
UtilsGXT3 UtilsGXT3.alert(
.alert(msgsCommon.attention(), msgsCommon.attention(),
msgs.attentionThisTabularResourceHasNotIntegerOrNumericColumnsNormalizeIsNotApplicable()); msgs.attentionThisTabularResourceHasNotIntegerOrNumericColumnsNormalizeIsNotApplicable());
callback.onFailure(new Throwable( callback.onFailure(new Throwable(
msgs.attentionThisTabularResourceHasNotIntegerOrNumericColumnsNormalizeIsNotApplicable())); msgs.attentionThisTabularResourceHasNotIntegerOrNumericColumnsNormalizeIsNotApplicable()));
@ -293,7 +294,8 @@ public class NormalizePanel extends FramedPanel implements
protected void onNormalize() { protected void onNormalize() {
ArrayList<ColumnData> col = getSelectedItems(); ArrayList<ColumnData> col = getSelectedItems();
if (col == null || col.size() < 1) { if (col == null || col.size() < 1) {
UtilsGXT3.alert(msgsCommon.attention(), msgs.attentionNoColumnSelected()); UtilsGXT3.alert(msgsCommon.attention(),
msgs.attentionNoColumnSelected());
return; return;
} }