Minor Update
git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@97880 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
parent
caca0b29af
commit
f0204e2478
|
@ -4698,3 +4698,35 @@ Compiling...
|
||||||
Compilation completed in 0.00 seconds
|
Compilation completed in 0.00 seconds
|
||||||
Removing invalidated units
|
Removing invalidated units
|
||||||
Finding entry point classes
|
Finding entry point classes
|
||||||
|
Public resources found in...
|
||||||
|
Translatable source found in...
|
||||||
|
Found 0 cached/archived units. Used 0 / 2719 units from cache.
|
||||||
|
Compiling...
|
||||||
|
10% complete (ETR: 28 seconds)
|
||||||
|
10% complete (ETR: 28 seconds)
|
||||||
|
20% complete (ETR: 23 seconds)
|
||||||
|
30% complete (ETR: 19 seconds)
|
||||||
|
40% complete (ETR: 14 seconds)
|
||||||
|
50% complete (ETR: 11 seconds)
|
||||||
|
60% complete (ETR: 8 seconds)
|
||||||
|
70% complete (ETR: 5 seconds)
|
||||||
|
80% complete (ETR: 3 seconds)
|
||||||
|
90% complete (ETR: 1 seconds)
|
||||||
|
100% complete (ETR: 0 seconds)
|
||||||
|
Compilation completed in 22.96 seconds
|
||||||
|
Removing invalidated units
|
||||||
|
Finding entry point classes
|
||||||
|
Public resources found in...
|
||||||
|
Translatable source found in...
|
||||||
|
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
|
||||||
|
Compiling...
|
||||||
|
Compilation completed in 0.00 seconds
|
||||||
|
Removing invalidated units
|
||||||
|
Finding entry point classes
|
||||||
|
Public resources found in...
|
||||||
|
Translatable source found in...
|
||||||
|
Found 2719 cached/archived units. Used 2719 / 2719 units from cache.
|
||||||
|
Compiling...
|
||||||
|
Compilation completed in 0.01 seconds
|
||||||
|
Removing invalidated units
|
||||||
|
Finding entry point classes
|
||||||
|
|
|
@ -54,6 +54,9 @@ public class ColumnMappingDialog extends Window {
|
||||||
add(columnMappingPanel);
|
add(columnMappingPanel);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
protected void initWindow() {
|
protected void initWindow() {
|
||||||
setWidth(WIDTH);
|
setWidth(WIDTH);
|
||||||
setHeight(HEIGHT);
|
setHeight(HEIGHT);
|
||||||
|
@ -83,11 +86,26 @@ public class ColumnMappingDialog extends Window {
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void close() {
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
|
public void close() {
|
||||||
|
fireAbortedColumnMapping();
|
||||||
hide();
|
hide();
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param columnMappingList
|
||||||
|
*/
|
||||||
|
public void saveMapping(ColumnMappingList columnMappingList) {
|
||||||
|
fireSelectedColumnMapping(columnMappingList);
|
||||||
|
hide();
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
*
|
*
|
||||||
* @param listener
|
* @param listener
|
||||||
|
@ -104,18 +122,30 @@ public class ColumnMappingDialog extends Window {
|
||||||
listeners.remove(listener);
|
listeners.remove(listener);
|
||||||
}
|
}
|
||||||
|
|
||||||
public void fireSelectedColumnMapping(ColumnMappingList columnMappingData) {
|
/**
|
||||||
|
*
|
||||||
|
* @param columnMappingList
|
||||||
|
*/
|
||||||
|
public void fireSelectedColumnMapping(ColumnMappingList columnMappingList) {
|
||||||
for (ColumnMappingListener listener : listeners)
|
for (ColumnMappingListener listener : listeners)
|
||||||
listener.selectedColumnMapping(columnMappingData);
|
listener.selectedColumnMapping(columnMappingList);
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
*/
|
||||||
public void fireAbortedColumnMapping() {
|
public void fireAbortedColumnMapping() {
|
||||||
for (ColumnMappingListener listener : listeners)
|
for (ColumnMappingListener listener : listeners)
|
||||||
listener.abortedColumnMapping();
|
listener.abortedColumnMapping();
|
||||||
hide();
|
hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
*
|
||||||
|
* @param reason
|
||||||
|
* @param detail
|
||||||
|
*/
|
||||||
public void fireFailedColumnMapping(String reason, String detail) {
|
public void fireFailedColumnMapping(String reason, String detail) {
|
||||||
for (ColumnMappingListener listener : listeners)
|
for (ColumnMappingListener listener : listeners)
|
||||||
listener.failedColumnMapping(reason, detail);
|
listener.failedColumnMapping(reason, detail);
|
||||||
|
|
|
@ -14,7 +14,7 @@ public interface ColumnMappingListener {
|
||||||
/**
|
/**
|
||||||
* Called when created column mapping without errors
|
* Called when created column mapping without errors
|
||||||
*/
|
*/
|
||||||
public void selectedColumnMapping(ColumnMappingList columnMappingData);
|
public void selectedColumnMapping(ColumnMappingList columnMappingList);
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* Called when the column mapping operation is aborted by the user.
|
* Called when the column mapping operation is aborted by the user.
|
||||||
|
|
|
@ -7,6 +7,7 @@ import org.gcube.portlets.user.td.columnwidget.client.dimension.DimensionRowSele
|
||||||
import org.gcube.portlets.user.td.columnwidget.client.dimension.DimensionRowSelectionListener;
|
import org.gcube.portlets.user.td.columnwidget.client.dimension.DimensionRowSelectionListener;
|
||||||
import org.gcube.portlets.user.td.columnwidget.client.dimension.DimensionRowsProperties;
|
import org.gcube.portlets.user.td.columnwidget.client.dimension.DimensionRowsProperties;
|
||||||
import org.gcube.portlets.user.td.columnwidget.client.resources.ResourceBundle;
|
import org.gcube.portlets.user.td.columnwidget.client.resources.ResourceBundle;
|
||||||
|
import org.gcube.portlets.user.td.columnwidget.client.utils.UtilsGXT3;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.DimensionRow;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.DimensionRow;
|
||||||
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
import org.gcube.portlets.user.td.gwtservice.shared.tr.TabResource;
|
||||||
|
@ -160,11 +161,43 @@ public class ColumnMappingPanel extends FramedPanel {
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void save(){
|
protected void save(){
|
||||||
|
int lenght=vert.getWidgetCount();
|
||||||
|
int i=0;
|
||||||
|
for(; i<lenght; i++){
|
||||||
|
HBoxLayoutContainer h=(HBoxLayoutContainer)vert.getWidget(i);
|
||||||
|
if(h!=null){
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
ComboBox<DimensionRow> comboSourceValue=(ComboBox<DimensionRow>) h.getItemByItemId(itemIdSourceValueArg);
|
||||||
|
DimensionRow sourceValue=comboSourceValue.getCurrentValue();
|
||||||
|
if(sourceValue!=null){
|
||||||
|
@SuppressWarnings("unchecked")
|
||||||
|
ComboBox<DimensionRow> comboTargetValue=(ComboBox<DimensionRow>) h.getItemByItemId(itemIdTargetValueArg);
|
||||||
|
DimensionRow targetValue=comboTargetValue.getCurrentValue();
|
||||||
|
if(targetValue!=null){
|
||||||
|
ColumnMappingData columnMappingData=new ColumnMappingData(sourceValue,targetValue);
|
||||||
|
mapping.add(columnMappingData);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if(mapping.size()>0){
|
||||||
|
columnMappingList=new ColumnMappingList(mapping);
|
||||||
|
if(parent!=null){
|
||||||
|
parent.saveMapping(columnMappingList);
|
||||||
|
}
|
||||||
|
} else {
|
||||||
|
UtilsGXT3.info("Attention", "Creates a valid mapping");
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void close(){
|
protected void close(){
|
||||||
|
if(parent!=null){
|
||||||
|
parent.close();
|
||||||
|
}
|
||||||
|
hide();
|
||||||
}
|
}
|
||||||
|
|
||||||
protected void setColumnMappingData() {
|
protected void setColumnMappingData() {
|
||||||
|
|
Loading…
Reference in New Issue