Minor Update

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-expression-widget@111739 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2015-02-05 16:20:50 +00:00
parent 1f6931a8eb
commit 8b541fce46
3 changed files with 13 additions and 9 deletions

View File

@ -73,7 +73,7 @@ public class ReplaceArithmeticWidget extends SimpleContainer {
private VerticalLayoutContainer vert; private VerticalLayoutContainer vert;
private String readableExpression; private String readableExpression;
private String itemIdComboArithmetic; private String itemIdComboOperation;
private String itemIdComboLeaf; private String itemIdComboLeaf;
private String itemIdComboColumns; private String itemIdComboColumns;
private String itemIdFirstArg; private String itemIdFirstArg;
@ -213,7 +213,7 @@ public class ReplaceArithmeticWidget extends SimpleContainer {
} }
protected void setup() { protected void setup() {
itemIdComboArithmetic = "ComboArithmetic" + trId.getId(); itemIdComboOperation = "ComboOperation" + trId.getId();
itemIdComboLeaf = "ComboLeaf" + trId.getId(); itemIdComboLeaf = "ComboLeaf" + trId.getId();
itemIdComboColumns = "ComboColumns" + trId.getId(); itemIdComboColumns = "ComboColumns" + trId.getId();
itemIdFirstArg = "FirstArg" + trId.getId(); itemIdFirstArg = "FirstArg" + trId.getId();
@ -403,6 +403,7 @@ public class ReplaceArithmeticWidget extends SimpleContainer {
firstArg.setEmptyText(""); firstArg.setEmptyText("");
secondArg.setVisible(false); secondArg.setVisible(false);
secondArg.setEmptyText(""); secondArg.setEmptyText("");
removeOperator(source);
break; break;
case Addition: case Addition:
case Subtraction: case Subtraction:
@ -480,7 +481,7 @@ public class ReplaceArithmeticWidget extends SimpleContainer {
comboReplaceArithmeticElementsOperators.setEmptyText("Select..."); comboReplaceArithmeticElementsOperators.setEmptyText("Select...");
comboReplaceArithmeticElementsOperators comboReplaceArithmeticElementsOperators
.setItemId(itemIdComboArithmetic); .setItemId(itemIdComboOperation);
comboReplaceArithmeticElementsOperators.setWidth(COMBO_WIDTH); comboReplaceArithmeticElementsOperators.setWidth(COMBO_WIDTH);
comboReplaceArithmeticElementsOperators.setEditable(false); comboReplaceArithmeticElementsOperators.setEditable(false);
comboReplaceArithmeticElementsOperators comboReplaceArithmeticElementsOperators
@ -689,6 +690,7 @@ public class ReplaceArithmeticWidget extends SimpleContainer {
firstArg.setEmptyText(""); firstArg.setEmptyText("");
secondArg.setVisible(false); secondArg.setVisible(false);
secondArg.setEmptyText(""); secondArg.setEmptyText("");
removeOperator(source);
break; break;
case Addition: case Addition:
case Subtraction: case Subtraction:
@ -766,7 +768,7 @@ public class ReplaceArithmeticWidget extends SimpleContainer {
}); });
comboReplaceArithmeticElementsOperator.setEmptyText("Select..."); comboReplaceArithmeticElementsOperator.setEmptyText("Select...");
comboReplaceArithmeticElementsOperator.setItemId(itemIdComboArithmetic); comboReplaceArithmeticElementsOperator.setItemId(itemIdComboOperation);
comboReplaceArithmeticElementsOperator.setWidth(COMBO_WIDTH); comboReplaceArithmeticElementsOperator.setWidth(COMBO_WIDTH);
comboReplaceArithmeticElementsOperator.setEditable(false); comboReplaceArithmeticElementsOperator.setEditable(false);
comboReplaceArithmeticElementsOperator comboReplaceArithmeticElementsOperator
@ -861,7 +863,7 @@ public class ReplaceArithmeticWidget extends SimpleContainer {
horiz = (HBoxLayoutContainer) vert.getWidget(index); horiz = (HBoxLayoutContainer) vert.getWidget(index);
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
ComboBox<ReplaceArithmeticElement> comboOperator = (ComboBox<ReplaceArithmeticElement>) horiz ComboBox<ReplaceArithmeticElement> comboOperator = (ComboBox<ReplaceArithmeticElement>) horiz
.getItemByItemId(itemIdComboArithmetic); .getItemByItemId(itemIdComboOperation);
Log.debug("combo Operator: " + comboOperator.getCurrentValue()); Log.debug("combo Operator: " + comboOperator.getCurrentValue());
@SuppressWarnings("unchecked") @SuppressWarnings("unchecked")
ComboBox<ReplaceArithmeticElement> comboLeaf = (ComboBox<ReplaceArithmeticElement>) horiz ComboBox<ReplaceArithmeticElement> comboLeaf = (ComboBox<ReplaceArithmeticElement>) horiz

View File

@ -381,6 +381,7 @@ public class ReplaceWidget extends SimpleContainer {
firstArg.setEmptyText(""); firstArg.setEmptyText("");
secondArg.setVisible(false); secondArg.setVisible(false);
secondArg.setEmptyText(""); secondArg.setEmptyText("");
removeConcat(source);
break; break;
case Concat: case Concat:
if (!existConcat(source)) { if (!existConcat(source)) {
@ -642,6 +643,7 @@ public class ReplaceWidget extends SimpleContainer {
firstArg.setEmptyText(""); firstArg.setEmptyText("");
secondArg.setVisible(false); secondArg.setVisible(false);
secondArg.setEmptyText(""); secondArg.setEmptyText("");
removeConcat(source);
break; break;
case Concat: case Concat:
if (!existConcat(source)) { if (!existConcat(source)) {

View File

@ -14,10 +14,10 @@ public enum ReplaceArithmeticType {
SubstringByCharSeq("Substring by Char Seq."), SubstringByCharSeq("Substring by Char Seq."),
TextReplaceMatchingRegex("Replace Matching Regex"), TextReplaceMatchingRegex("Replace Matching Regex"),
Addition("Addition"), Addition("Addition"),
Subtraction("Substring by Index"), Subtraction("Subtraction"),
Modulus("Substring by Char Seq."), Modulus("Modulus"),
Multiplication("Replace Matching Regex"), Multiplication("Multiplication"),
Division("Replace Matching Regex"); Division("Division");
/** /**
* @param text * @param text