IDEMPIERE-183 Fixed generic type warning

This commit is contained in:
Richard Morales 2012-12-04 11:24:23 -05:00
parent 7250ef3117
commit 529089a426
166 changed files with 424 additions and 418 deletions

View File

@ -378,9 +378,9 @@ public class InventoryCountCreate extends SvrProcess
*/
private String getSubCategoriesString(int productCategoryId, Vector<SimpleTreeNode> categories, int loopIndicatorId) throws AdempiereSystemError {
StringBuilder ret = new StringBuilder();
final Iterator iter = categories.iterator();
final Iterator<SimpleTreeNode> iter = categories.iterator();
while (iter.hasNext()) {
SimpleTreeNode node = (SimpleTreeNode) iter.next();
SimpleTreeNode node = iter.next();
if (node.getParentId() == productCategoryId) {
if (node.getNodeId() == loopIndicatorId) {
throw new AdempiereSystemError("The product category tree contains a loop on categoryId: " + loopIndicatorId);

View File

@ -762,9 +762,9 @@ public class M_PriceList_Create extends SvrProcess {
*/
private String getSubCategoriesString(int productCategoryId, Vector<SimpleTreeNode> categories, int loopIndicatorId) throws AdempiereSystemError {
StringBuilder ret = new StringBuilder();
final Iterator iter = categories.iterator();
final Iterator<SimpleTreeNode> iter = categories.iterator();
while (iter.hasNext()) {
SimpleTreeNode node = (SimpleTreeNode) iter.next();
SimpleTreeNode node = iter.next();
if (node.getParentId() == productCategoryId) {
if (node.getNodeId() == loopIndicatorId) {
throw new AdempiereSystemError("The product category tree contains a loop on categoryId: " + loopIndicatorId);

View File

@ -891,7 +891,7 @@ public class RequestEMailProcessor extends SvrProcess
// All
printOut("ALL HEADERs:");
Enumeration en = m.getAllHeaders();
Enumeration<?> en = m.getAllHeaders();
while (en.hasMoreElements())
{
Header hdr = (Header)en.nextElement();

View File

@ -44,7 +44,7 @@ public class EventManager implements IEventManager {
private final static Object mutex = new Object();
private Map<EventHandler, List<ServiceRegistration>> registrations = new HashMap<EventHandler, List<ServiceRegistration>>();
private Map<EventHandler, List<ServiceRegistration<?>>> registrations = new HashMap<EventHandler, List<ServiceRegistration<?>>>();
/**
* @param eventAdmin
@ -145,11 +145,11 @@ public class EventManager implements IEventManager {
d.put(EventConstants.EVENT_TOPIC, topics);
if (filter != null)
d.put(EventConstants.EVENT_FILTER, filter);
ServiceRegistration registration = bundleContext.registerService(EventHandler.class.getName(), eventHandler, d);
ServiceRegistration<?> registration = bundleContext.registerService(EventHandler.class.getName(), eventHandler, d);
synchronized(registrations) {
List<ServiceRegistration> list = registrations.get(eventHandler);
List<ServiceRegistration<?>> list = registrations.get(eventHandler);
if (list == null) {
list = new ArrayList<ServiceRegistration>();
list = new ArrayList<ServiceRegistration<?>>();
registrations.put(eventHandler, list);
}
list.add(registration);
@ -162,13 +162,13 @@ public class EventManager implements IEventManager {
*/
@Override
public boolean unregister(EventHandler eventHandler) {
List<ServiceRegistration> serviceRegistrations = null;
List<ServiceRegistration<?>> serviceRegistrations = null;
synchronized(registrations) {
serviceRegistrations = registrations.remove(eventHandler);
}
if (serviceRegistrations == null)
return false;
for (ServiceRegistration registration : serviceRegistrations)
for (ServiceRegistration<?> registration : serviceRegistrations)
registration.unregister();
return true;
}

View File

@ -314,7 +314,7 @@ public class GenerateModelJPA
boolean virtualColumn, boolean IsEncrypted)
{
// Clazz
Class clazz = DisplayType.getClass(displayType, true);
Class<?> clazz = DisplayType.getClass(displayType, true);
if (defaultValue == null)
defaultValue = "";
if (DisplayType.isLOB(displayType)) // No length check for LOBs

View File

@ -368,9 +368,9 @@ public abstract class Convert
Matcher m;
// for each iteration in the conversion map
Map convertMap = getConvertMap();
Map<String,String> convertMap = getConvertMap();
if (convertMap != null) {
Iterator iter = convertMap.keySet().iterator();
Iterator<?> iter = convertMap.keySet().iterator();
while (iter.hasNext()) {
// replace the key on convertmap (i.e.: number by numeric)
@ -413,7 +413,7 @@ public abstract class Convert
* Get convert map for use in sql convertion
* @return map
*/
protected Map getConvertMap() {
protected Map<String,String> getConvertMap() {
return null;
}

View File

@ -299,7 +299,7 @@ public abstract class Convert_SQL92 extends Convert {
} // dependency on first table
}
// remaining Tables
Iterator it = fromAlias.keySet().iterator();
Iterator<String> it = fromAlias.keySet().iterator();
while (it.hasNext())
{
Object alias = it.next();

View File

@ -281,7 +281,7 @@ public final class ImpFormatRow
{
if (methodStart != -1) // no class
{
Class cClass = Class.forName(callout.substring(0,methodStart));
Class<?> cClass = Class.forName(callout.substring(0,methodStart));
m_callout = (Callout)cClass.newInstance();
m_method = callout.substring(methodStart+1);
}

View File

@ -33,7 +33,7 @@ import org.compiere.util.TimeUtil;
* @author Jorg Janke
* @version $Id: MAssignmentSlot.java,v 1.2 2006/07/30 00:51:03 jjanke Exp $
*/
public class MAssignmentSlot implements Comparator
public class MAssignmentSlot implements Comparator<Object>
{
/**
* Comparator Constructor

View File

@ -117,7 +117,7 @@ import org.compiere.impexp.BankStatementLoaderInterface;
try
{
log.info( "MBankStatementLoader Class Name=" + getStmtLoaderClass());
Class bsrClass = Class.forName(getStmtLoaderClass());
Class<?> bsrClass = Class.forName(getStmtLoaderClass());
m_loader = (BankStatementLoaderInterface) bsrClass.newInstance();
}
catch(Exception e)

View File

@ -139,7 +139,7 @@ public class MBankStatementMatcher extends X_C_BankStatementMatcher
try
{
Class matcherClass = Class.forName(className);
Class<?> matcherClass = Class.forName(className);
m_matcher = (BankStatementMatcherInterface)matcherClass.newInstance();
m_matcherValid = Boolean.TRUE;
}

View File

@ -115,7 +115,7 @@ public class MIndex extends X_K_Index
* @return Hashtable with String
*
*/
public static Hashtable indexStringBuffer(StringBuffer thisText)
public static Hashtable<String,String> indexStringBuffer(StringBuffer thisText)
{
return indexString(thisText.toString());
}
@ -179,8 +179,8 @@ public class MIndex extends X_K_Index
int tableID, int recordID, int CMWebProjectID, Timestamp sourceUpdated)
{
if (thisText!=null) {
Hashtable keyHash = indexString(thisText);
for (Enumeration e=keyHash.keys(); e.hasMoreElements();) {
Hashtable<String,String> keyHash = indexString(thisText);
for (Enumeration<?> e=keyHash.keys(); e.hasMoreElements();) {
String name = (String)e.nextElement();
String value = (String)keyHash.get(name);
MIndex thisIndex = new MIndex(ctx, 0, trxName);

View File

@ -88,13 +88,13 @@ public class MIssue extends X_AD_Issue
@SuppressWarnings("unchecked")
public static MIssue create (Properties ctx, String hexInput)
{
HashMap hmIn = null;
HashMap<String,String> hmIn = null;
try // encode in report
{
byte[] byteArray = Secure.convertHexString(hexInput);
ByteArrayInputStream bIn = new ByteArrayInputStream(byteArray);
ObjectInputStream oIn = new ObjectInputStream(bIn);
hmIn = (HashMap)oIn.readObject();
hmIn = (HashMap<String,String>)oIn.readObject();
}
catch (Exception e)
@ -103,7 +103,7 @@ public class MIssue extends X_AD_Issue
return null;
}
MIssue issue = new MIssue(ctx, (HashMap<String,String>)hmIn);
MIssue issue = new MIssue(ctx, hmIn);
return issue;
} // create
@ -424,7 +424,7 @@ public class MIssue extends X_AD_Issue
if (getRecord_ID() == 1) // new
{
parameter.append("ISSUE=");
HashMap htOut = get_HashMap();
HashMap<String,String> htOut = get_HashMap();
try // deserializing in create
{
ByteArrayOutputStream bOut = new ByteArrayOutputStream();

View File

@ -36,7 +36,7 @@ public class MLookupCache
/** Static Logger */
private static CLogger s_log = CLogger.getCLogger(MLookupCache.class);
/** Static Lookup data with MLookupInfo -> HashMap */
private static CCache<String,HashMap> s_loadedLookups = new CCache<String,HashMap>(null, "MLookupCache", 50, false);
private static CCache<String,HashMap<Object,Object>> s_loadedLookups = new CCache<String,HashMap<Object,Object>>(null, "MLookupCache", 50, false);
/**
* MLookup Loader starts loading - ignore for now
@ -53,7 +53,7 @@ public class MLookupCache
* @param info
* @param lookup
*/
protected static void loadEnd (MLookupInfo info, HashMap lookup)
protected static void loadEnd (MLookupInfo info, HashMap<Object,Object> lookup)
{
if (info.IsValidated && lookup.size() > 0)
s_loadedLookups.put(getKey(info), lookup);
@ -92,7 +92,7 @@ public class MLookupCache
protected static boolean loadFromCache (MLookupInfo info, HashMap<Object,Object> lookupTarget)
{
String key = getKey(info);
HashMap cache = (HashMap)s_loadedLookups.get(key);
HashMap<Object,Object> cache = (HashMap<Object,Object>)s_loadedLookups.get(key);
if (cache == null)
return false;
// Nothing cached
@ -107,7 +107,7 @@ public class MLookupCache
// copy cache
// we can use iterator, as the lookup loading is complete (i.e. no additional entries)
Iterator iterator = cache.keySet().iterator();
Iterator<Object> iterator = cache.keySet().iterator();
while (iterator.hasNext())
{
Object cacheKey = iterator.next();
@ -129,7 +129,7 @@ public class MLookupCache
int startNo = s_loadedLookups.size();
// find keys of Lookups to delete
ArrayList<String> toDelete = new ArrayList<String>();
Iterator iterator = s_loadedLookups.keySet().iterator();
Iterator<String> iterator = s_loadedLookups.keySet().iterator();
while (iterator.hasNext())
{
String info = (String)iterator.next();

View File

@ -141,10 +141,10 @@ public final class MRegion extends X_C_Region
if (s_regions == null || s_regions.size() == 0)
loadAllRegions(ctx);
ArrayList<MRegion> list = new ArrayList<MRegion>();
Iterator it = s_regions.values().iterator();
Iterator<MRegion> it = s_regions.values().iterator();
while (it.hasNext())
{
MRegion r = (MRegion)it.next();
MRegion r = it.next();
if (r.getC_Country_ID() == C_Country_ID)
list.add(r);
}

View File

@ -26,7 +26,7 @@ import java.util.Properties;
* @version $Id: MRegistrationValue.java,v 1.2 2006/07/30 00:51:03 jjanke Exp $
*/
public class MRegistrationValue extends X_A_RegistrationValue
implements Comparable
implements Comparable<Object>
{
/**
*

View File

@ -139,7 +139,7 @@ public class MSLACriteria extends X_PA_SLA_Criteria
try
{
Class clazz = Class.forName(getClassname());
Class<?> clazz = Class.forName(getClassname());
SLACriteria retValue = (SLACriteria)clazz.newInstance();
return retValue;
}

View File

@ -158,7 +158,7 @@ public class MTemplate extends X_CM_Template
subTemplateNames.put (thisName, "0");
}
}
Enumeration thisEnum = subTemplateNames.keys ();
Enumeration<String> thisEnum = subTemplateNames.keys ();
while (thisEnum.hasMoreElements ())
{
String thisElement = thisEnum.nextElement ().toString ();

View File

@ -593,7 +593,7 @@ public class MTree extends MTree_Base
while (needsTrim)
{
needsTrim = false;
Enumeration en = m_root.preorderEnumeration();
Enumeration<?> en = m_root.preorderEnumeration();
while (m_root.getChildCount() > 0 && en.hasMoreElements())
{
MTreeNode nd = (MTreeNode)en.nextElement();
@ -611,7 +611,7 @@ public class MTree extends MTree_Base
*/
private void dumpTree()
{
Enumeration en = m_root.preorderEnumeration();
Enumeration<?> en = m_root.preorderEnumeration();
int count = 0;
while (en.hasMoreElements())
{

View File

@ -436,7 +436,7 @@ public final class MTreeNode extends DefaultMutableTreeNode
if (ID == m_lastID && m_lastNode != null)
return m_lastNode;
//
Enumeration en = preorderEnumeration();
Enumeration<?> en = preorderEnumeration();
while (en.hasMoreElements())
{
MTreeNode nd = (MTreeNode)en.nextElement();

View File

@ -218,7 +218,7 @@ public class ModelValidationEngine
{
for (int i = 0; i < m_validators.size(); i++)
{
ModelValidator validator = (ModelValidator)m_validators.get(i);
ModelValidator validator = m_validators.get(i);
if (AD_Client_ID == validator.getAD_Client_ID()
|| m_globalValidators.contains(validator))
{
@ -294,7 +294,7 @@ public class ModelValidationEngine
m_globalValidators.contains(listener)
? tableName + "*"
: tableName + listener.getAD_Client_ID();
ArrayList<ModelValidator> list = (ArrayList<ModelValidator>)m_modelChangeListeners.get(propertyName);
ArrayList<ModelValidator> list = m_modelChangeListeners.get(propertyName);
if (list == null)
{
list = new ArrayList<ModelValidator>();
@ -456,7 +456,7 @@ public class ModelValidationEngine
m_globalValidators.contains(listener)
? tableName + "*"
: tableName + listener.getAD_Client_ID();
ArrayList<ModelValidator> list = (ArrayList<ModelValidator>)m_docValidateListeners.get(propertyName);
ArrayList<ModelValidator> list = m_docValidateListeners.get(propertyName);
if (list == null)
{
list = new ArrayList<ModelValidator>();
@ -621,7 +621,7 @@ public class ModelValidationEngine
m_globalValidators.contains(listener)
? tableName + "*"
: tableName + listener.getAD_Client_ID();
ArrayList<FactsValidator> list = (ArrayList<FactsValidator>)m_factsValidateListeners.get(propertyName);
ArrayList<FactsValidator> list = m_factsValidateListeners.get(propertyName);
if (list == null)
{
list = new ArrayList<FactsValidator>();
@ -640,7 +640,7 @@ public class ModelValidationEngine
public void addImportValidate (String importTableName, ImportValidator listener)
{
String propertyName = importTableName + "*";
ArrayList<ImportValidator> list = (ArrayList<ImportValidator>)m_impValidateListeners.get(propertyName);
ArrayList<ImportValidator> list = m_impValidateListeners.get(propertyName);
if (list == null)
{
list = new ArrayList<ImportValidator>();
@ -689,7 +689,7 @@ public class ModelValidationEngine
return null;
String propertyName = po.get_TableName() + "*";
ArrayList<FactsValidator> list = (ArrayList<FactsValidator>)m_factsValidateListeners.get(propertyName);
ArrayList<FactsValidator> list = m_factsValidateListeners.get(propertyName);
if (list != null)
{
//ad_entitytype.modelvalidationclasses
@ -699,7 +699,7 @@ public class ModelValidationEngine
}
propertyName = po.get_TableName() + po.getAD_Client_ID();
list = (ArrayList<FactsValidator>)m_factsValidateListeners.get(propertyName);
list = m_factsValidateListeners.get(propertyName);
if (list != null)
{
//ad_client.modelvalidationclasses
@ -770,7 +770,7 @@ public class ModelValidationEngine
return;
String propertyName = process.getImportTableName() + "*";
ArrayList<ImportValidator> list = (ArrayList<ImportValidator>)m_impValidateListeners.get(propertyName);
ArrayList<ImportValidator> list = m_impValidateListeners.get(propertyName);
if (list != null)
{
for (ImportValidator validator : list)
@ -862,7 +862,7 @@ public class ModelValidationEngine
int AD_Client_ID = Env.getAD_Client_ID(ctx);
for (int i = 0; i < m_validators.size(); i++)
{
ModelValidator validator = (ModelValidator)m_validators.get(i);
ModelValidator validator = m_validators.get(i);
if (AD_Client_ID == validator.getAD_Client_ID()
|| m_globalValidators.contains(validator))
{
@ -885,7 +885,7 @@ public class ModelValidationEngine
//osgi event handlers
@SuppressWarnings("rawtypes")
Event event = new Event(IEventTopics.PREF_AFTER_LOAD, (Map)null);
Event event = new Event(IEventTopics.PREF_AFTER_LOAD, (Map<String, ?>)null);
EventManager.getInstance().sendEvent(event);
}
@ -897,7 +897,7 @@ public class ModelValidationEngine
int AD_Client_ID = Env.getAD_Client_ID(Env.getCtx());
for (int i = 0; i < m_validators.size(); i++)
{
ModelValidator validator = (ModelValidator)m_validators.get(i);
ModelValidator validator = m_validators.get(i);
if (AD_Client_ID == validator.getAD_Client_ID()
|| m_globalValidators.contains(validator))
{

View File

@ -183,7 +183,7 @@ public final class MultiMap<K,V> implements Map<K,V>, Serializable
* Put all
* @param t
*/
public void putAll(Map t)
public void putAll(Map<? extends K,? extends V> t)
{
throw new java.lang.UnsupportedOperationException("Method putAll() not implemented.");
} // putAll

View File

@ -280,7 +280,7 @@ public final class NaturalAccountMap<K,V> extends CCache<K,V>
public boolean saveAccounts (int AD_Client_ID, int AD_Org_ID, int C_Element_ID)
{
log.config("");
Iterator iterator = this.values().iterator();
Iterator<?> iterator = this.values().iterator();
while (iterator.hasNext())
{
MElementValue na = (MElementValue)iterator.next();

View File

@ -433,7 +433,7 @@ public class ScheduleUtil
}
// Create xy Matrix
ArrayList[][] matrix = new ArrayList[maxXslots][maxYslots];
ArrayList<Object>[][] matrix = new ArrayList[maxXslots][maxYslots];
// Populate Matrix first column
for (int y = 0; y < maxYslots; y++)
{

View File

@ -159,7 +159,7 @@ public class VO
*/
public void putAll (Map t)
{
Iterator it = t.keySet().iterator();
Iterator<?> it = t.keySet().iterator();
while (it.hasNext())
{
Object key = it.next();
@ -191,7 +191,7 @@ public class VO
* Get Values
* @return values as collection
*/
public Collection values ()
public Collection<?> values ()
{
return m_values;
} // values

View File

@ -176,8 +176,8 @@ public class MPrintFont extends X_AD_PrintFont
System.out.println("Style=" + font.getStyle());
System.out.println("Size=" + font.getSize());
System.out.println("Attributes:");
Map map = font.getAttributes();
Iterator keys = map.keySet().iterator();
Map<?,?> map = font.getAttributes();
Iterator<?> keys = map.keySet().iterator();
while (keys.hasNext())
{
Object key = keys.next();

View File

@ -154,7 +154,7 @@ public class PrintDataGroup
public char[] getFunctions(String columnName)
{
ArrayList<String> list = new ArrayList<String>(); // the final function List
Iterator it = m_groupFunction.keySet().iterator();
Iterator<String> it = m_groupFunction.keySet().iterator();
while(it.hasNext())
{
String group_function = (String)it.next(); // =TOTAL=~LoadSeq
@ -280,7 +280,7 @@ public class PrintDataGroup
}
if (withData)
{
Iterator it = m_groupMap.keySet().iterator();
Iterator<String> it = m_groupMap.keySet().iterator();
while(it.hasNext())
{
Object key = it.next();
@ -297,7 +297,7 @@ public class PrintDataGroup
}
if (withData)
{
Iterator it = m_groupFunction.keySet().iterator();
Iterator<String> it = m_groupFunction.keySet().iterator();
while(it.hasNext())
{
Object key = it.next();

View File

@ -412,7 +412,7 @@ public class PrintUtil
for (int j = 0; j < dfs.length; j++)
System.out.println(" -> " + dfs[j]);
// Attribute
Class[] attCat = pss[i].getSupportedAttributeCategories();
Class<?>[] attCat = pss[i].getSupportedAttributeCategories();
System.out.println(" - Supported Attribute Categories");
for (int j = 0; j < attCat.length; j++)
System.out.println(" -> " + attCat[j].getName()
@ -517,7 +517,7 @@ public class PrintUtil
{
System.out.println("----");
System.out.println(ps);
Class[] cat = ps.getSupportedAttributeCategories();
Class<?>[] cat = ps.getSupportedAttributeCategories();
for (int j = 0; j < cat.length; j++)
{
System.out.println("- " + cat[j]);

View File

@ -233,7 +233,7 @@ public class MReportTree
if (node != null && node.isSummary ())
{
Enumeration<MTreeNode> en = node.preorderEnumeration ();
Enumeration<MTreeNode> en = (Enumeration<MTreeNode>)node.preorderEnumeration ();
StringBuffer sb = new StringBuffer ();
while (en.hasMoreElements ())
{
@ -278,7 +278,7 @@ public class MReportTree
//
if (node != null && node.isSummary())
{
Enumeration en = node.preorderEnumeration();
Enumeration<?> en = node.preorderEnumeration();
while (en.hasMoreElements())
{
MTreeNode nn = (MTreeNode)en.nextElement();

View File

@ -96,7 +96,7 @@ public class CLogger extends Logger implements Serializable
* @param clazz class name
* @return Logger
*/
public static CLogger getCLogger (Class clazz)
public static CLogger getCLogger (Class<?> clazz)
{
if (clazz == null)
return get();

View File

@ -235,7 +235,7 @@ public class CacheMgt
CacheInterface stored = (CacheInterface)m_instances.get(i);
if (stored != null && stored instanceof CCache)
{
CCache cc = (CCache)stored;
CCache<?, ?> cc = (CCache<?, ?>)stored;
if (cc.getTableName() != null && cc.getTableName().startsWith(tableName)) // reset lines/dependent too
{
{
@ -266,7 +266,7 @@ public class CacheMgt
{
log.fine(stored.toString());
if (stored instanceof CCache)
total += ((CCache)stored).sizeNoExpire();
total += ((CCache<?, ?>)stored).sizeNoExpire();
else
total += stored.size();
}

View File

@ -460,7 +460,7 @@ public final class DisplayType
* @param yesNoAsBoolean - yes or no as boolean
* @return class Integer - BigDecimal - Timestamp - String - Boolean
*/
public static Class getClass (int displayType, boolean yesNoAsBoolean)
public static Class<?> getClass (int displayType, boolean yesNoAsBoolean)
{
if (isText(displayType) || displayType == List || displayType == Payment)
return String.class;

View File

@ -35,7 +35,7 @@ import java.util.Comparator;
* @author Jorg Janke
* @version $Id: MSort.java,v 1.3 2006/10/06 00:43:09 jjanke Exp $
*/
public final class MSort implements Comparator, Serializable
public final class MSort implements Comparator<Object>, Serializable
{
/**
*

View File

@ -25,7 +25,7 @@ import java.util.Comparator;
* @author Jorg Janke
* @version $Id: NamePair.java,v 1.3 2006/07/30 00:52:23 jjanke Exp $
*/
public abstract class NamePair implements Comparator<Object>, Serializable, Comparable
public abstract class NamePair implements Comparator<Object>, Serializable, Comparable<Object>
{
/**
*

View File

@ -188,7 +188,7 @@ public class SecureEngine
Exception cause = null;
try
{
Class clazz = Class.forName(realClass);
Class<?> clazz = Class.forName(realClass);
implementation = (SecureInterface)clazz.newInstance();
}
catch (Exception e)

View File

@ -389,7 +389,7 @@ public class Util
AttributedCharacterIterator.Attribute[] relevantAttributes)
{
AttributedCharacterIterator iter = aString.getIterator();
Set set = iter.getAllAttributeKeys();
Set<?> set = iter.getAllAttributeKeys();
// System.out.println("AllAttributeKeys=" + set);
if (set.size() == 0)
return iter;
@ -407,10 +407,10 @@ public class Util
aString = new AttributedString(sb.toString());
// copy relevant attributes
Iterator it = iter.getAllAttributeKeys().iterator();
Iterator<AttributedCharacterIterator.Attribute> it = iter.getAllAttributeKeys().iterator();
while (it.hasNext())
{
AttributedCharacterIterator.Attribute att = (AttributedCharacterIterator.Attribute)it.next();
AttributedCharacterIterator.Attribute att = it.next();
if (!unwanted.contains(att))
{
for (char c = iter.first(); c != AttributedCharacterIterator.DONE; c = iter.next())
@ -437,10 +437,10 @@ public class Util
* Dump a Map (key=value) to out
* @param map Map
*/
static public void dump (Map map)
static public void dump (Map<Object,Object> map)
{
System.out.println("Dump Map - size=" + map.size());
Iterator it = map.keySet().iterator();
Iterator<Object> it = map.keySet().iterator();
while (it.hasNext())
{
Object key = it.next();

View File

@ -115,12 +115,12 @@ public class WebEnv
return true;
}
Enumeration en = config.getInitParameterNames();
Enumeration<String> en = config.getInitParameterNames();
StringBuffer info = new StringBuffer("Servlet Init Parameter: ")
.append(config.getServletName());
while (en.hasMoreElements())
{
String name = en.nextElement().toString();
String name = en.nextElement();
String value = config.getInitParameter(name);
System.setProperty(name, value);
info.append("\n").append(name).append("=").append(value);
@ -148,12 +148,12 @@ public class WebEnv
}
// Load Environment Variables (serverApps/src/web/WEB-INF/web.xml)
Enumeration en = context.getInitParameterNames();
Enumeration<String> en = context.getInitParameterNames();
StringBuffer info = new StringBuffer("Servlet Context Init Parameters: ")
.append(context.getServletContextName());
while (en.hasMoreElements())
{
String name = en.nextElement().toString();
String name = en.nextElement();
String value = context.getInitParameter(name);
System.setProperty(name, value);
info.append("\n").append(name).append("=").append(value);
@ -308,13 +308,13 @@ public class WebEnv
if (!CLogMgt.isLevelFiner())
return;
boolean first = true;
Enumeration e = config.getInitParameterNames();
Enumeration<String> e = config.getInitParameterNames();
while (e.hasMoreElements())
{
if (first)
log.finer("InitParameter:");
first = false;
String key = (String)e.nextElement();
String key = e.nextElement();
Object value = config.getInitParameter(key);
log.finer("- " + key + " = " + value);
}
@ -331,13 +331,13 @@ public class WebEnv
if (!CLogMgt.isLevelFiner())
return;
boolean first = true;
Enumeration e = ctx.getInitParameterNames();
Enumeration<String> e = ctx.getInitParameterNames();
while (e.hasMoreElements())
{
if (first)
log.finer("InitParameter:");
first = false;
String key = (String)e.nextElement();
String key = e.nextElement();
Object value = ctx.getInitParameter(key);
log.finer("- " + key + " = " + value);
}
@ -348,7 +348,7 @@ public class WebEnv
if (first)
log.finer("Attributes:");
first = false;
String key = (String)e.nextElement();
String key = e.nextElement();
Object value = ctx.getAttribute(key);
log.finer("- " + key + " = " + value);
}
@ -365,13 +365,13 @@ public class WebEnv
if (!CLogMgt.isLevelFiner())
return;
boolean first = true;
Enumeration e = session.getAttributeNames();
Enumeration<String> e = session.getAttributeNames();
while (e.hasMoreElements())
{
if (first)
log.finer("Attributes:");
first = false;
String key = (String)e.nextElement();
String key = e.nextElement();
Object value = session.getAttribute(key);
log.finer("- " + key + " = " + value);
}
@ -400,7 +400,7 @@ public class WebEnv
log.finer("- UserPrincipal=" + request.getUserPrincipal());
//
boolean first = true;
Enumeration e = request.getHeaderNames();
Enumeration<?> e = request.getHeaderNames();
/** Header Names */
while (e.hasMoreElements())
{
@ -527,7 +527,7 @@ public class WebEnv
{
table table = new table();
table.setID("DEBUG");
Enumeration e;
Enumeration<?> e;
tr space = new tr().addElement(new td().addElement("."));
// Request Info

View File

@ -116,7 +116,7 @@ public class WebSessionCtx implements Serializable
// Add Servlet Init Parameters (webStore/src/web/WEB-INF/web.xml)
ServletContext sc = session.getServletContext();
Enumeration en = sc.getInitParameterNames();
Enumeration<String> en = sc.getInitParameterNames();
while (en.hasMoreElements())
{
String key = (String)en.nextElement();
@ -151,7 +151,7 @@ public class WebSessionCtx implements Serializable
// Add Servlet Init Parameters (webStore/src/web/WEB-INF/web.xml)
ServletContext sc = session.getServletContext();
Enumeration en = sc.getInitParameterNames();
Enumeration<String> en = sc.getInitParameterNames();
while (en.hasMoreElements())
{
String key = (String)en.nextElement();
@ -275,7 +275,7 @@ public class WebSessionCtx implements Serializable
log.info(wstore.getWebContext());
newCtx = new Properties();
// copy explicitly
Enumeration e = ctx.keys();
Enumeration<?> e = ctx.keys();
while (e.hasMoreElements())
{
String pKey = (String)e.nextElement();
@ -351,7 +351,7 @@ public class WebSessionCtx implements Serializable
s_cacheCtx.put(key, newCtx);
}
// return new Properties (pp); seems not to work with JSP
Enumeration e = newCtx.keys();
Enumeration<?> e = newCtx.keys();
while (e.hasMoreElements())
{
String pKey = (String)e.nextElement();

View File

@ -193,7 +193,7 @@ public class ZipUtil
* Get ZipEntries as Enumeration
* @return entries
*/
public Enumeration entries()
public Enumeration<?> entries()
{
if (!isOpen())
return null;
@ -277,7 +277,7 @@ public class ZipUtil
ZipEntry retValue = zu.getEntry(entryName);
if (retValue == null)
{
Enumeration e = zu.entries();
Enumeration<?> e = zu.entries();
while (e.hasMoreElements())
{
ZipEntry entry = (ZipEntry)e.nextElement();

View File

@ -240,7 +240,7 @@ public class ImportInventoryMove extends SvrProcess
{
final StringBuffer whereClause = new StringBuffer();
ArrayList<Object> parameters = new ArrayList();
ArrayList<Object> parameters = new ArrayList<Object>();
MColumn[] cols = getMInventoryMoveColumns();

View File

@ -110,7 +110,7 @@ public class ALayout implements LayoutManager2
{
if (!m_data.containsValue(comp))
return;
Iterator it = m_data.keySet().iterator();
Iterator<Object> it = m_data.keySet().iterator();
while (it.hasNext())
{
Object key = it.next();

View File

@ -87,7 +87,7 @@ class ALayoutCollection extends HashMap<Object,Object>
{
int maxRow = -1;
//
Iterator i = keySet().iterator();
Iterator<Object> i = keySet().iterator();
while (i.hasNext())
{
ALayoutConstraint c = (ALayoutConstraint)i.next();
@ -104,7 +104,7 @@ class ALayoutCollection extends HashMap<Object,Object>
{
int maxCol = -1;
//
Iterator i = keySet().iterator();
Iterator<Object> i = keySet().iterator();
while (i.hasNext())
{
ALayoutConstraint c = (ALayoutConstraint)i.next();
@ -122,7 +122,7 @@ class ALayoutCollection extends HashMap<Object,Object>
{
int maxCol = -1;
//
Iterator i = keySet().iterator();
Iterator<Object> i = keySet().iterator();
while (i.hasNext())
{
ALayoutConstraint c = (ALayoutConstraint)i.next();

View File

@ -23,7 +23,7 @@ package org.compiere.install.util;
* @author Jorg Janke
* @version $Id: ALayoutConstraint.java,v 1.2 2006/07/30 00:51:27 jjanke Exp $
*/
public class ALayoutConstraint implements Comparable
public class ALayoutConstraint implements Comparable<Object>
{
/**
* Layout Constraint to indicate grid position

View File

@ -168,7 +168,7 @@ public class ExportHelper {
String javaClass = expProcessor_Type.getJavaClass();
try {
Class clazz = Class.forName(javaClass);
Class<?> clazz = Class.forName(javaClass);
IExportProcessor exportProcessor = (IExportProcessor)clazz.newInstance();
exportProcessor.process(po.getCtx(), mExportProcessor, outDocument, Trx.get( po.get_TrxName(), false ));

View File

@ -597,7 +597,7 @@ public class EMailProcessor
// All
printOut("ALL HEADERs:");
Enumeration en = m.getAllHeaders();
Enumeration<?> en = m.getAllHeaders();
while (en.hasMoreElements())
{
Header hdr = (Header)en.nextElement();

View File

@ -153,7 +153,7 @@ public class AdempiereLookAndFeel extends com.jgoodies.looks.plastic.Plastic3DLo
table.put("ComboBox.listBackground", c);
// globalqss
Class lf = com.jgoodies.looks.plastic.PlasticLookAndFeel.class;
Class<PlasticLookAndFeel> lf = com.jgoodies.looks.plastic.PlasticLookAndFeel.class;
table.put("Tree.openIcon", makeIcon(lf, "icons/TreeOpen.gif"));
table.put("Tree.closedIcon", makeIcon(lf, "icons/TreeClosed.gif"));
table.put("Tree.leafIcon", makeIcon(lf, "icons/TreeLeaf.gif"));

View File

@ -110,7 +110,7 @@ public class ALayout implements LayoutManager2
{
if (!m_data.containsValue(comp))
return;
Iterator it = m_data.keySet().iterator();
Iterator<Object> it = m_data.keySet().iterator();
while (it.hasNext())
{
Object key = it.next();

View File

@ -87,7 +87,7 @@ class ALayoutCollection extends HashMap<Object,Object>
{
int maxRow = -1;
//
Iterator i = keySet().iterator();
Iterator<Object> i = keySet().iterator();
while (i.hasNext())
{
ALayoutConstraint c = (ALayoutConstraint)i.next();
@ -104,7 +104,7 @@ class ALayoutCollection extends HashMap<Object,Object>
{
int maxCol = -1;
//
Iterator i = keySet().iterator();
Iterator<Object> i = keySet().iterator();
while (i.hasNext())
{
ALayoutConstraint c = (ALayoutConstraint)i.next();
@ -122,7 +122,7 @@ class ALayoutCollection extends HashMap<Object,Object>
{
int maxCol = -1;
//
Iterator i = keySet().iterator();
Iterator<Object> i = keySet().iterator();
while (i.hasNext())
{
ALayoutConstraint c = (ALayoutConstraint)i.next();

View File

@ -23,7 +23,7 @@ package org.compiere.apps;
* @author Jorg Janke
* @version $Id: ALayoutConstraint.java,v 1.2 2006/07/30 00:51:27 jjanke Exp $
*/
public class ALayoutConstraint implements Comparable
public class ALayoutConstraint implements Comparable<Object>
{
/**
* Layout Constraint to indicate grid position

View File

@ -109,13 +109,13 @@ public class InfoInOut extends Info
} // InfoInOut
/** String Array of Column Info */
private Info_Column[] m_generalLayout;
//private Info_Column[] m_generalLayout;
/** list of query columns */
private ArrayList m_queryColumns = new ArrayList();
//private ArrayList m_queryColumns = new ArrayList();
/** Table Name */
private String m_tableName;
//private String m_tableName;
/** Key Column Name */
private String m_keyColumn;
//private String m_keyColumn;
// Static Info
private CLabel lDocumentNo = new CLabel(Msg.translate(Env.getCtx(), "DocumentNo"));

View File

@ -254,8 +254,8 @@ public class ResultTable extends JTable implements MouseListener
// Sort the data list - teo_sarca [ 1734327 ]
Collections.sort(model.getDataList(), new Comparator<Object>() {
public int compare(Object o1, Object o2) {
Object item1 = ((ArrayList)o1).get(modelColumnIndex);
Object item2 = ((ArrayList)o2).get(modelColumnIndex);
Object item1 = ((ArrayList<?>)o1).get(modelColumnIndex);
Object item2 = ((ArrayList<?>)o2).get(modelColumnIndex);
return sort.compare(item1, item2);
}
});

View File

@ -31,7 +31,7 @@ public class DelegatingServlet extends HttpServlet {
return delegate.getInitParameter(name);
}
public Enumeration getInitParameterNames() {
public Enumeration<String> getInitParameterNames() {
return delegate.getInitParameterNames();
}

View File

@ -54,7 +54,7 @@ import org.zkoss.zul.Vbox;
* @author Jorg Janke
* @version $Id: ValuePreference.java,v 1.2 2006/07/30 00:51:28 jjanke Exp $
*/
public class ValuePreference extends Window implements EventListener
public class ValuePreference extends Window implements EventListener<Event>
{
/**
*

View File

@ -28,7 +28,7 @@ import org.zkoss.zul.Menupopup;
* @author Jorg Janke
* @version $Id: AArchive.java,v 1.2 2006/07/30 00:51:27 jjanke Exp $
*/
public class WArchive implements EventListener
public class WArchive implements EventListener<Event>
{
/**
* Constructor

View File

@ -71,7 +71,7 @@ public class WZoomAcross
+ zoomInfo.query.getRecordCount() + ")";
final Menuitem menuItem = new Menuitem(label);
menuItem.addEventListener(Events.ON_CLICK, new EventListener() {
menuItem.addEventListener(Events.ON_CLICK, new EventListener<Event>() {
@Override
public void onEvent(Event event) throws Exception {
launchZoom(zoomInfo);

View File

@ -90,7 +90,7 @@ import org.zkoss.zul.Separator;
* @author Low Heng Sin
*/
public class WAcctViewer extends Window implements EventListener
public class WAcctViewer extends Window implements EventListener<Event>
{
private static final String TITLE = "Posting";

View File

@ -263,7 +263,7 @@ public class ADSortTab extends Panel implements IADTabpanel
yesList.setVflex(true);
noList.setVflex(true);
EventListener mouseListener = new EventListener()
EventListener<Event> mouseListener = new EventListener<Event>()
{
public void onEvent(Event event) throws Exception
@ -277,7 +277,7 @@ public class ADSortTab extends Panel implements IADTabpanel
yesList.addDoubleClickListener(mouseListener);
noList.addDoubleClickListener(mouseListener);
//
EventListener actionListener = new EventListener()
EventListener<Event> actionListener = new EventListener<Event>()
{
public void onEvent(Event event) throws Exception {
migrateValueAcrossLists(event);
@ -292,13 +292,13 @@ public class ADSortTab extends Panel implements IADTabpanel
bRemove.setImage("images/Previous24.png");
bRemove.addEventListener(Events.ON_CLICK, actionListener);
EventListener crossListMouseListener = new DragListener();
EventListener<Event> crossListMouseListener = new DragListener();
yesList.addOnDropListener(crossListMouseListener);
noList.addOnDropListener(crossListMouseListener);
yesList.setItemDraggable(true);
noList.setItemDraggable(true);
actionListener = new EventListener()
actionListener = new EventListener<Event>()
{
public void onEvent(Event event) throws Exception {
migrateValueWithinYesList(event);
@ -311,7 +311,7 @@ public class ADSortTab extends Panel implements IADTabpanel
bDown.setImage("images/Detail24.png");
bDown.addEventListener(Events.ON_CLICK, actionListener);
EventListener yesListMouseMotionListener = new EventListener()
EventListener<Event> yesListMouseMotionListener = new EventListener<Event>()
{
public void onEvent(Event event) throws Exception {
if (event instanceof DropEvent)
@ -525,7 +525,7 @@ public class ADSortTab extends Panel implements IADTabpanel
SimpleListModel lmFrom = (source == bAdd || source == noList) ?
noModel : yesModel;
SimpleListModel lmTo = (lmFrom == yesModel) ? noModel : yesModel;
Set selectedItems = listFrom.getSelectedItems();
Set<?> selectedItems = listFrom.getSelectedItems();
List<ListElement> selObjects = new ArrayList<ListElement>();
for (Object obj : selectedItems) {
ListItem listItem = (ListItem) obj;
@ -795,7 +795,7 @@ public class ADSortTab extends Panel implements IADTabpanel
* @author eslatis
*
*/
private class DragListener implements EventListener
private class DragListener implements EventListener<Event>
{
/**

View File

@ -930,7 +930,7 @@ DataStatusListener, IADTabpanel
}
else if (treePanel != null && event.getTarget() == treePanel.getTree()) {
Treeitem item = treePanel.getTree().getSelectedItem();
navigateTo((DefaultTreeNode)item.getValue());
navigateTo((DefaultTreeNode<MTreeNode>)item.getValue());
}
else if (ON_DEFER_SET_SELECTED_NODE.equals(event.getName())) {
if (gridTab.getRecord_ID() > 0 && gridTab.isTreeTab() && treePanel != null) {
@ -942,8 +942,8 @@ DataStatusListener, IADTabpanel
}
}
private void navigateTo(DefaultTreeNode value) {
MTreeNode treeNode = (MTreeNode) value.getData();
private void navigateTo(DefaultTreeNode<MTreeNode> value) {
MTreeNode treeNode = value.getData();
// We Have a TreeNode
int nodeID = treeNode.getNode_ID();
// root of tree selected - ignore
@ -999,7 +999,7 @@ DataStatusListener, IADTabpanel
ArrayList<GridField> list = gridTab.getDependantFields(mField.getColumnName());
for (int i = 0; i < list.size(); i++)
{
GridField dependentField = (GridField)list.get(i);
GridField dependentField = list.get(i);
// log.trace(log.l5_DData, "Dependent Field", dependentField==null ? "null" : dependentField.getColumnName());
// if the field has a lookup
if (dependentField != null && dependentField.getLookup() instanceof MLookup)
@ -1044,7 +1044,7 @@ DataStatusListener, IADTabpanel
SimpleTreeModel model = (SimpleTreeModel) treePanel.getTree().getModel();
if (treePanel.getTree().getSelectedItem() != null) {
DefaultTreeNode treeNode = (DefaultTreeNode) treePanel.getTree().getSelectedItem().getValue();
DefaultTreeNode<Object> treeNode = (DefaultTreeNode<Object>) treePanel.getTree().getSelectedItem().getValue();
MTreeNode data = (MTreeNode) treeNode.getData();
if (data.getNode_ID() == recordId) {
model.removeNode(treeNode);
@ -1052,7 +1052,7 @@ DataStatusListener, IADTabpanel
}
}
DefaultTreeNode treeNode = model.find(null, recordId);
DefaultTreeNode<Object> treeNode = model.find(null, recordId);
if (treeNode != null) {
model.removeNode(treeNode);
}
@ -1066,11 +1066,11 @@ DataStatusListener, IADTabpanel
String imageIndicator = (String)gridTab.getValue("Action"); // Menu - Action
//
SimpleTreeModel model = (SimpleTreeModel) treePanel.getTree().getModel();
DefaultTreeNode treeNode = model.getRoot();
DefaultTreeNode<Object> treeNode = model.getRoot();
MTreeNode root = (MTreeNode) treeNode.getData();
MTreeNode node = new MTreeNode (gridTab.getRecord_ID(), 0, name, description,
root.getNode_ID(), summary, imageIndicator, false, null);
DefaultTreeNode newNode = new DefaultTreeNode(node);
DefaultTreeNode<Object> newNode = new DefaultTreeNode<Object>(node);
model.addNode(newNode);
int[] path = model.getPath(newNode);
Treeitem ti = treePanel.getTree().renderItemByPath(path);
@ -1088,7 +1088,7 @@ DataStatusListener, IADTabpanel
SimpleTreeModel model = (SimpleTreeModel) treePanel.getTree().getModel();
if (treePanel.getTree().getSelectedItem() != null) {
DefaultTreeNode treeNode = (DefaultTreeNode) treePanel.getTree().getSelectedItem().getValue();
DefaultTreeNode<Object> treeNode = (DefaultTreeNode<Object>) treePanel.getTree().getSelectedItem().getValue();
MTreeNode data = (MTreeNode) treeNode.getData();
if (data.getNode_ID() == recordId) {
int[] path = model.getPath(treeNode);
@ -1100,7 +1100,7 @@ DataStatusListener, IADTabpanel
}
}
DefaultTreeNode treeNode = model.find(null, recordId);
DefaultTreeNode<Object> treeNode = model.find(null, recordId);
if (treeNode != null) {
int[] path = model.getPath(treeNode);
Treeitem ti = treePanel.getTree().renderItemByPath(path);
@ -1135,7 +1135,7 @@ DataStatusListener, IADTabpanel
Events.sendEvent(this, new Event(ON_SWITCH_VIEW_EVENT, this));
}
class ZoomListener implements EventListener {
class ZoomListener implements EventListener<Event> {
private IZoomableEditor searchEditor;

View File

@ -32,7 +32,7 @@ import org.zkoss.zul.event.ListDataEvent;
* @author Low Heng Sin
*
*/
public class GridTableListModel extends AbstractListModel implements TableModelListener, ListModelExt {
public class GridTableListModel extends AbstractListModel<Object> implements TableModelListener, ListModelExt<Object> {
/**
*
@ -166,8 +166,7 @@ public class GridTableListModel extends AbstractListModel implements TableModelL
* @param ascending
* @see ListModelExt#sort(Comparator, boolean)
*/
@SuppressWarnings("unchecked")
public void sort(Comparator cmpr, boolean ascending) {
public void sort(Comparator<Object> cmpr, boolean ascending) {
//use default zk comparator
if (cmpr instanceof ListitemComparator) {
ListitemComparator lic = (ListitemComparator) cmpr;
@ -225,7 +224,7 @@ public class GridTableListModel extends AbstractListModel implements TableModelL
}
@Override
public String getSortDirection(Comparator cmpr) {
public String getSortDirection(Comparator<Object> cmpr) {
return "natural";
}

View File

@ -5,7 +5,7 @@ import org.zkoss.zk.ui.event.Event;
import org.zkoss.zk.ui.event.EventListener;
import org.zkoss.zk.ui.event.Events;
public class BusyDialogTemplate implements Runnable, EventListener {
public class BusyDialogTemplate implements Runnable, EventListener<Event> {
private static final String EVENT_NAME = "onRun";

View File

@ -70,7 +70,7 @@ import org.zkoss.zul.Space;
* Contributor : Fabian Aguilar - OFBConsulting - Multiallocation
*/
public class WAllocation extends Allocation
implements IFormController, EventListener, WTableModelListener, ValueChangeListener
implements IFormController, EventListener<Event>, WTableModelListener, ValueChangeListener
{
private CustomForm form = new CustomForm();

View File

@ -71,7 +71,7 @@ import org.zkoss.zul.Iframe;
* @date September 28, 2007
*/
public class WArchiveViewer extends Archive implements IFormController, EventListener
public class WArchiveViewer extends Archive implements IFormController, EventListener<Event>
{
private CustomForm form = new CustomForm();

View File

@ -65,7 +65,7 @@ import org.zkoss.zul.Vbox;
* @author Jorg Janke
* @version $Id: VAttributeGrid.java,v 1.2 2006/07/30 00:51:28 jjanke Exp $
*/
public class WAttributeGrid extends ADForm implements EventListener
public class WAttributeGrid extends ADForm implements EventListener<Event>
{
/**
*

View File

@ -69,7 +69,7 @@ import org.zkoss.zul.Space;
public class WBOMDrop extends ADForm implements EventListener
public class WBOMDrop extends ADForm implements EventListener<Event>
{
/**
*
@ -560,18 +560,18 @@ public class WBOMDrop extends ADForm implements EventListener
while (it.hasNext())
{
Radiogroup group = it.next();
Enumeration en = (Enumeration) group.getChildren();
Enumeration<?> en = (Enumeration<?>) group.getChildren();
while (en.hasMoreElements())
{
// We found the group
if (source == en.nextElement())
{
Enumeration info = (Enumeration) group.getChildren();
Enumeration<?> info = (Enumeration<?>) group.getChildren();
while (info.hasMoreElements())
{
Object infoObj = info.nextElement();
Object infoObj = (Object)info.nextElement();
if (source != infoObj)
cmd_selection(infoObj);
}

View File

@ -66,7 +66,7 @@ import org.zkoss.zul.Separator;
* @author Andrew Kimball
*
*/
public class WCharge extends Charge implements IFormController, EventListener
public class WCharge extends Charge implements IFormController, EventListener<Event>
{
/**
*

View File

@ -52,7 +52,7 @@ import org.zkoss.zul.North;
import org.zkoss.zul.South;
public class WFactReconcile extends FactReconcile
implements IFormController, EventListener, WTableModelListener, ValueChangeListener{
implements IFormController, EventListener<Event>, WTableModelListener, ValueChangeListener{
private CustomForm form = new CustomForm();

View File

@ -71,7 +71,7 @@ import org.zkoss.zul.South;
*
*/
public class WFileImport extends ADForm implements EventListener
public class WFileImport extends ADForm implements EventListener<Event>
{
/**
*

View File

@ -78,7 +78,7 @@ import org.zkoss.zul.Html;
* Generate custom form window
*
*/
public class WGenForm extends ADForm implements EventListener, WTableModelListener
public class WGenForm extends ADForm implements EventListener<Event>, WTableModelListener
{
/**
*

View File

@ -46,7 +46,7 @@ import org.zkoss.zul.Space;
* Generate Shipment (manual) view class
*
*/
public class WInOutGen extends InOutGen implements IFormController, EventListener, ValueChangeListener
public class WInOutGen extends InOutGen implements IFormController, EventListener<Event>, ValueChangeListener
{
private WGenForm form;

View File

@ -45,7 +45,7 @@ import org.zkoss.zul.Space;
* Generate Invoice (manual) view class
*
*/
public class WInvoiceGen extends InvoiceGen implements IFormController, EventListener, ValueChangeListener
public class WInvoiceGen extends InvoiceGen implements IFormController, EventListener<Event>, ValueChangeListener
{
private WGenForm form;

View File

@ -70,7 +70,7 @@ import org.zkoss.zul.Space;
* @version $Id: VMatch.java,v 1.2 2006/07/30 00:51:28 jjanke Exp $
*/
public class WMatch extends Match
implements IFormController, EventListener, WTableModelListener
implements IFormController, EventListener<Event>, WTableModelListener
{
/**
*

View File

@ -55,7 +55,7 @@ import org.zkoss.zul.South;
* @author Jorg Janke
* @version $Id: VMerge.java,v 1.2 2006/07/30 00:51:28 jjanke Exp $
*/
public class WMerge extends Merge implements IFormController, EventListener
public class WMerge extends Merge implements IFormController, EventListener<Event>
{
/**
*

View File

@ -75,7 +75,7 @@ import org.zkoss.zul.Filedownload;
* Contributors:
* Carlos Ruiz - GlobalQSS - FR 3132033 - Make payment export class configurable per bank
*/
public class WPayPrint extends PayPrint implements IFormController, EventListener, ValueChangeListener
public class WPayPrint extends PayPrint implements IFormController, EventListener<Event>, ValueChangeListener
{
private CustomForm form = new CustomForm();

View File

@ -422,7 +422,7 @@ public class WReportCustomization implements IFormController,EventListener<Even
winExportFile.appendChild(vb);
vb.appendChild(hb);
vb.appendChild(confirmPanel);
EventListener exportListener= new EventListener()
EventListener<Event> exportListener= new EventListener<Event>()
{
public void onEvent(Event event) throws Exception {
if (event.getTarget().getId().equals(ConfirmPanel.A_CANCEL))

View File

@ -55,7 +55,7 @@ import org.zkoss.zul.South;
* @author Elaine
* @date September 18, 2012
*/
public class WResetPassword implements IFormController, EventListener, ValueChangeListener {
public class WResetPassword implements IFormController, EventListener<Event>, ValueChangeListener {
private static CLogger log = CLogger.getCLogger(WResetPassword.class);

View File

@ -51,7 +51,7 @@ import org.zkoss.zk.ui.event.Events;
* @author Andrew Kimball
*
*/
public class WSQLProcess extends ADForm implements EventListener
public class WSQLProcess extends ADForm implements EventListener<Event>
{
/**
*

View File

@ -73,7 +73,7 @@ import org.zkoss.zul.West;
* @author Carlos Ruiz
*
*/
public class WSetupWizard extends SetupWizard implements IFormController, EventListener
public class WSetupWizard extends SetupWizard implements IFormController, EventListener<Event>
{
private CustomForm form = new CustomForm();

View File

@ -84,7 +84,7 @@ import org.zkoss.zul.West;
* @author Carlos Ruiz
*
*/
public class WTabEditor extends TabEditor implements IFormController, EventListener, ValueChangeListener
public class WTabEditor extends TabEditor implements IFormController, EventListener<Event>, ValueChangeListener
{
// TODO: create messages Property, VisibleFields, NonVisibleField

View File

@ -66,12 +66,13 @@ import org.zkoss.zul.Separator;
import org.zkoss.zul.South;
import org.zkoss.zul.Space;
import org.zkoss.zul.Tree;
import org.zkoss.zul.TreeNode;
import org.zkoss.zul.Treecol;
import org.zkoss.zul.Treecols;
import org.zkoss.zul.Treeitem;
import org.zkoss.zul.West;
public class WTreeBOM extends TreeBOM implements IFormController, EventListener {
public class WTreeBOM extends TreeBOM implements IFormController, EventListener<Event> {
private static final String[] LISTENER_EVENTS = {Events.ON_CLICK, Events.ON_CHANGE, Events.ON_OK, Events.ON_SELECT, Events.ON_SELECTION, Events.ON_DOUBLE_CLICK};
private int m_WindowNo = 0;
@ -323,9 +324,9 @@ public class WTreeBOM extends TreeBOM implements IFormController, EventListener
line.add((BigDecimal) (new BigDecimal(1)).setScale(4, BigDecimal.ROUND_HALF_UP).stripTrailingZeros()); // 4 QtyBOM
// dummy root node, as first node is not displayed in tree
mySimpleTreeNode parent = new mySimpleTreeNode("Root",new ArrayList<Object>());
mySimpleTreeNode parent = new mySimpleTreeNode("Root",new ArrayList<TreeNode<Object>>());
//m_root = parent;
m_root = new mySimpleTreeNode((Vector<Object>)line,new ArrayList<Object>());
m_root = new mySimpleTreeNode((Vector<Object>)line,new ArrayList<TreeNode<Object>>());
parent.getChildren().add(m_root);
dataBOM.clear();
@ -445,7 +446,7 @@ public class WTreeBOM extends TreeBOM implements IFormController, EventListener
line.add(uom); // 3 C_UOM_ID
line.add((BigDecimal) ((bomline.getBOMQty()!=null) ? bomline.getBOMQty() : new BigDecimal(0)).setScale(4, BigDecimal.ROUND_HALF_UP).stripTrailingZeros()); // 4 QtyBOM
mySimpleTreeNode child = new mySimpleTreeNode(line,new ArrayList<Object>());
mySimpleTreeNode child = new mySimpleTreeNode(line,new ArrayList<TreeNode<Object>>());
parent.getChildren().add(child);
if(m_selected_id == bomline.getM_Product_ID() || getM_Product_ID() == bomline.getM_Product_ID())
@ -476,7 +477,7 @@ public class WTreeBOM extends TreeBOM implements IFormController, EventListener
if(m_selected_id == bom.getM_ProductBOM_ID() || getM_Product_ID() == bom.getM_ProductBOM_ID())
dataBOM.add(line);
mySimpleTreeNode child = new mySimpleTreeNode(line,new ArrayList<Object>());
mySimpleTreeNode child = new mySimpleTreeNode(line,new ArrayList<TreeNode<Object>>());
parent.getChildren().add(child);
if(reload) return;
@ -536,10 +537,10 @@ public class WTreeBOM extends TreeBOM implements IFormController, EventListener
* - Override toString method for display
*
*/
class mySimpleTreeNode extends DefaultTreeNode
class mySimpleTreeNode extends DefaultTreeNode<Object>
{
public mySimpleTreeNode(Object data, List<Object> children) {
public mySimpleTreeNode(Object data, List<TreeNode<Object>> children) {
super(data, children);

View File

@ -51,6 +51,7 @@ import org.zkoss.zul.DefaultTreeNode;
import org.zkoss.zul.Space;
import org.zkoss.zul.Splitter;
import org.zkoss.zul.Tree;
import org.zkoss.zul.TreeNode;
import org.zkoss.zul.Treeitem;
/**
@ -59,7 +60,7 @@ import org.zkoss.zul.Treeitem;
* @author Jorg Janke
* @version $Id: VTreeMaintenance.java,v 1.3 2006/07/30 00:51:28 jjanke Exp $
*/
public class WTreeMaintenance extends TreeMaintenance implements IFormController, EventListener
public class WTreeMaintenance extends TreeMaintenance implements IFormController, EventListener<Event>
{
/**
*
@ -302,7 +303,7 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
if (selected != null) // allow add if not in tree
{
SimpleTreeModel tm = (SimpleTreeModel) centerTree.getModel();
DefaultTreeNode stn = tm.find(tm.getRoot(), selected.id);
DefaultTreeNode<?> stn = tm.find(tm.getRoot(), selected.id);
if (stn != null) {
int[] path = tm.getPath(stn);
Treeitem ti = centerTree.renderItemByPath(path);
@ -319,12 +320,12 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
private void onTreeSelection (Event e)
{
Treeitem ti = centerTree.getSelectedItem();
DefaultTreeNode stn = (DefaultTreeNode) ti.getValue();
DefaultTreeNode<?> stn = (DefaultTreeNode<?>) ti.getValue();
MTreeNode tn = (MTreeNode)stn.getData();
log.info(tn.toString());
if (tn == null)
return;
ListModel model = centerList.getModel();
ListModel<Object> model = centerList.getModel();
int size = model.getSize();
int index = -1;
for (index = 0; index < size; index++)
@ -346,7 +347,7 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
if (item != null)
{
SimpleTreeModel model = (SimpleTreeModel) centerTree.getModel();
DefaultTreeNode stn = model.find(model.getRoot(), item.id);
DefaultTreeNode<Object> stn = model.find(model.getRoot(), item.id);
if (stn != null) {
MTreeNode tNode = (MTreeNode) stn.getData();
tNode.setName(item.name);
@ -356,8 +357,8 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
Treeitem ti = centerTree.renderItemByPath(model.getPath(stn));
ti.setTooltiptext(item.description);
} else {
stn = new DefaultTreeNode(new MTreeNode(item.id, 0, item.name, item.description, 0, item.isSummary,
item.imageIndicator, false, null), new ArrayList<Object>());
stn = new DefaultTreeNode<Object>(new MTreeNode(item.id, 0, item.name, item.description, 0, item.isSummary,
item.imageIndicator, false, null), new ArrayList<TreeNode<Object>>());
model.addNode(stn);
}
// May cause Error if in tree
@ -375,7 +376,7 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
if (item != null)
{
SimpleTreeModel model = (SimpleTreeModel) centerTree.getModel();
DefaultTreeNode stn = model.find(model.getRoot(), item.id);
DefaultTreeNode<Object> stn = model.find(model.getRoot(), item.id);
if (stn != null)
model.removeNode(stn);
@ -399,7 +400,7 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
if (result)
{
log.info("");
ListModel model = centerList.getModel();
ListModel<Object> model = centerList.getModel();
int size = model.getSize();
int index = -1;
for (index = 0; index < size; index++)
@ -426,7 +427,7 @@ public class WTreeMaintenance extends TreeMaintenance implements IFormController
{
if (result)
{
ListModel model = centerList.getModel();
ListModel<Object> model = centerList.getModel();
int size = model.getSize();
int index = -1;
for (index = 0; index < size; index++)

View File

@ -63,7 +63,7 @@ import org.zkoss.zul.Separator;
* @version $Id: VTrxMaterial.java,v 1.3 2006/07/30 00:51:28 jjanke Exp $
*/
public class WTrxMaterial extends TrxMaterial
implements IFormController, EventListener, ValueChangeListener
implements IFormController, EventListener<Event>, ValueChangeListener
{
/**
*

View File

@ -310,7 +310,7 @@ public class WGraph extends Div implements IdSpace {
count++;
}
myImage.addEventListener(Events.ON_CLICK, new EventListener() {
myImage.addEventListener(Events.ON_CLICK, new EventListener<Event>() {
public void onEvent(Event event) throws Exception {
MouseEvent me = (MouseEvent) event;
String areaId = me.getArea();
@ -536,7 +536,7 @@ public class WGraph extends Div implements IdSpace {
a.setSclass("pa-hrefNode");
td.appendChild(a);
a.setId(ZOOM_KEY + k);
a.addEventListener(Events.ON_CLICK, new EventListener() {
a.addEventListener(Events.ON_CLICK, new EventListener<Event>() {
public void onEvent(Event event) throws Exception {
Component comp = event.getTarget();
String id = comp.getId();

View File

@ -48,7 +48,7 @@ import org.zkoss.zul.Menupopup;
*
* @author hengsin
*/
public class WPerformanceIndicator extends Panel implements EventListener
public class WPerformanceIndicator extends Panel implements EventListener<Event>
{
/**
*

View File

@ -217,7 +217,7 @@ public class WFEditor extends ADForm {
vbox.appendChild(new Separator());
final ConfirmPanel panel = new ConfirmPanel(true, false, false, false, false, false, false);
vbox.appendChild(panel);
panel.addActionListener(Events.ON_CLICK, new EventListener() {
panel.addActionListener(Events.ON_CLICK, new EventListener<Event>() {
public void onEvent(Event event) throws Exception {
if (event.getTarget() == panel.getButton(ConfirmPanel.A_CANCEL)) {
@ -322,7 +322,7 @@ public class WFEditor extends ADForm {
image.setTooltiptext(node.getHelp(true));
}
image.setAttribute("AD_WF_Node_ID", node.getAD_WF_Node_ID());
image.addEventListener(Events.ON_CLICK, new EventListener() {
image.addEventListener(Events.ON_CLICK, new EventListener<Event>() {
public void onEvent(Event event) throws Exception {
showNodeMenu(event.getTarget());

View File

@ -44,7 +44,7 @@ import org.zkoss.zul.Html;
*
* @author Low Heng Sin
*/
public class WFPanel extends Borderlayout implements EventListener
public class WFPanel extends Borderlayout implements EventListener<Event>
{
/**
*

View File

@ -149,7 +149,7 @@ public class WFPopupItem extends Menuitem {
vbox.appendChild(new Separator());
final ConfirmPanel panel = new ConfirmPanel(true, false, false, false, false, false, false);
vbox.appendChild(panel);
panel.addActionListener(Events.ON_CLICK, new EventListener() {
panel.addActionListener(Events.ON_CLICK, new EventListener<Event>() {
public void onEvent(Event event) throws Exception {
if (event.getTarget() == panel.getButton(ConfirmPanel.A_CANCEL)) {

View File

@ -72,7 +72,7 @@ import org.zkoss.zul.Html;
* @author hengsin
*
*/
public class WWFActivity extends ADForm implements EventListener
public class WWFActivity extends ADForm implements EventListener<Event>
{
/**
*

View File

@ -22,7 +22,7 @@ import org.zkoss.zul.Listitem;
import org.zkoss.zul.ListitemRenderer;
import org.zkoss.zul.ListitemRendererExt;
public class ADTabListModel extends AbstractListModel implements ListitemRenderer, ListitemRendererExt {
public class ADTabListModel extends AbstractListModel<Object> implements ListitemRenderer<Object>, ListitemRendererExt {
/**
*

View File

@ -35,7 +35,7 @@ import org.zkoss.zul.Treerow;
* @author Low Heng Sin
*
*/
public class ADTreeOnDropListener implements EventListener {
public class ADTreeOnDropListener implements EventListener<Event> {
private SimpleTreeModel treeModel;
private MTree mTree;
@ -68,7 +68,7 @@ public class ADTreeOnDropListener implements EventListener {
if (de.getDragged() != de.getTarget()) {
Treeitem src = (Treeitem) ((Treerow) de.getDragged()).getParent();
Treeitem target = (Treeitem) ((Treerow) de.getTarget()).getParent();
moveNode((DefaultTreeNode)src.getValue(), (DefaultTreeNode)target.getValue());
moveNode((DefaultTreeNode<Object>)src.getValue(), (DefaultTreeNode<Object>)target.getValue());
}
}
}
@ -78,7 +78,7 @@ public class ADTreeOnDropListener implements EventListener {
* @param movingNode The node to be moved
* @param toNode The target node
*/
private void moveNode(DefaultTreeNode movingNode, DefaultTreeNode toNode)
private void moveNode(DefaultTreeNode<Object> movingNode, DefaultTreeNode<Object> toNode)
{
log.info(movingNode.toString() + " to " + toNode.toString());
@ -87,7 +87,7 @@ public class ADTreeOnDropListener implements EventListener {
MTreeNode toMNode = (MTreeNode) toNode.getData();
DefaultTreeNode newParent;
DefaultTreeNode<Object> newParent;
int index;
if (!toMNode.isSummary()) // drop on a child node
{
@ -122,13 +122,13 @@ public class ADTreeOnDropListener implements EventListener {
} // moveNode
private void moveNode(DefaultTreeNode movingNode, DefaultTreeNode toNode, boolean moveInto)
private void moveNode(DefaultTreeNode<Object> movingNode, DefaultTreeNode<Object> toNode, boolean moveInto)
{
DefaultTreeNode newParent;
DefaultTreeNode<Object> newParent;
int index;
// remove
DefaultTreeNode oldParent = treeModel.getParent(movingNode);
DefaultTreeNode<Object> oldParent = treeModel.getParent(movingNode);
treeModel.removeNode(movingNode);
//get new index
@ -163,7 +163,7 @@ public class ADTreeOnDropListener implements EventListener {
MTreeNode oldMParent = (MTreeNode) oldParent.getData();
for (int i = 0; i < oldParent.getChildCount(); i++)
{
DefaultTreeNode nd = (DefaultTreeNode)oldParent.getChildAt(i);
DefaultTreeNode<?> nd = (DefaultTreeNode<?>)oldParent.getChildAt(i);
MTreeNode md = (MTreeNode) nd.getData();
StringBuffer sql = new StringBuffer("UPDATE ");
sql.append(mTree.getNodeTableName())
@ -180,7 +180,7 @@ public class ADTreeOnDropListener implements EventListener {
MTreeNode newMParent = (MTreeNode) newParent.getData();
for (int i = 0; i < newParent.getChildCount(); i++)
{
DefaultTreeNode nd = (DefaultTreeNode)newParent.getChildAt(i);
DefaultTreeNode<?> nd = (DefaultTreeNode<?>)newParent.getChildAt(i);
MTreeNode md = (MTreeNode) nd.getData();
StringBuffer sql = new StringBuffer("UPDATE ");
sql.append(mTree.getNodeTableName())
@ -205,10 +205,10 @@ public class ADTreeOnDropListener implements EventListener {
trx = null;
}
class MenuListener implements EventListener {
private DefaultTreeNode movingNode;
private DefaultTreeNode toNode;
MenuListener(DefaultTreeNode movingNode, DefaultTreeNode toNode) {
class MenuListener implements EventListener<Event> {
private DefaultTreeNode<Object> movingNode;
private DefaultTreeNode<Object> toNode;
MenuListener(DefaultTreeNode<Object> movingNode, DefaultTreeNode<Object> toNode) {
this.movingNode = movingNode;
this.toNode = toNode;
}

View File

@ -32,7 +32,7 @@ import org.zkoss.zul.Vbox;
* @author hengsin
*
*/
public class Accordion extends Borderlayout implements EventListener {
public class Accordion extends Borderlayout implements EventListener<Event> {
private static final long serialVersionUID = 5898232602746332810L;

View File

@ -68,7 +68,7 @@ public class Button extends org.zkoss.zul.Button
* shortcut for addEventListener(Events.ON_CLICK, listener) to ease porting of swing form
* @param listener
*/
public void addActionListener(EventListener listener) {
public void addActionListener(EventListener<?> listener) {
addEventListener(Events.ON_CLICK, listener);
}
}

View File

@ -73,7 +73,7 @@ public class Checkbox extends org.zkoss.zul.Checkbox
* alias for addEventListener(Events.ON_CHECK, listener), to ease porting of swing form
* @param listener
*/
public void addActionListener(EventListener listener) {
public void addActionListener(EventListener<?> listener) {
addEventListener(Events.ON_CHECK, listener);
}
}

View File

@ -420,7 +420,7 @@ public final class ConfirmPanel extends Hbox
* @param event event
* @param listener listener
*/
public void addActionListener(String event, EventListener listener)
public void addActionListener(String event, EventListener<?> listener)
{
List<?> list1 = pnlBtnLeft.getChildren();
List<?> list2 = pnlBtnRight.getChildren();
@ -443,7 +443,7 @@ public final class ConfirmPanel extends Hbox
* added to ease porting of swing form
* @param listener
*/
public void addActionListener(EventListener listener) {
public void addActionListener(EventListener<?> listener) {
addActionListener(Events.ON_CLICK, listener);
}

View File

@ -83,7 +83,7 @@ public class DatetimeBox extends Panel {
}
@Override
public boolean addEventListener(String evtnm, EventListener listener) {
public boolean addEventListener(String evtnm, EventListener<?> listener) {
return dateBox.addEventListener(evtnm, listener) && timeBox.addEventListener(evtnm, listener);
}

View File

@ -117,7 +117,7 @@ public class EditorBox extends Div {
* @param evtnm
* @param listener
*/
public boolean addEventListener(String evtnm, EventListener listener) {
public boolean addEventListener(String evtnm, EventListener<?> listener) {
if (Events.ON_CLICK.equals(evtnm)) {
return btn.addEventListener(evtnm, listener);
} else {

View File

@ -47,7 +47,7 @@ public class FilenameBox extends EditorBox
* @see org.adempiere.webui.component.EditorBox#addEventListener(java.lang.String, org.zkoss.zk.ui.event.EventListener)
*/
@Override
public boolean addEventListener(String evtnm, EventListener listener) {
public boolean addEventListener(String evtnm, EventListener<?> listener) {
if (Events.ON_UPLOAD.equals(evtnm)) {
return btn.addEventListener(evtnm, listener);
} else {

View File

@ -34,7 +34,7 @@ import org.zkoss.zul.South;
* @author Elaine
*
*/
public class FolderBrowser extends Window implements EventListener
public class FolderBrowser extends Window implements EventListener<Event>
{
/**
*

View File

@ -69,7 +69,7 @@ public class ListModelTable extends ListModelList implements ListModelExt
*
* @param collection The collection of objects with which to initialise the list
*/
public ListModelTable(Collection collection)
public ListModelTable(Collection<?> collection)
{
super(collection);
@ -79,7 +79,7 @@ public class ListModelTable extends ListModelList implements ListModelExt
{
if (row instanceof List)
{
m_noColumns = Math.max(m_noColumns, ((List)row).size());
m_noColumns = Math.max(m_noColumns, ((List<Object>)row).size());
}
else
{
@ -117,7 +117,7 @@ public class ListModelTable extends ListModelList implements ListModelExt
*/
private void ensureRowSize()
{
Iterator<List<Object>> rowIterator = this.getInnerList().iterator();
Iterator<List<Object>> rowIterator = (Iterator<List<Object>>)this.getInnerList().iterator();
while (rowIterator.hasNext())
{
@ -173,12 +173,12 @@ public class ListModelTable extends ListModelList implements ListModelExt
*/
public Object getDataAt(int rowIndex, int columnIndex)
{
List modelRow;
List<Object> modelRow;
Object dataObject;
try
{
modelRow = (List)getElementAt(rowIndex);
modelRow = (List<Object>)getElementAt(rowIndex);
dataObject = modelRow.get(columnIndex);
}
@ -259,7 +259,7 @@ public class ListModelTable extends ListModelList implements ListModelExt
if (vector)
{
newRow = new Vector<Object>(getNoColumns());
((Vector)newRow).setSize(getNoColumns());
((Vector<Object>)newRow).setSize(getNoColumns());
add(newRow);
}
else

View File

@ -35,14 +35,14 @@ import org.zkoss.zul.Listitem;
* @date Feb 25, 2007
* @version $Revision: 0.10 $
*/
public class Listbox extends org.zkoss.zul.Listbox implements EventListener
public class Listbox extends org.zkoss.zul.Listbox implements EventListener<Event>
{
/**
*
*/
private static final long serialVersionUID = 2102597724705225997L;
private List<EventListener> doubleClickListeners = new ArrayList<EventListener>();
private List<EventListener> onDropListeners = new ArrayList<EventListener>();
private List<EventListener<Event>> doubleClickListeners = new ArrayList<EventListener<Event>>();
private List<EventListener<Event>> onDropListeners = new ArrayList<EventListener<Event>>();
private boolean draggable;
private String oddRowSclass;
@ -142,7 +142,7 @@ public class Listbox extends org.zkoss.zul.Listbox implements EventListener
}
public int[] getSelectedIndices() {
Set selectedItems = this.getSelectedItems();
Set<Listitem> selectedItems = this.getSelectedItems();
int[] selecteds = new int[this.getSelectedCount()];
int i = 0;
for (Object obj : selectedItems) {
@ -164,11 +164,11 @@ public class Listbox extends org.zkoss.zul.Listbox implements EventListener
}
}
public void addOnDropListener(EventListener listener) {
public void addOnDropListener(EventListener<Event> listener) {
onDropListeners.add(listener);
}
public void addDoubleClickListener(EventListener listener) {
public void addDoubleClickListener(EventListener<Event> listener) {
doubleClickListeners.add(listener);
}
@ -197,11 +197,11 @@ public class Listbox extends org.zkoss.zul.Listbox implements EventListener
public void onEvent(Event event) throws Exception {
if (Events.ON_DOUBLE_CLICK.equals(event.getName()) && !doubleClickListeners.isEmpty()) {
for(EventListener listener : doubleClickListeners) {
for(EventListener<Event> listener : doubleClickListeners) {
listener.onEvent(event);
}
} else if (Events.ON_DROP.equals(event.getName()) && !onDropListeners.isEmpty()) {
for(EventListener listener : onDropListeners) {
for(EventListener<Event> listener : onDropListeners) {
listener.onEvent(event);
}
}
@ -229,7 +229,7 @@ public class Listbox extends org.zkoss.zul.Listbox implements EventListener
* alias for removeEventListener(Events.ON_SELECT, listener), to ease porting of swing form
* @param listener
*/
public void removeActionListener(EventListener listener) {
public void removeActionListener(EventListener<Event> listener) {
removeEventListener(Events.ON_SELECT, listener);
}
@ -237,7 +237,7 @@ public class Listbox extends org.zkoss.zul.Listbox implements EventListener
* alias for addEventListener(Events.ON_SELECT, listener), to ease porting of swing form
* @param listener
*/
public void addActionListener(EventListener listener) {
public void addActionListener(EventListener<Event> listener) {
addEventListener(Events.ON_SELECT, listener);
}

View File

@ -397,7 +397,7 @@ public class NumberBox extends Div
}
@Override
public boolean addEventListener(String evtnm, EventListener listener)
public boolean addEventListener(String evtnm, EventListener<?> listener)
{
if(Events.ON_CLICK.equals(evtnm))
{

Some files were not shown because too many files have changed in this diff Show More