Minor updated

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget@87276 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2013-12-20 16:44:08 +00:00
parent b3fe4a61c5
commit fb3e99196c
17 changed files with 282 additions and 0 deletions

36
.classpath Normal file
View File

@ -0,0 +1,36 @@
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" output="target/tabular-data-column-widget-1.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/tabular-data-column-widget-1.0.0-SNAPSHOT/WEB-INF/classes" path="src/main/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="src" output="target/test-classes" path="src/test/java">
<attributes>
<attribute name="optional" value="true"/>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry excluding="**" kind="src" output="target/test-classes" path="src/test/resources">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes>
<attribute name="maven.pomderived" value="true"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/tabular-data-column-widget-1.0.0-SNAPSHOT/WEB-INF/classes"/>
</classpath>

23
.project Normal file
View File

@ -0,0 +1,23 @@
<?xml version="1.0" encoding="UTF-8"?>
<projectDescription>
<name>tabular-data-column-widget</name>
<comment></comment>
<projects>
</projects>
<buildSpec>
<buildCommand>
<name>org.eclipse.jdt.core.javabuilder</name>
<arguments>
</arguments>
</buildCommand>
<buildCommand>
<name>org.eclipse.m2e.core.maven2Builder</name>
<arguments>
</arguments>
</buildCommand>
</buildSpec>
<natures>
<nature>org.eclipse.jdt.core.javanature</nature>
<nature>org.eclipse.m2e.core.maven2Nature</nature>
</natures>
</projectDescription>

View File

@ -0,0 +1,4 @@
eclipse.preferences.version=1
filesCopiedToWebInfLib=
googleCloudSqlEnabled=false
localDevMySqlEnabled=true

View File

@ -0,0 +1,4 @@
eclipse.preferences.version=1
jarsExcludedFromWebInfLib=
warSrcDir=
warSrcDirIsOutput=true

View File

@ -0,0 +1,3 @@
eclipse.preferences.version=1
entryPointModules=
filesCopiedToWebInfLib=

View File

@ -0,0 +1,6 @@
eclipse.preferences.version=1
encoding//src/main/java=UTF-8
encoding//src/main/resources=UTF-8
encoding//src/test/java=UTF-8
encoding//src/test/resources=UTF-8
encoding/<project>=UTF-8

View File

@ -0,0 +1,5 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.5

View File

@ -0,0 +1,4 @@
activeProfiles=
eclipse.preferences.version=1
resolveWorkspaceProjects=true
version=1

29
config/profile.xml Normal file
View File

@ -0,0 +1,29 @@
<?xml version="1.0" encoding="UTF-8"?>
<Resource>
<ID></ID>
<Type>Service</Type>
<Profile>
<Description>tabular-data-column-widget allows to perform operations on the columns of a tabular resource</Description>
<Class>PortletsUser</Class>
<Name>tabular-data-column-widget</Name>
<Version>1.0.0</Version>
<Packages>
<Software>
<Description>tabular-data-column-widget allows to perform operations on the columns of a tabular resource</Description>
<Name>tabular-data-column-widget</Name>
<Version>1.0.0-SNAPSHOT</Version>
<MavenCoordinates>
<groupId>org.gcube.portlets.user</groupId>
<artifactId>tabular-data-column-widget</artifactId>
<version>1.0.0-SNAPSHOT</version>
</MavenCoordinates>
<Type>library</Type>
<Files>
<File>tabular-data-column-widget-1.0.0-SNAPSHOT.jar</File>
</Files>
</Software>
</Packages>
</Profile>
</Resource>

0
distro/INSTALL Normal file
View File

6
distro/LICENSE Normal file
View File

@ -0,0 +1,6 @@
gCube System - License
------------------------------------------------------------
The gCube/gCore software is licensed as Free Open Source software conveying to the EUPL (http://ec.europa.eu/idabc/eupl).
The software and documentation is provided by its authors/distributors "as is" and no expressed or
implied warranty is given for its use, quality or fitness for a particular case.

1
distro/MAINTAINERS Normal file
View File

@ -0,0 +1 @@
Giancarlo Panichi (giancarlo.panichi@isti.cnr.it), CNR Pisa, Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo"

40
distro/README Normal file
View File

@ -0,0 +1,40 @@
The gCube System - tabular-data-column-widget
------------------------------------------------------------
This work has been supported by the following European projects: iMarine (FP7-INFRASTRUCTURES-2011-2)
Authors
-------
Giancarlo Panichi (giancarlo.panichi@isti.cnr.it), CNR Pisa,
Istituto di Scienza e Tecnologie dell'Informazione "A. Faedo"
Version and Release Date
------------------------
v. 1.0.0-SNAPSHOT (2013-10-18)
Description
-----------
tabular-data-column-widget allows to perform operations on the columns of a tabular resource
Download information
--------------------
Source code URL: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget
Documentation
-------------
tabular-data-column-widget allows to perform operations on the columns of a tabular resource
Licensing
---------
This software is licensed under the terms you may find in the file named "LICENSE" in this directory.

6
distro/changelog.xml Normal file
View File

@ -0,0 +1,6 @@
<ReleaseNotes>
<Changeset component="org.gcube.portlets.user.tabular-data-column-widget.1-0-0"
date="2013-12-18">
<Change>First Release</Change>
</Changeset>
</ReleaseNotes>

1
distro/svnpath.txt Normal file
View File

@ -0,0 +1 @@
https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-column-widget

View File

@ -0,0 +1,27 @@
package org.gcube.portlets.user.td.columnwidget.client;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import com.google.gwt.editor.client.Editor.Path;
import com.sencha.gxt.data.shared.LabelProvider;
import com.sencha.gxt.data.shared.ModelKeyProvider;
import com.sencha.gxt.data.shared.PropertyAccess;
public interface ColumnDataProperties extends
PropertyAccess<ColumnData> {
@Path("id")
ModelKeyProvider<ColumnData> id();
LabelProvider<ColumnData> label();
/*
ValueProvider<ColumnData, String> name();
ValueProvider<ColumnData, String> typeName();
ValueProvider<ColumnData, String> typeCode();
*/
}

View File

@ -0,0 +1,87 @@
package org.gcube.portlets.user.td.columnwidget.client;
import org.gcube.portlets.user.td.gwtservice.shared.tr.ColumnData;
import org.gcube.portlets.user.td.widgetcommonevent.shared.TRId;
import com.google.gwt.core.client.GWT;
import com.google.gwt.event.logical.shared.SelectionEvent;
import com.google.gwt.event.logical.shared.SelectionHandler;
import com.google.gwt.event.logical.shared.ValueChangeEvent;
import com.google.gwt.event.logical.shared.ValueChangeHandler;
import com.sencha.gxt.cell.core.client.form.ComboBoxCell.TriggerAction;
import com.sencha.gxt.data.shared.LabelProvider;
import com.sencha.gxt.data.shared.ListStore;
import com.sencha.gxt.widget.core.client.ContentPanel;
import com.sencha.gxt.widget.core.client.Dialog;
import com.sencha.gxt.widget.core.client.form.ComboBox;
import com.sencha.gxt.widget.core.client.info.Info;
public class RemoveColumnDialog extends Dialog {
public RemoveColumnDialog(TRId trId) {
create(trId, null);
}
public RemoveColumnDialog(TRId trId, String columnName) {
create(trId, columnName);
}
protected void create(TRId trId, String columnName) {
setBodyBorder(false);
// getHeader().setIcon(Resources.IMAGES.side_list());
setHeadingText("BorderLayout Dialog");
setWidth(400);
setHeight(225);
setHideOnButtonClick(true);
ContentPanel panel = new ContentPanel();
panel.setHeaderVisible(false);
ColumnDataProperties props = GWT.create(ColumnDataProperties.class);
ListStore<ColumnData> states = new ListStore<ColumnData>(props.id());
// states.addAll(TestData.getStates());
ComboBox<ColumnData> combo = new ComboBox<ColumnData>(states,
props.label());
addHandlersForEventObservation(combo, props.label());
combo.setEmptyText("Select a state...");
combo.setWidth(150);
combo.setTypeAhead(true);
combo.setTriggerAction(TriggerAction.ALL);
panel.add(combo);
//
add(panel);
}
private <T> void addHandlersForEventObservation(ComboBox<T> combo,
final LabelProvider<T> labelProvider) {
combo.addValueChangeHandler(new ValueChangeHandler<T>() {
public void onValueChange(ValueChangeEvent<T> event) {
Info.display(
"Value Changed",
"New value: "
+ (event.getValue() == null ? "nothing"
: labelProvider.getLabel(event
.getValue()) + "!"));
}
});
combo.addSelectionHandler(new SelectionHandler<T>() {
public void onSelection(SelectionEvent<T> event) {
Info.display(
"State Selected",
"You selected "
+ (event.getSelectedItem() == null ? "nothing"
: labelProvider.getLabel(event
.getSelectedItem()) + "!"));
}
});
}
}