Updated to JAVA 7

git-svn-id: https://svn.d4science.research-infrastructures.eu/gcube/trunk/portlets/user/tabular-data-widgetx@86986 82a268e6-3cf1-43bd-a215-b396298e98cf
This commit is contained in:
Giancarlo Panichi 2013-12-16 17:16:01 +00:00 committed by Giancarlo Panichi
parent 8fa6711976
commit e450922b7a
15 changed files with 28 additions and 34 deletions

View File

@ -17,16 +17,16 @@
<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"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes>
</classpathentry>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.6">
<attributes>
<attribute name="owner.project.facets" value="java"/>
</attributes>
</classpathentry>
<classpathentry kind="output" path="target/tabular-data-widgetx-1.0.0-SNAPSHOT/WEB-INF/classes"/>
</classpath>

View File

@ -1,12 +1,12 @@
eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.6
org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7
org.eclipse.jdt.core.compiler.codegen.unusedLocal=preserve
org.eclipse.jdt.core.compiler.compliance=1.6
org.eclipse.jdt.core.compiler.compliance=1.5
org.eclipse.jdt.core.compiler.debug.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning
org.eclipse.jdt.core.compiler.source=1.6
org.eclipse.jdt.core.compiler.source=1.5

View File

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?><project-modules id="moduleCoreId" project-version="1.5.0">
<wb-module deploy-name="tabular-data-widgetx">
<wb-resource deploy-path="/" source-path="/src/main/java"/>
<wb-resource deploy-path="/" source-path="/src/main/resources"/>
</wb-module>
</project-modules>

View File

@ -0,0 +1,5 @@
<?xml version="1.0" encoding="UTF-8"?>
<faceted-project>
<installed facet="jst.utility" version="1.0"/>
<installed facet="java" version="1.5"/>
</faceted-project>

View File

@ -45,14 +45,13 @@ public class TabularDataXController {
{
eventBus.addHandler(OpenTableEvent.TYPE, new OpenTableEventHandler() {
@Override
public void onOpenTable(OpenTableEvent event) {
doOpenTable(event.getTableId());
}
});
eventBus.addHandler(CloseTableEvent.TYPE, new CloseTableEventHandler() {
@Override
public void onCloseTable(CloseTableEvent event) {
doCloseTable();
}
@ -63,14 +62,12 @@ public class TabularDataXController {
{
service.openTable(tdSessionId, tableId, new AsyncCallback<TableDefinition>() {
@Override
public void onSuccess(TableDefinition result) {
Log.trace("table definition: "+result);
currentTable = result;
eventBus.fireEvent(new TableReadyEvent(result));
}
@Override
public void onFailure(Throwable caught) {
eventBus.fireEvent(new FailureEvent(caught, "Tabledefinition loading failed."));
}
@ -81,12 +78,10 @@ public class TabularDataXController {
{
service.closeTable(tdSessionId, new AsyncCallback<Void>() {
@Override
public void onFailure(Throwable caught) {
eventBus.fireEvent(new FailureEvent(caught, "Table closing failed."));
}
@Override
public void onSuccess(Void result) {
Log.trace("table closed");
currentTable = null;

View File

@ -194,7 +194,6 @@ public class TabularDataXGridPanel extends ContentPanel {
protected void bindEventBus() {
eventBus.addHandler(OpenTableEvent.TYPE, new OpenTableEventHandler() {
@Override
public void onOpenTable(OpenTableEvent event) {
doOpenTable();
}
@ -202,7 +201,6 @@ public class TabularDataXGridPanel extends ContentPanel {
eventBus.addHandler(TableReadyEvent.TYPE, new TableReadyEventHandler() {
@Override
public void onTableReady(TableReadyEvent event) {
doTableReady(event.getTableDefinition());
}
@ -210,7 +208,7 @@ public class TabularDataXGridPanel extends ContentPanel {
eventBus.addHandler(CloseTableEvent.TYPE, new CloseTableEventHandler() {
@Override
public void onCloseTable(CloseTableEvent event) {
doCloseTable();
}
@ -309,7 +307,7 @@ public class TabularDataXGridPanel extends ContentPanel {
Scheduler.get().scheduleDeferred(new ScheduledCommand() {
@Override
public void execute() {
container.forceLayout();
}

View File

@ -40,7 +40,6 @@ public class TabularDataGridViewConfig implements GridViewConfig<DataRow> {
/**
* {@inheritDoc}
*/
@Override
public String getColStyle(DataRow model, ValueProvider<? super DataRow, ?> valueProvider, int rowIndex, int colIndex) {
return "";
}
@ -48,7 +47,6 @@ public class TabularDataGridViewConfig implements GridViewConfig<DataRow> {
/**
* {@inheritDoc}
*/
@Override
public String getRowStyle(DataRow model, int rowIndex) {
row.setDataRow(model);
return rowStyleProvider.getRowStyle(row);

View File

@ -22,7 +22,7 @@ public class DataRowModelKeyProvider implements ModelKeyProvider<DataRow> {
this.key = key;
}
@Override
public String getKey(DataRow row) {
return String.valueOf(row.get(key));
}

View File

@ -39,7 +39,7 @@ public class DataRowPagingReader implements DataReader<PagingLoadResult<DataRow>
converter = new JSonValueConverter(definition.getColumnsAsList());
}
@Override
public PagingLoadResult<DataRow> read(Object loadConfig, String data) {
JSonTable jSonData = JSonTable.getJSonTable(data);
JsArray<JSonValue> array = jSonData.getRows(definition.getJsonRowsField());

View File

@ -37,7 +37,6 @@ public class DataRowReader implements DataReader<ListLoadResult<DataRow>, String
/**
* {@inheritDoc}
*/
@Override
public ListLoadResult<DataRow> read(Object loadConfig, String data) {
JSonTable jSonData = JSonTable.getJSonTable(data);
JsArray<JSonValue> array = jSonData.getRows(definition.getJsonRowsField());

View File

@ -27,7 +27,6 @@ public class DataRowValueProvider<V> implements ValueProvider<DataRow, V> {
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
@Override
public V getValue(DataRow row) {
return (V)row.get(key);
}
@ -35,7 +34,7 @@ public class DataRowValueProvider<V> implements ValueProvider<DataRow, V> {
/**
* {@inheritDoc}
*/
@Override
public void setValue(DataRow row, V value) {
row.set(key, value);
}
@ -43,7 +42,6 @@ public class DataRowValueProvider<V> implements ValueProvider<DataRow, V> {
/**
* {@inheritDoc}
*/
@Override
public String getPath() {
return key.getJSonIndex();
}

View File

@ -28,7 +28,6 @@ public class ColumnPositionComparator implements Comparator<ColumnDefinition> {
/**
* {@inheritDoc}
*/
@Override
public int compare(ColumnDefinition c1, ColumnDefinition c2) {
if (c1.getPosition() == c2.getPosition()) return 0;
if (noPositionLast && c1.getPosition()<0) return 1;

View File

@ -43,13 +43,13 @@ public class LiveRowNumberer<M> extends RowNumberer<M> {
int col = grid.getColumnModel().indexOf(this);
ModelKeyProvider<M> kp = (ModelKeyProvider<M>) grid.getStore().getKeyProvider();
int offset = getOffset();
//int offset = getOffset();
for (int i = 0, len = grid.getStore().size(); i < len; i++) {
Element cell = grid.getView().getCell(i, col);
if (cell != null) {
SafeHtmlBuilder sb = new SafeHtmlBuilder();
int index = offset + i;
//int index = offset + i;
getCell().render(new Context(i, col, kp.getKey(grid.getStore().get(i))), null, sb);
cell.getFirstChildElement().setInnerHTML(sb.toSafeHtml().asString());
}

View File

@ -19,7 +19,7 @@ public class PagingLoadUrlEncoder implements DataWriter<PagingLoadConfig, String
protected UrlBuilder urlBuilder = new UrlBuilder();
@Override
public String write(PagingLoadConfig config) {
System.out.println("Offset: "+config.getOffset());

View File

@ -39,7 +39,6 @@ public class TabularDataXServiceImpl extends RemoteServiceServlet implements Tab
/**
* {@inheritDoc}
*/
@Override
public TableDefinition openTable(int tdSessionId, TableId tableId) throws TabularDataXServiceException {
logger.debug("openTable tdSessionId: "+tdSessionId+" tableId: "+tableId);
@ -59,7 +58,6 @@ public class TabularDataXServiceImpl extends RemoteServiceServlet implements Tab
/**
* {@inheritDoc}
*/
@Override
public TableDefinition getCurrentTableDefinition(int tdSessionId) throws TabularDataXServiceException {
logger.debug("getCurrentTableDefinition tdSessionId: "+tdSessionId);
@ -75,7 +73,6 @@ public class TabularDataXServiceImpl extends RemoteServiceServlet implements Tab
/**
* {@inheritDoc}
*/
@Override
public TableDefinition getTableDefinition(TableId id) throws TabularDataXServiceException {
logger.debug("getTableDefinition TableId: "+id);
@ -92,7 +89,6 @@ public class TabularDataXServiceImpl extends RemoteServiceServlet implements Tab
/**
* {@inheritDoc}
*/
@Override
public void closeTable(int tdSessionId) throws TabularDataXServiceException {
try {
closeCurrentTable(tdSessionId, false);