parameterize - HENGSIN PLEASE REVIEW
This commit is contained in:
parent
b3b2ba9284
commit
591e2f7bfb
|
@ -1,4 +1,5 @@
|
|||
/******************************************************************************
|
||||
* Product: Adempiere ERP & CRM Smart Business Solution
|
||||
* Copyright (C) 2008 Low Heng Sin All Rights Reserved. *
|
||||
* This program is free software; you can redistribute it and/or modify it *
|
||||
* under the terms version 2 of the GNU General Public License as published *
|
||||
|
@ -31,15 +32,15 @@ import org.zkoss.zul.event.ListDataEvent;
|
|||
*/
|
||||
public class SimpleListModel extends AbstractListModel implements ListitemRenderer, ListitemRendererExt {
|
||||
|
||||
protected List list;
|
||||
protected List<Object> list;
|
||||
|
||||
private int[] maxLength;
|
||||
|
||||
public SimpleListModel() {
|
||||
this(new ArrayList());
|
||||
this(new ArrayList<Object>());
|
||||
}
|
||||
|
||||
public SimpleListModel(List list) {
|
||||
public SimpleListModel(List<Object> list) {
|
||||
this.list = list;
|
||||
}
|
||||
|
||||
|
@ -59,7 +60,7 @@ public class SimpleListModel extends AbstractListModel implements ListitemRender
|
|||
while (j > 0 && Character.isWhitespace(src.charAt(j - 1)))
|
||||
--j;
|
||||
return new StringBuffer(j + 3)
|
||||
.append(src.substring(0, j)).append("...");
|
||||
.append(src.substring(0, j)).append("...");
|
||||
}
|
||||
|
||||
public void render(Listitem item, Object data) throws Exception {
|
||||
|
@ -85,7 +86,7 @@ public class SimpleListModel extends AbstractListModel implements ListitemRender
|
|||
listCell.setTooltiptext(tooltip);
|
||||
}
|
||||
|
||||
private void renderCollection(Listitem item, Collection data) {
|
||||
private void renderCollection(Listitem item, Collection<Object> data) {
|
||||
int i = 0;
|
||||
for (Object col : data) {
|
||||
String value = (col != null ? col.toString() : "");
|
||||
|
|
Loading…
Reference in New Issue