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"/> <attribute name="maven.pomderived" value="true"/>
</attributes> </attributes>
</classpathentry> </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"> <classpathentry kind="con" path="org.eclipse.m2e.MAVEN2_CLASSPATH_CONTAINER">
<attributes> <attributes>
<attribute name="maven.pomderived" value="true"/> <attribute name="maven.pomderived" value="true"/>
<attribute name="org.eclipse.jst.component.nondependency" value=""/> <attribute name="org.eclipse.jst.component.nondependency" value=""/>
</attributes> </attributes>
</classpathentry> </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"/> <classpathentry kind="output" path="target/tabular-data-widgetx-1.0.0-SNAPSHOT/WEB-INF/classes"/>
</classpath> </classpath>

View File

@ -1,12 +1,12 @@
eclipse.preferences.version=1 eclipse.preferences.version=1
org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled 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.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.lineNumber=generate
org.eclipse.jdt.core.compiler.debug.localVariable=generate org.eclipse.jdt.core.compiler.debug.localVariable=generate
org.eclipse.jdt.core.compiler.debug.sourceFile=generate org.eclipse.jdt.core.compiler.debug.sourceFile=generate
org.eclipse.jdt.core.compiler.problem.assertIdentifier=error org.eclipse.jdt.core.compiler.problem.assertIdentifier=error
org.eclipse.jdt.core.compiler.problem.enumIdentifier=error org.eclipse.jdt.core.compiler.problem.enumIdentifier=error
org.eclipse.jdt.core.compiler.problem.forbiddenReference=warning 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() { eventBus.addHandler(OpenTableEvent.TYPE, new OpenTableEventHandler() {
@Override
public void onOpenTable(OpenTableEvent event) { public void onOpenTable(OpenTableEvent event) {
doOpenTable(event.getTableId()); doOpenTable(event.getTableId());
} }
}); });
eventBus.addHandler(CloseTableEvent.TYPE, new CloseTableEventHandler() { eventBus.addHandler(CloseTableEvent.TYPE, new CloseTableEventHandler() {
@Override
public void onCloseTable(CloseTableEvent event) { public void onCloseTable(CloseTableEvent event) {
doCloseTable(); doCloseTable();
} }
@ -63,14 +62,12 @@ public class TabularDataXController {
{ {
service.openTable(tdSessionId, tableId, new AsyncCallback<TableDefinition>() { service.openTable(tdSessionId, tableId, new AsyncCallback<TableDefinition>() {
@Override
public void onSuccess(TableDefinition result) { public void onSuccess(TableDefinition result) {
Log.trace("table definition: "+result); Log.trace("table definition: "+result);
currentTable = result; currentTable = result;
eventBus.fireEvent(new TableReadyEvent(result)); eventBus.fireEvent(new TableReadyEvent(result));
} }
@Override
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
eventBus.fireEvent(new FailureEvent(caught, "Tabledefinition loading failed.")); eventBus.fireEvent(new FailureEvent(caught, "Tabledefinition loading failed."));
} }
@ -81,12 +78,10 @@ public class TabularDataXController {
{ {
service.closeTable(tdSessionId, new AsyncCallback<Void>() { service.closeTable(tdSessionId, new AsyncCallback<Void>() {
@Override
public void onFailure(Throwable caught) { public void onFailure(Throwable caught) {
eventBus.fireEvent(new FailureEvent(caught, "Table closing failed.")); eventBus.fireEvent(new FailureEvent(caught, "Table closing failed."));
} }
@Override
public void onSuccess(Void result) { public void onSuccess(Void result) {
Log.trace("table closed"); Log.trace("table closed");
currentTable = null; currentTable = null;

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

@ -28,7 +28,6 @@ public class ColumnPositionComparator implements Comparator<ColumnDefinition> {
/** /**
* {@inheritDoc} * {@inheritDoc}
*/ */
@Override
public int compare(ColumnDefinition c1, ColumnDefinition c2) { public int compare(ColumnDefinition c1, ColumnDefinition c2) {
if (c1.getPosition() == c2.getPosition()) return 0; if (c1.getPosition() == c2.getPosition()) return 0;
if (noPositionLast && c1.getPosition()<0) return 1; 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); int col = grid.getColumnModel().indexOf(this);
ModelKeyProvider<M> kp = (ModelKeyProvider<M>) grid.getStore().getKeyProvider(); 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++) { for (int i = 0, len = grid.getStore().size(); i < len; i++) {
Element cell = grid.getView().getCell(i, col); Element cell = grid.getView().getCell(i, col);
if (cell != null) { if (cell != null) {
SafeHtmlBuilder sb = new SafeHtmlBuilder(); 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); getCell().render(new Context(i, col, kp.getKey(grid.getStore().get(i))), null, sb);
cell.getFirstChildElement().setInnerHTML(sb.toSafeHtml().asString()); cell.getFirstChildElement().setInnerHTML(sb.toSafeHtml().asString());
} }

View File

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

View File

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