From bc1da867efb03f973f12e213a21ae37eafa367a2 Mon Sep 17 00:00:00 2001 From: Carlos Ruiz Date: Sat, 12 Nov 2016 14:39:40 +0100 Subject: [PATCH] IDEMPIERE-3239 4.1 cleanup --- org.w3c.dom.fragment/.classpath | 8 - org.w3c.dom.fragment/.project | 28 - .../.settings/org.eclipse.pde.core.prefs | 3 - org.w3c.dom.fragment/META-INF/MANIFEST.MF | 12 - org.w3c.dom.fragment/buckminster.cspex | 19 - org.w3c.dom.fragment/build.properties | 5 - org.w3c.dom.fragment/copyjars.xml | 5 - org.zkoss.zk.library/.classpath | 23 - org.zkoss.zk.library/.project | 33 -- .../.settings/org.eclipse.jdt.core.prefs | 7 - .../.settings/org.eclipse.pde.core.prefs | 4 - org.zkoss.zk.library/META-INF/MANIFEST.MF | 514 ------------------ org.zkoss.zk.library/buckminster.cspex | 26 - org.zkoss.zk.library/build.properties | 20 - org.zkoss.zk.library/copyjars.xml | 20 - org.zkoss.zk.library/copysources.xml | 19 - .../org/zkoss/util/resource/ClassLocator.java | 207 ------- .../web/util/resource/ResourceCaches.java | 157 ------ .../src/org/zkoss/zk/library/Activator.java | 30 - .../zkoss/zul/impl/CustomGridDataLoader.java | 44 -- .../org/zkoss/zul/impl/GridDataLoader.java | 477 ---------------- 21 files changed, 1661 deletions(-) delete mode 100644 org.w3c.dom.fragment/.classpath delete mode 100644 org.w3c.dom.fragment/.project delete mode 100644 org.w3c.dom.fragment/.settings/org.eclipse.pde.core.prefs delete mode 100644 org.w3c.dom.fragment/META-INF/MANIFEST.MF delete mode 100644 org.w3c.dom.fragment/buckminster.cspex delete mode 100644 org.w3c.dom.fragment/build.properties delete mode 100644 org.w3c.dom.fragment/copyjars.xml delete mode 100644 org.zkoss.zk.library/.classpath delete mode 100644 org.zkoss.zk.library/.project delete mode 100644 org.zkoss.zk.library/.settings/org.eclipse.jdt.core.prefs delete mode 100644 org.zkoss.zk.library/.settings/org.eclipse.pde.core.prefs delete mode 100644 org.zkoss.zk.library/META-INF/MANIFEST.MF delete mode 100644 org.zkoss.zk.library/buckminster.cspex delete mode 100644 org.zkoss.zk.library/build.properties delete mode 100644 org.zkoss.zk.library/copyjars.xml delete mode 100644 org.zkoss.zk.library/copysources.xml delete mode 100644 org.zkoss.zk.library/src/org/zkoss/util/resource/ClassLocator.java delete mode 100644 org.zkoss.zk.library/src/org/zkoss/web/util/resource/ResourceCaches.java delete mode 100644 org.zkoss.zk.library/src/org/zkoss/zk/library/Activator.java delete mode 100644 org.zkoss.zk.library/src/org/zkoss/zul/impl/CustomGridDataLoader.java delete mode 100644 org.zkoss.zk.library/src/org/zkoss/zul/impl/GridDataLoader.java diff --git a/org.w3c.dom.fragment/.classpath b/org.w3c.dom.fragment/.classpath deleted file mode 100644 index f67391337f..0000000000 --- a/org.w3c.dom.fragment/.classpath +++ /dev/null @@ -1,8 +0,0 @@ - - - - - - - - diff --git a/org.w3c.dom.fragment/.project b/org.w3c.dom.fragment/.project deleted file mode 100644 index 10dbcc32c3..0000000000 --- a/org.w3c.dom.fragment/.project +++ /dev/null @@ -1,28 +0,0 @@ - - - org.w3c.dom.fragment - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.w3c.dom.fragment/.settings/org.eclipse.pde.core.prefs b/org.w3c.dom.fragment/.settings/org.eclipse.pde.core.prefs deleted file mode 100644 index f29e940a00..0000000000 --- a/org.w3c.dom.fragment/.settings/org.eclipse.pde.core.prefs +++ /dev/null @@ -1,3 +0,0 @@ -eclipse.preferences.version=1 -pluginProject.extensions=false -resolve.requirebundle=false diff --git a/org.w3c.dom.fragment/META-INF/MANIFEST.MF b/org.w3c.dom.fragment/META-INF/MANIFEST.MF deleted file mode 100644 index 7a8c4bdef3..0000000000 --- a/org.w3c.dom.fragment/META-INF/MANIFEST.MF +++ /dev/null @@ -1,12 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: W3c DOM Fragment -Bundle-SymbolicName: org.w3c.dom.fragment -Bundle-Version: 3.0.0.qualifier -Fragment-Host: system.bundle; extension:=framework -Bundle-RequiredExecutionEnvironment: JavaSE-1.8 -Bundle-ClassPath: batik-ext.jar, - . -Export-Package: org.w3c.dom, - org.w3c.dom.events;version="3.0.0" - diff --git a/org.w3c.dom.fragment/buckminster.cspex b/org.w3c.dom.fragment/buckminster.cspex deleted file mode 100644 index c6cc7e6633..0000000000 --- a/org.w3c.dom.fragment/buckminster.cspex +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - diff --git a/org.w3c.dom.fragment/build.properties b/org.w3c.dom.fragment/build.properties deleted file mode 100644 index 6fa71ca155..0000000000 --- a/org.w3c.dom.fragment/build.properties +++ /dev/null @@ -1,5 +0,0 @@ -source.. = src/ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - batik-ext.jar diff --git a/org.w3c.dom.fragment/copyjars.xml b/org.w3c.dom.fragment/copyjars.xml deleted file mode 100644 index 5f3ec9b3ea..0000000000 --- a/org.w3c.dom.fragment/copyjars.xml +++ /dev/null @@ -1,5 +0,0 @@ - - - - - diff --git a/org.zkoss.zk.library/.classpath b/org.zkoss.zk.library/.classpath deleted file mode 100644 index b32da48ff3..0000000000 --- a/org.zkoss.zk.library/.classpath +++ /dev/null @@ -1,23 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.zkoss.zk.library/.project b/org.zkoss.zk.library/.project deleted file mode 100644 index c094032ca5..0000000000 --- a/org.zkoss.zk.library/.project +++ /dev/null @@ -1,33 +0,0 @@ - - - org.zkoss.zk.library - - - - - - org.eclipse.jdt.core.javabuilder - - - - - org.eclipse.pde.ManifestBuilder - - - - - org.eclipse.pde.SchemaBuilder - - - - - org.eclipse.pde.ds.core.builder - - - - - - org.eclipse.pde.PluginNature - org.eclipse.jdt.core.javanature - - diff --git a/org.zkoss.zk.library/.settings/org.eclipse.jdt.core.prefs b/org.zkoss.zk.library/.settings/org.eclipse.jdt.core.prefs deleted file mode 100644 index f42de363af..0000000000 --- a/org.zkoss.zk.library/.settings/org.eclipse.jdt.core.prefs +++ /dev/null @@ -1,7 +0,0 @@ -eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.inlineJsrBytecode=enabled -org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.7 -org.eclipse.jdt.core.compiler.compliance=1.7 -org.eclipse.jdt.core.compiler.problem.assertIdentifier=error -org.eclipse.jdt.core.compiler.problem.enumIdentifier=error -org.eclipse.jdt.core.compiler.source=1.7 diff --git a/org.zkoss.zk.library/.settings/org.eclipse.pde.core.prefs b/org.zkoss.zk.library/.settings/org.eclipse.pde.core.prefs deleted file mode 100644 index 3c750dc181..0000000000 --- a/org.zkoss.zk.library/.settings/org.eclipse.pde.core.prefs +++ /dev/null @@ -1,4 +0,0 @@ -#Wed Feb 15 15:47:05 MYT 2012 -eclipse.preferences.version=1 -pluginProject.extensions=false -resolve.requirebundle=false diff --git a/org.zkoss.zk.library/META-INF/MANIFEST.MF b/org.zkoss.zk.library/META-INF/MANIFEST.MF deleted file mode 100644 index 8e93d81ceb..0000000000 --- a/org.zkoss.zk.library/META-INF/MANIFEST.MF +++ /dev/null @@ -1,514 +0,0 @@ -Manifest-Version: 1.0 -Bundle-ManifestVersion: 2 -Bundle-Name: iDempiere Zk Library -Bundle-SymbolicName: org.zkoss.zk.library -Bundle-Version: 7.0.7.qualifier -Bundle-RequiredExecutionEnvironment: JavaSE-1.7 -Import-Package: bsh, - bsh.classpath, - bsh.collection, - bsh.commands, - bsh.engine, - bsh.org.objectweb.asm, - bsh.reflect, - bsh.servlet, - bsh.util, - groovy.inspect, - groovy.inspect.swingui, - groovy.io, - groovy.lang, - groovy.mock.interceptor, - groovy.model, - groovy.security, - groovy.servlet, - groovy.sql, - groovy.swing, - groovy.swing.binding, - groovy.swing.factory, - groovy.swing.impl, - groovy.text, - groovy.time, - groovy.ui, - groovy.ui.text, - groovy.ui.view, - groovy.util, - groovy.util.slurpersupport, - groovy.xml, - groovy.xml.dom, - groovy.xml.streamingmarkupsupport, - groovyjarjarantlr, - groovyjarjarantlr.ASdebug, - groovyjarjarantlr.actions.cpp, - groovyjarjarantlr.actions.csharp, - groovyjarjarantlr.actions.java, - groovyjarjarantlr.actions.python, - groovyjarjarantlr.build, - groovyjarjarantlr.collections, - groovyjarjarantlr.collections.impl, - groovyjarjarantlr.debug, - groovyjarjarantlr.debug.misc, - groovyjarjarantlr.preprocessor, - groovyjarjarasm.asm, - groovyjarjarasm.asm.signature, - groovyjarjarasm.asm.tree, - groovyjarjarcommonscli, - javax.servlet;version="3.0.0", - javax.servlet.annotation;version="3.0.0", - javax.servlet.descriptor;version="3.0.0", - javax.servlet.http;version="3.0.0", - javax.servlet.jsp;version="2.2.0", - javax.servlet.jsp.el;version="2.2.0", - javax.servlet.jsp.jstl.core;version="1.2.0", - javax.servlet.jsp.jstl.fmt;version="1.2.0", - javax.servlet.jsp.jstl.sql;version="1.2.0", - javax.servlet.jsp.jstl.tlv;version="1.2.0", - javax.servlet.jsp.resources;version="2.2.0", - javax.servlet.jsp.tagext;version="2.2.0", - javax.servlet.resources;version="3.0.0", - net.sf.cglib.asm;version="3.1.0", - net.sf.cglib.asm.signature;version="3.1.0", - net.sf.cglib.beans;version="3.1.0", - net.sf.cglib.core;version="3.1.0", - net.sf.cglib.proxy;version="3.1.0", - net.sf.cglib.reflect;version="3.1.0", - net.sf.cglib.transform;version="3.1.0", - net.sf.cglib.transform.impl;version="3.1.0", - net.sf.cglib.util;version="3.1.0", - org.apache.html.dom;version="2.9.0", - org.apache.wml;version="2.9.0", - org.apache.wml.dom;version="2.9.0", - org.apache.xerces.dom;version="2.9.0", - org.apache.xerces.dom.events;version="2.9.0", - org.apache.xerces.dom3.as;version="2.9.0", - org.apache.xerces.impl;version="2.9.0", - org.apache.xerces.impl.dtd;version="2.9.0", - org.apache.xerces.impl.dtd.models;version="2.9.0", - org.apache.xerces.impl.dv;version="2.9.0", - org.apache.xerces.impl.dv.dtd;version="2.9.0", - org.apache.xerces.impl.dv.util;version="2.9.0", - org.apache.xerces.impl.dv.xs;version="2.9.0", - org.apache.xerces.impl.io;version="2.9.0", - org.apache.xerces.impl.msg;version="2.9.0", - org.apache.xerces.impl.validation;version="2.9.0", - org.apache.xerces.impl.xpath;version="2.9.0", - org.apache.xerces.impl.xpath.regex;version="2.9.0", - org.apache.xerces.impl.xs;version="2.9.0", - org.apache.xerces.impl.xs.identity;version="2.9.0", - org.apache.xerces.impl.xs.models;version="2.9.0", - org.apache.xerces.impl.xs.opti;version="2.9.0", - org.apache.xerces.impl.xs.traversers;version="2.9.0", - org.apache.xerces.impl.xs.util;version="2.9.0", - org.apache.xerces.jaxp;version="2.9.0", - org.apache.xerces.jaxp.datatype;version="2.9.0", - org.apache.xerces.jaxp.validation;version="2.9.0", - org.apache.xerces.parsers;version="2.9.0", - org.apache.xerces.util;version="2.9.0", - org.apache.xerces.xinclude;version="2.9.0", - org.apache.xerces.xni;version="2.9.0", - org.apache.xerces.xni.grammars;version="2.9.0", - org.apache.xerces.xni.parser;version="2.9.0", - org.apache.xerces.xpointer;version="2.9.0", - org.apache.xerces.xs;version="2.9.0", - org.apache.xerces.xs.datatypes;version="2.9.0", - org.apache.xml.serialize;version="2.9.0", - org.codehaus.groovy, - org.codehaus.groovy.ant, - org.codehaus.groovy.antlr, - org.codehaus.groovy.antlr.java, - org.codehaus.groovy.antlr.parser, - org.codehaus.groovy.antlr.treewalker, - org.codehaus.groovy.ast, - org.codehaus.groovy.ast.expr, - org.codehaus.groovy.ast.stmt, - org.codehaus.groovy.binding, - org.codehaus.groovy.bsf, - org.codehaus.groovy.classgen, - org.codehaus.groovy.control, - org.codehaus.groovy.control.io, - org.codehaus.groovy.control.messages, - org.codehaus.groovy.groovydoc, - org.codehaus.groovy.reflection, - org.codehaus.groovy.runtime, - org.codehaus.groovy.runtime.metaclass, - org.codehaus.groovy.runtime.typehandling, - org.codehaus.groovy.runtime.wrappers, - org.codehaus.groovy.syntax, - org.codehaus.groovy.tools, - org.codehaus.groovy.tools.groovydoc, - org.codehaus.groovy.tools.javac, - org.codehaus.groovy.tools.shell, - org.codehaus.groovy.tools.shell.commands, - org.codehaus.groovy.tools.shell.util, - org.codehaus.groovy.tools.xml, - org.codehaus.groovy.vmplugin, - org.codehaus.groovy.vmplugin.v4, - org.codehaus.groovy.vmplugin.v5, - org.objectweb.asm;version="5.0.1", - org.objectweb.asm.commons;version="5.0.1", - org.objectweb.asm.signature;version="5.0.1", - org.objectweb.asm.tree;version="5.0.1", - org.osgi.framework;version="1.3.0", - org.osgi.service.component;version="1.1.0", - org.slf4j;version="1.6.1", - org.slf4j.helpers;version="1.6.1", - org.slf4j.spi;version="1.6.1" -Bundle-ClassPath: ., - lib/calendar.jar, - lib/ckez.jar, - lib/commons-fileupload.jar, - lib/commons-io.jar, - lib/gmapsz.jar, - lib/timelinez.jar, - lib/timeplotz.jar, - lib/zcommon.jar, - lib/zel.jar, - lib/zhtml.jar, - lib/zk.jar, - lib/zkbind.jar, - lib/zkplus.jar, - lib/zul.jar, - lib/zweb.jar, - lib/junit.jar -Export-Package: junit.extensions, - junit.framework, - junit.runner, - junit.textui, - metainfo.mesg, - metainfo.org.zkoss.util.media, - metainfo.tld, - metainfo.xel, - metainfo.xml, - metainfo.zk, - org.apache.commons.fileupload;version="1.2.2", - org.apache.commons.fileupload.disk;version="1.2.2", - org.apache.commons.fileupload.portlet;version="1.2.2", - org.apache.commons.fileupload.servlet;version="1.2.2", - org.apache.commons.fileupload.util;version="1.2.2", - org.apache.commons.io;version="2.1.0", - org.apache.commons.io.comparator, - org.apache.commons.io.filefilter;version="2.1.0", - org.apache.commons.io.input;version="2.1.0", - org.apache.commons.io.monitor, - org.apache.commons.io.output;version="2.1.0", - org.junit, - org.junit.internal, - org.junit.internal.requests, - org.junit.internal.runners, - org.junit.runner, - org.junit.runner.manipulation, - org.junit.runner.notification, - org.junit.runners, - org.zkforge.ckez, - org.zkforge.json.simple, - org.zkforge.json.simple.parser, - org.zkforge.timeline, - org.zkforge.timeline.data, - org.zkforge.timeline.decorator, - org.zkforge.timeline.event, - org.zkforge.timeline.util, - org.zkforge.timeplot, - org.zkforge.timeplot.data, - org.zkforge.timeplot.event, - org.zkforge.timeplot.geometry, - org.zkforge.timeplot.operator, - org.zkoss, - org.zkoss.bind, - org.zkoss.bind.annotation, - org.zkoss.bind.converter, - org.zkoss.bind.converter.sys, - org.zkoss.bind.impl, - org.zkoss.bind.sys, - org.zkoss.bind.sys.debugger, - org.zkoss.bind.sys.debugger.impl, - org.zkoss.bind.sys.debugger.impl.info, - org.zkoss.bind.sys.tracker, - org.zkoss.bind.tracker.impl, - org.zkoss.bind.validator, - org.zkoss.bind.xel, - org.zkoss.bind.xel.zel, - org.zkoss.calendar, - org.zkoss.calendar.api, - org.zkoss.calendar.event, - org.zkoss.calendar.impl, - org.zkoss.fsm, - org.zkoss.gmaps, - org.zkoss.gmaps.event, - org.zkoss.html, - org.zkoss.idom, - org.zkoss.idom.impl, - org.zkoss.idom.input, - org.zkoss.idom.transform, - org.zkoss.idom.util, - org.zkoss.image, - org.zkoss.image.encoder, - org.zkoss.io, - org.zkoss.json, - org.zkoss.json.parser, - org.zkoss.lang, - org.zkoss.lang.reflect, - org.zkoss.math, - org.zkoss.mesg, - org.zkoss.sound, - org.zkoss.text, - org.zkoss.util, - org.zkoss.util.logging, - org.zkoss.util.media, - org.zkoss.util.resource, - org.zkoss.util.resource.impl, - org.zkoss.web, - org.zkoss.web.fn, - org.zkoss.web.init, - org.zkoss.web.mesg, - org.zkoss.web.portlet, - org.zkoss.web.servlet, - org.zkoss.web.servlet.dsp, - org.zkoss.web.servlet.dsp.action, - org.zkoss.web.servlet.dsp.action.html, - org.zkoss.web.servlet.dsp.impl, - org.zkoss.web.servlet.http, - org.zkoss.web.servlet.xel, - org.zkoss.web.theme, - org.zkoss.web.util.resource, - org.zkoss.xel, - org.zkoss.xel.el, - org.zkoss.xel.fn, - org.zkoss.xel.taglib, - org.zkoss.xel.util, - org.zkoss.xel.zel, - org.zkoss.xml, - org.zkoss.zel, - org.zkoss.zel.impl, - org.zkoss.zel.impl.lang, - org.zkoss.zel.impl.parser, - org.zkoss.zel.impl.util, - org.zkoss.zhtml, - org.zkoss.zhtml.impl, - org.zkoss.zk, - org.zkoss.zk.au, - org.zkoss.zk.au.http, - org.zkoss.zk.au.out, - org.zkoss.zk.device, - org.zkoss.zk.fn, - org.zkoss.zk.library, - org.zkoss.zk.mesg, - org.zkoss.zk.scripting, - org.zkoss.zk.scripting.bsh, - org.zkoss.zk.scripting.groovy, - org.zkoss.zk.scripting.jruby, - org.zkoss.zk.scripting.jython, - org.zkoss.zk.scripting.rhino, - org.zkoss.zk.scripting.util, - org.zkoss.zk.ui, - org.zkoss.zk.ui.annotation, - org.zkoss.zk.ui.event, - org.zkoss.zk.ui.event.impl, - org.zkoss.zk.ui.ext, - org.zkoss.zk.ui.ext.render, - org.zkoss.zk.ui.http, - org.zkoss.zk.ui.impl, - org.zkoss.zk.ui.metainfo, - org.zkoss.zk.ui.metainfo.impl, - org.zkoss.zk.ui.select, - org.zkoss.zk.ui.select.annotation, - org.zkoss.zk.ui.select.impl, - org.zkoss.zk.ui.sys, - org.zkoss.zk.ui.util, - org.zkoss.zk.xel, - org.zkoss.zk.xel.impl, - org.zkoss.zkplus, - org.zkoss.zkplus.acegi, - org.zkoss.zkplus.cdi, - org.zkoss.zkplus.cluster, - org.zkoss.zkplus.databind, - org.zkoss.zkplus.embed, - org.zkoss.zkplus.hibernate, - org.zkoss.zkplus.jndi, - org.zkoss.zkplus.jpa, - org.zkoss.zkplus.liferay, - org.zkoss.zkplus.seasar, - org.zkoss.zkplus.spring, - org.zkoss.zkplus.theme, - org.zkoss.zkplus.util, - org.zkoss.zul, - org.zkoss.zul.event, - org.zkoss.zul.ext, - org.zkoss.zul.impl, - org.zkoss.zul.mesg, - org.zkoss.zul.theme, - web, - web.aud, - web.ckez.html, - web.ckez.img, - web.dsp.action.html, - web.html, - web.img, - web.js.calendar, - web.js.calendar.css, - web.js.calendar.img, - web.js.calendar.lang, - web.js.calendar.mold, - web.js.ckez, - web.js.ckez.ext.CKeditor, - web.js.ckez.ext.CKeditor.adapters, - web.js.ckez.ext.CKeditor.lang, - web.js.ckez.ext.CKeditor.plugins, - web.js.ckez.ext.CKeditor.plugins.a11yhelp.dialogs, - web.js.ckez.ext.CKeditor.plugins.a11yhelp.dialogs.lang, - web.js.ckez.ext.CKeditor.plugins.about.dialogs, - web.js.ckez.ext.CKeditor.plugins.clipboard.dialogs, - web.js.ckez.ext.CKeditor.plugins.colordialog.dialogs, - web.js.ckez.ext.CKeditor.plugins.dialog, - web.js.ckez.ext.CKeditor.plugins.div.dialogs, - web.js.ckez.ext.CKeditor.plugins.find.dialogs, - web.js.ckez.ext.CKeditor.plugins.flash.dialogs, - web.js.ckez.ext.CKeditor.plugins.flash.images, - web.js.ckez.ext.CKeditor.plugins.forms.dialogs, - web.js.ckez.ext.CKeditor.plugins.forms.images, - web.js.ckez.ext.CKeditor.plugins.iframe.dialogs, - web.js.ckez.ext.CKeditor.plugins.iframe.images, - web.js.ckez.ext.CKeditor.plugins.image.dialogs, - web.js.ckez.ext.CKeditor.plugins.image.images, - web.js.ckez.ext.CKeditor.plugins.link.dialogs, - web.js.ckez.ext.CKeditor.plugins.link.images, - web.js.ckez.ext.CKeditor.plugins.liststyle.dialogs, - web.js.ckez.ext.CKeditor.plugins.magicline.images, - web.js.ckez.ext.CKeditor.plugins.pagebreak.images, - web.js.ckez.ext.CKeditor.plugins.pastefromword.filter, - web.js.ckez.ext.CKeditor.plugins.preview, - web.js.ckez.ext.CKeditor.plugins.scayt, - web.js.ckez.ext.CKeditor.plugins.scayt.dialogs, - web.js.ckez.ext.CKeditor.plugins.showblocks.images, - web.js.ckez.ext.CKeditor.plugins.smiley.dialogs, - web.js.ckez.ext.CKeditor.plugins.smiley.images, - web.js.ckez.ext.CKeditor.plugins.specialchar.dialogs, - web.js.ckez.ext.CKeditor.plugins.specialchar.dialogs.lang, - web.js.ckez.ext.CKeditor.plugins.table.dialogs, - web.js.ckez.ext.CKeditor.plugins.tabletools.dialogs, - web.js.ckez.ext.CKeditor.plugins.templates.dialogs, - web.js.ckez.ext.CKeditor.plugins.templates.templates, - web.js.ckez.ext.CKeditor.plugins.templates.templates.images, - web.js.ckez.ext.CKeditor.plugins.wsc, - web.js.ckez.ext.CKeditor.plugins.wsc.dialogs, - web.js.ckez.ext.CKeditor.skins.moono, - web.js.ckez.ext.CKeditor.skins.moono.images, - web.js.gmaps, - web.js.gmaps.css, - web.js.gmaps.ext, - web.js.timelinez, - web.js.timelinez.css, - web.js.timelinez.ext, - web.js.timelinez.ext.timeline, - web.js.timelinez.ext.timeline.images, - web.js.timelinez.ext.timeline.scripts, - web.js.timelinez.ext.timeline.scripts.ext, - web.js.timelinez.ext.timeline.scripts.l10n.cs, - web.js.timelinez.ext.timeline.scripts.l10n.de, - web.js.timelinez.ext.timeline.scripts.l10n.en, - web.js.timelinez.ext.timeline.scripts.l10n.es, - web.js.timelinez.ext.timeline.scripts.l10n.fr, - web.js.timelinez.ext.timeline.scripts.l10n.it, - web.js.timelinez.ext.timeline.scripts.l10n.nl, - web.js.timelinez.ext.timeline.scripts.l10n.ru, - web.js.timelinez.ext.timeline.scripts.l10n.se, - web.js.timelinez.ext.timeline.scripts.l10n.tr, - web.js.timelinez.ext.timeline.scripts.l10n.vi, - web.js.timelinez.ext.timeline.scripts.l10n.zh, - web.js.timelinez.mold, - web.js.timeplotz, - web.js.timeplotz.css, - web.js.timeplotz.ext.timeplot, - web.js.timeplotz.ext.timeplot.images, - web.js.timeplotz.ext.timeplot.locales.en, - web.js.timeplotz.ext.timeplot.scripts, - web.js.timeplotz.mold, - web.js.zhtml, - web.js.zk, - web.js.zk.aaas, - web.js.zk.canvas, - web.js.zk.cpsp, - web.js.zk.debug, - web.js.zk.ext, - web.js.zk.fmt, - web.js.zk.gapi, - web.js.zk.lang, - web.js.zk.wgt, - web.js.zk.xml, - web.js.zk.zuml, - web.js.zul, - web.js.zul.box, - web.js.zul.box.css, - web.js.zul.box.less, - web.js.zul.box.mold, - web.js.zul.db, - web.js.zul.db.css, - web.js.zul.db.less, - web.js.zul.db.mold, - web.js.zul.fud, - web.js.zul.grid, - web.js.zul.grid.css, - web.js.zul.grid.less, - web.js.zul.grid.mold, - web.js.zul.inp, - web.js.zul.inp.css, - web.js.zul.inp.less, - web.js.zul.inp.mold, - web.js.zul.lang, - web.js.zul.layout, - web.js.zul.layout.css, - web.js.zul.layout.less, - web.js.zul.layout.mold, - web.js.zul.med, - web.js.zul.med.mold, - web.js.zul.menu, - web.js.zul.menu.css, - web.js.zul.menu.less, - web.js.zul.menu.mold, - web.js.zul.mesh, - web.js.zul.mesh.css, - web.js.zul.mesh.less, - web.js.zul.mesh.mold, - web.js.zul.sel, - web.js.zul.sel.css, - web.js.zul.sel.less, - web.js.zul.sel.mold, - web.js.zul.tab, - web.js.zul.tab.css, - web.js.zul.tab.less, - web.js.zul.tab.mold, - web.js.zul.utl, - web.js.zul.utl.mold, - web.js.zul.wgt, - web.js.zul.wgt.css, - web.js.zul.wgt.less, - web.js.zul.wgt.mold, - web.js.zul.wnd, - web.js.zul.wnd.css, - web.js.zul.wnd.less, - web.js.zul.wnd.mold, - web.zk, - web.zk.img, - web.zk.img.debug, - web.zul.css, - web.zul.html, - web.zul.img, - web.zul.img.button, - web.zul.img.common, - web.zul.img.errbox, - web.zul.img.grid, - web.zul.img.input, - web.zul.img.layout, - web.zul.img.menu, - web.zul.img.misc, - web.zul.img.msgbox, - web.zul.img.paging, - web.zul.img.popup, - web.zul.img.slider, - web.zul.img.splt, - web.zul.img.tab, - web.zul.img.tree, - web.zul.img.wnd, - web.zul.less, - web.zul.less.font -Bundle-Activator: org.zkoss.zk.library.Activator -Bundle-ActivationPolicy: lazy -Eclipse-BuddyPolicy: registered diff --git a/org.zkoss.zk.library/buckminster.cspex b/org.zkoss.zk.library/buckminster.cspex deleted file mode 100644 index 6ed1ff4efe..0000000000 --- a/org.zkoss.zk.library/buckminster.cspex +++ /dev/null @@ -1,26 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/org.zkoss.zk.library/build.properties b/org.zkoss.zk.library/build.properties deleted file mode 100644 index 8331eb4525..0000000000 --- a/org.zkoss.zk.library/build.properties +++ /dev/null @@ -1,20 +0,0 @@ -output.. = bin/ -bin.includes = META-INF/,\ - .,\ - lib/calendar.jar,\ - lib/ckez.jar,\ - lib/commons-fileupload.jar,\ - lib/commons-io.jar,\ - lib/gmapsz.jar,\ - lib/timelinez.jar,\ - lib/timeplotz.jar,\ - lib/zcommon.jar,\ - lib/zel.jar,\ - lib/zhtml.jar,\ - lib/zk.jar,\ - lib/zkbind.jar,\ - lib/zkplus.jar,\ - lib/zul.jar,\ - lib/zweb.jar,\ - lib/junit.jar -source.. = src/ diff --git a/org.zkoss.zk.library/copyjars.xml b/org.zkoss.zk.library/copyjars.xml deleted file mode 100644 index 60ff3b1b8c..0000000000 --- a/org.zkoss.zk.library/copyjars.xml +++ /dev/null @@ -1,20 +0,0 @@ - - - - - - - - - - - - - - - - - - - - diff --git a/org.zkoss.zk.library/copysources.xml b/org.zkoss.zk.library/copysources.xml deleted file mode 100644 index 03824e964f..0000000000 --- a/org.zkoss.zk.library/copysources.xml +++ /dev/null @@ -1,19 +0,0 @@ - - - - - - - - - - - - - - - - - - - diff --git a/org.zkoss.zk.library/src/org/zkoss/util/resource/ClassLocator.java b/org.zkoss.zk.library/src/org/zkoss/util/resource/ClassLocator.java deleted file mode 100644 index dbfbf19f9e..0000000000 --- a/org.zkoss.zk.library/src/org/zkoss/util/resource/ClassLocator.java +++ /dev/null @@ -1,207 +0,0 @@ -/* ClassLocator.java - - Purpose: - - Description: - - History: - Tue Aug 30 09:56:06 2005, Created by tomyeh - -Copyright (C) 2005 Potix Corporation. All Rights Reserved. - -{{IS_RIGHT - This program is distributed under LGPL Version 2.1 in the hope that - it will be useful, but WITHOUT ANY WARRANTY. -}}IS_RIGHT -*/ -package org.zkoss.util.resource; - -import java.util.Enumeration; -import java.util.LinkedHashMap; -import java.util.Map; -import java.util.LinkedHashSet; -import java.util.Set; -import java.util.LinkedList; -import java.util.List; -import java.util.Collections; -import java.util.Iterator; -import java.io.InputStream; -import java.io.IOException; -import java.net.URL; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.zkoss.util.CollectionsX; -import org.zkoss.zk.library.Activator; - -import org.zkoss.idom.Document; -import org.zkoss.idom.Element; -import org.zkoss.idom.util.IDOMs; -import org.zkoss.idom.input.SAXBuilder; - -/** - * The locator searches the current thread's context class loader, - * and then this class's class loader. - * - *

It is important to use this locator if you want to load something - * in other jar files. - * - *

Since this locator is used frequently, {@link Locators#getDefault} - * is provided to return an instance of this class, - * - * @author tomyeh - */ -public class ClassLocator implements XMLResourcesLocator { - private static final Logger log = LoggerFactory.getLogger(ClassLocator.class); - - public ClassLocator() { - } - - //XMLResourcesLocator// - public Enumeration getResources(String name) throws IOException { - List list = null; - name = resolveName(name); - if (Activator.getContext() != null) { - final Enumeration en = Activator.getContext().getBundle().getResources(name); - if (en != null && en.hasMoreElements()) - list = Collections.list(en); - } - if (list == null) { - ClassLoader cl = Thread.currentThread().getContextClassLoader(); - if (cl != null) { - final Enumeration en = cl.getResources(name); - if (en.hasMoreElements()) - list = Collections.list(en); - } - } - if (list == null) { - ClassLoader cl = ClassLocator.class.getClassLoader(); - if (cl != null) { - final Enumeration en = cl.getResources(name); - if (en.hasMoreElements()) - list = Collections.list(en); - } - } - if (list == null) { - final Enumeration en = ClassLoader.getSystemResources(name); - list = Collections.list(en); - } - return Collections.enumeration(list); - } - public List getDependentXMLResources(String name, String elName, - String elDepends) throws IOException { - final Map rcmap = new LinkedHashMap(); - for (Enumeration en = getResources(name); en.hasMoreElements();) { - final URL url = en.nextElement(); - final XMLResource xr = new XMLResource(url, elName, elDepends); - final XMLResource old = rcmap.put(xr.name, xr); - if (old != null) - log.warn("Replicate resource: "+xr.name - +"\nOverwrite "+old.url+"\nwith "+xr.url); - //it is possible if zcommon.jar is placed in both - //WEB-INF/lib and shared/lib, i.e., appear twice in the class path - //We overwrite because the order is the parent class loader first - //so WEB-INF/lib is placed after - } -// if (rcmap.isEmpty() && log.isDebugEnabled()) log.debug("No resource is found for "+name); - - final List rcs = new LinkedList(); //a list of Document - final Set resolving = new LinkedHashSet(); - //a set of names used to prevent dead-loop - while (!rcmap.isEmpty()) { - final Iterator it = rcmap.values().iterator(); - final XMLResource xr = it.next(); - it.remove(); - resolveDependency(xr, rcs, rcmap, resolving); - assert resolving.isEmpty(); - } - return rcs; - } - private static void resolveDependency(XMLResource xr, - List rcs, Map rcmap, Set resolving) { - if (!resolving.add(xr.name)) - throw new IllegalStateException("Recusrive reference among "+resolving); - - for (String nm: xr.depends) { - final XMLResource dep = rcmap.remove(nm); - if (dep != null) //not resolved yet - resolveDependency(dep, rcs, rcmap, resolving); //recursively - } - - rcs.add(new Resource(xr.url, xr.document)); - resolving.remove(xr.name); - - if (log.isDebugEnabled()) log.debug("Adding resolved resource: "+xr.name); - } - /** Info used with getDependentXMLResource. */ - private static class XMLResource { - private final String name; - private final URL url; - private final Document document; - private final List depends; - - private XMLResource(URL url, String elName, String elDepends) - throws IOException{ - if (log.isDebugEnabled()) log.debug("Loading "+url); - try { - this.document = new SAXBuilder(false, false, true).build(url); - } catch (Exception ex) { - if (ex instanceof IOException) throw (IOException)ex; - if (ex instanceof RuntimeException) throw (RuntimeException)ex; - final IOException ioex = new IOException("Unable to load "+url); - ioex.initCause(ex); - throw ioex; - } - - this.url = url; - final Element root = this.document.getRootElement(); - this.name = IDOMs.getRequiredElementValue(root, elName); - final String deps = root.getElementValue(elDepends, true); - if (deps == null || deps.length() == 0) { - this.depends = Collections.emptyList(); - } else { - this.depends = new LinkedList(); - CollectionsX.parse(this.depends, deps, ','); - if (log.isTraceEnabled()) log.trace(this.name+" depends on "+this.depends); - } - } - public String toString() { - return "["+name+": "+url+" depends on "+depends+']'; - } - }; - - //-- Locator --// - /** Always returns null. - */ - public String getDirectory() { - return null; - } - public URL getResource(String name) { - if (Activator.getContext() != null) { - final URL url = Activator.getContext().getBundle().getResource(name); - if (url != null) return url; - } - final ClassLoader cl = Thread.currentThread().getContextClassLoader(); - final URL url = cl != null ? cl.getResource(resolveName(name)): null; - return url != null ? url: ClassLocator.class.getResource(name); - } - public InputStream getResourceAsStream(String name) { - final ClassLoader cl = Thread.currentThread().getContextClassLoader(); - final InputStream is = - cl != null ? cl.getResourceAsStream(resolveName(name)): null; - return is != null ? is: ClassLocator.class.getResourceAsStream(name); - } - private static String resolveName(String name) { - return name != null && name.startsWith("/") ? - name.substring(1): name; - } - - //-- Object --// - public int hashCode() { - return 1123; - } - public boolean equals(Object o) { - if (this == o) return true; - return o instanceof ClassLocator; - } -} diff --git a/org.zkoss.zk.library/src/org/zkoss/web/util/resource/ResourceCaches.java b/org.zkoss.zk.library/src/org/zkoss/web/util/resource/ResourceCaches.java deleted file mode 100644 index 903370a178..0000000000 --- a/org.zkoss.zk.library/src/org/zkoss/web/util/resource/ResourceCaches.java +++ /dev/null @@ -1,157 +0,0 @@ -/* ResourceCaches.java - - Purpose: - - Description: - - History: - Tue Aug 30 18:31:05 2005, Created by tomyeh - -Copyright (C) 2005 Potix Corporation. All Rights Reserved. - -{{IS_RIGHT - This program is distributed under LGPL Version 2.1 in the hope that - it will be useful, but WITHOUT ANY WARRANTY. -}}IS_RIGHT -*/ -package org.zkoss.web.util.resource; - -import java.io.File; -import java.io.IOException; -import java.net.URL; - -import javax.servlet.ServletContext; - -import org.slf4j.Logger; -import org.slf4j.LoggerFactory; -import org.zkoss.lang.SystemException; -import org.zkoss.web.servlet.Servlets; - -/** - * Utilities to load (and parse) the Servlet resource. - * Notice that {@link ResourceCache} and {@link ResourceLoader} - * must be used rather than - * {@link org.zkoss.util.resource.ResourceCache} - * and {@link org.zkoss.util.resource.Loader}. - * - *

Usage: - *

    - *
  1. Implements a loader by extending from {@link ResourceLoader}.
  2. - *
  3. Creates a resource cache ({@link ResourceCache}) - * by use of the loader in the previous step.
  4. - *
  5. Invoke {@link #get} to load the resource.
  6. - *
- * - * @author tomyeh - */ -public class ResourceCaches { - private static final Logger log = LoggerFactory.getLogger(ResourceCaches.class); - - /** Loads, parses and returns the resource of the specified URI, - * or null if not found. The parser is defined by the loader defined - * in {@link ResourceCache}. - * - * @param cache the resource cache. - * Note: its loader must extend from {@link ResourceLoader}. - * @param path the URI path - * @param extra the extra parameter that will be passed to - * {@link ResourceLoader#parse(String,File,Object)} and - * {@link ResourceLoader#parse(String,URL,Object)} - */ - public static final - V get(ResourceCache cache, ServletContext ctx, String path, Object extra) { - //20050905: Tom Yeh - //We don't need to handle the default name if user specifies only a dir - //because it is handled by the container directly - //And, web developer has to specify in web.xml - URL url = null; - if (path == null || path.length() == 0) path = "/"; - else if (path.charAt(0) != '/') { - if (path.indexOf("://") > 0) { - try { - url = new URL(path); - } catch (java.net.MalformedURLException ex) { - throw new SystemException(ex); - } - }else path = '/' + path; - } - - if (url == null) { - if (path.startsWith("/~")) { - final ServletContext ctx0 = ctx; - final String path0 = path; - final int j = path.indexOf('/', 2); - final String ctxpath; - if (j >= 0) { - ctxpath = "/" + path.substring(2, j); - path = path.substring(j); - } else { - ctxpath = "/" + path.substring(2); - path = "/"; - } - - final ExtendletContext extctx = - Servlets.getExtendletContext(ctx, ctxpath.substring(1)); - if (extctx != null) { - url = extctx.getResource(path); -// if (log.isDebugEnabled()) log.debug("Resolving "+path0+" to "+url); - if (url == null) - return null; - try { - return cache.get(new ResourceInfo(path, url, extra)); - } catch (Throwable ex) { - final IOException ioex = getIOException(ex); - if (ioex == null) - throw SystemException.Aide.wrap(ex); - log.warn("Unable to load "+url, ioex); - } - return null; - } - - ctx = ctx.getContext(ctxpath); - if (ctx == null) { //failed -// if (log.isDebugEnabled()) log.debug("Context not found: "+ctxpath); - ctx = ctx0; path = path0;//restore - } - } - - final String flnm = ctx.getRealPath(path); - if (flnm != null) { - File file = new File(flnm); - if (file.exists()) { - try { - return cache.get(new ResourceInfo(path, file, extra)); - //it is loader's job to check the existence - } catch (Throwable ex) { - final IOException ioex = getIOException(ex); - if (ioex == null) - throw SystemException.Aide.wrap(ex); - log.warn("Unable to load "+flnm, ioex); - } - return null; - } - } - } - - //try url because some server uses JAR format - try { - if (url == null) - url = ctx.getResource(path); - if (url != null) - return cache.get(new ResourceInfo(path, url, extra)); - } catch (Throwable ex) { - final IOException ioex = getIOException(ex); - if (ioex == null) - throw SystemException.Aide.wrap(ex); - log.warn("Unable to load "+path, ioex); - } - return null; - } - //don't eat exceptions other than IOException - private static IOException getIOException(Throwable ex) { - for (; ex != null; ex = ex.getCause()) - if (ex instanceof IOException) - return (IOException)ex; - return null; - } -} diff --git a/org.zkoss.zk.library/src/org/zkoss/zk/library/Activator.java b/org.zkoss.zk.library/src/org/zkoss/zk/library/Activator.java deleted file mode 100644 index cc8d9f66cb..0000000000 --- a/org.zkoss.zk.library/src/org/zkoss/zk/library/Activator.java +++ /dev/null @@ -1,30 +0,0 @@ -package org.zkoss.zk.library; - -import org.osgi.framework.BundleActivator; -import org.osgi.framework.BundleContext; - -public class Activator implements BundleActivator { - - private static BundleContext context; - - public static BundleContext getContext() { - return context; - } - - /* - * (non-Javadoc) - * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext) - */ - public void start(BundleContext bundleContext) throws Exception { - Activator.context = bundleContext; - } - - /* - * (non-Javadoc) - * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext) - */ - public void stop(BundleContext bundleContext) throws Exception { - Activator.context = null; - } - -} diff --git a/org.zkoss.zk.library/src/org/zkoss/zul/impl/CustomGridDataLoader.java b/org.zkoss.zk.library/src/org/zkoss/zul/impl/CustomGridDataLoader.java deleted file mode 100644 index 0b94c249c5..0000000000 --- a/org.zkoss.zk.library/src/org/zkoss/zul/impl/CustomGridDataLoader.java +++ /dev/null @@ -1,44 +0,0 @@ -/****************************************************************************** - * Copyright (C) 2014 TrekGlobal * - * 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 * - * by the Free Software Foundation. This program is distributed in the hope * - * that it will be useful, but WITHOUT ANY WARRANTY; without even the implied * - * warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. * - * See the GNU General Public License for more details. * - * You should have received a copy of the GNU General Public License along * - * with this program; if not, write to the Free Software Foundation, Inc., * - * 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA. * - *****************************************************************************/ -package org.zkoss.zul.impl; - -import org.zkoss.lang.Library; -import org.zkoss.zul.impl.GridDataLoader; - -/** - * @author hengsin - * - */ -public class CustomGridDataLoader extends GridDataLoader { - - public static final String GRID_DATA_LOADER_LIMIT = "org.zkoss.zul.grid.DataLoader.limit"; - - /** - * - */ - public CustomGridDataLoader() { - } - - /* (non-Javadoc) - * @see org.zkoss.zul.impl.GridDataLoader#getLimit() - */ - @Override - public int getLimit() { - String limit = Library.getProperty(GRID_DATA_LOADER_LIMIT); - if (limit != null) { - return Integer.parseInt(limit); - } - return super.getLimit(); - } - -} diff --git a/org.zkoss.zk.library/src/org/zkoss/zul/impl/GridDataLoader.java b/org.zkoss.zk.library/src/org/zkoss/zul/impl/GridDataLoader.java deleted file mode 100644 index 4fac26e3ef..0000000000 --- a/org.zkoss.zk.library/src/org/zkoss/zul/impl/GridDataLoader.java +++ /dev/null @@ -1,477 +0,0 @@ -/* GridDataLoader.java -{{IS_NOTE - Purpose: - - Description: - - History: - Oct 29, 2009 10:44:57 AM, Created by henrichen -}}IS_NOTE - -Copyright (C) 2009 Potix Corporation. All Rights Reserved. - -{{IS_RIGHT - This program is distributed under GPL Version 3.0 in the hope that - it will be useful, but WITHOUT ANY WARRANTY. -}}IS_RIGHT -*/ -package org.zkoss.zul.impl; - -import java.util.LinkedHashSet; -import java.util.Set; - -import org.zkoss.lang.Library; -import org.zkoss.lang.Objects; -import org.zkoss.xel.VariableResolver; -import org.zkoss.zk.ui.Component; -import org.zkoss.zk.ui.UiException; -import org.zkoss.zk.ui.util.ForEachStatus; -import org.zkoss.zk.ui.util.Template; -import org.zkoss.zk.ui.ext.render.Cropper; -import org.zkoss.zul.Grid; -import org.zkoss.zul.Group; -import org.zkoss.zul.GroupRendererExt; -import org.zkoss.zul.Groupfoot; -import org.zkoss.zul.Label; -import org.zkoss.zul.ListModel; -import org.zkoss.zul.Row; -import org.zkoss.zul.RowRenderer; -import org.zkoss.zul.RowRendererExt; -import org.zkoss.zul.Rows; -import org.zkoss.zul.event.ListDataEvent; -import org.zkoss.zul.ext.GroupingInfo; -import org.zkoss.zul.ext.Paginal; -import org.zkoss.zul.impl.GroupsListModel.GroupDataInfo; - -/** - * Generic {@link Grid} data loader. - * @author henrichen - * @since 5.0.0 - */ -public class GridDataLoader implements DataLoader, Cropper { - private Grid _grid; - - //--DataLoader--// - public void init(Component owner, int offset, int limit) { - _grid = (Grid) owner; - } - - public void reset() { - //do nothing - } - - final public Component getOwner() { - return _grid; - } - - public int getOffset() { - return 0; - } - - public int getLimit() { - String limit = Library.getProperty("org.zkoss.zul.grid.DataLoader.limit"); - if (limit != null) { - return Integer.parseInt(limit); - } - return 50; - } - - public int getTotalSize() { - final Rows rows = _grid.getRows(); - final ListModel model = _grid.getModel(); - return model != null ? model.getSize() : rows != null ? rows.getVisibleItemCount() : 0; - } - - private static int INVALIDATE_THRESHOLD = 10; - public void doListDataChange(ListDataEvent event) { - //when this is called _model is never null - final Rows rows = _grid.getRows(); - final int newsz = event.getModel().getSize(), oldsz = rows.getChildren().size(); - int min = event.getIndex0(), max = event.getIndex1(), cnt; - - switch (event.getType()) { - case ListDataEvent.INTERVAL_ADDED: - cnt = newsz - oldsz; - if (cnt <= 0) { - syncModel(-1, -1); //out of sync, force sync - return; - //throw new UiException("Adding causes a smaller list?"); - } - if ((oldsz <= 0 || cnt > INVALIDATE_THRESHOLD) - && !inPagingMold()) - rows.invalidate(); - //Invalidate rows to improve the performance since it is faster - //to remove a lot of individual rows. It is safer than invalidating - //the whole grid since header might have an input affecting the model - //(e.g., ZK-985: demo's data filter) - //The memory leak of IE is better with outer (Bug 3147518), - //and even better with _grid.invalidate() but better to solve ZK-985 - if (min < 0) - if (max < 0) min = 0; - else min = max - cnt + 1; - if (min > oldsz) min = oldsz; - - RowRenderer renderer = null; - final Component next = - min < oldsz ? rows.getChildren().get(min): null; - while (--cnt >= 0) { - if (renderer == null) - renderer = (RowRenderer) getRealRenderer(); - rows.insertBefore(newUnloadedItem(renderer, min++), next); - } - break; - - case ListDataEvent.INTERVAL_REMOVED: - cnt = oldsz - newsz; - if (cnt <= 0) { - syncModel(-1, -1); //out of sync, force sync - return; - //throw new UiException("Removal causes a larger list?"); - } - if ((newsz <= 0 || cnt > INVALIDATE_THRESHOLD) - && !inPagingMold()) - rows.invalidate(); - //Invalidate rows to improve the performance see above - - if (min >= 0) max = min + cnt - 1; - else if (max < 0) max = cnt - 1; //0 ~ cnt - 1 - if (max > oldsz - 1) max = oldsz - 1; - - //detach from end (due to groupfoot issue) - Component comp = rows.getChildren().get(max); - while (--cnt >= 0) { - Component p = comp.getPreviousSibling(); - comp.detach(); - comp = p; - } - break; - - default: //CONTENTS_CHANGED - syncModel(min, max < 0 ? -1 : (max - min + 1)); - } - } - - /** Creates a new and unloaded row. */ - protected Component newUnloadedItem(Object renderer, int index) { - final RowRenderer renderer0 = (RowRenderer) renderer; - final ListModel model = ((Grid)getOwner()).getModel(); - Row row = null; - if (model instanceof GroupsListModel ) { - final GroupsListModel gmodel = (GroupsListModel) model; - final GroupingInfo info = gmodel.getDataInfo(index); - switch(info.getType()){ - case GroupDataInfo.GROUP: - row = newGroup(renderer0); - ((Group)row).setOpen(info.isOpen()); - break; - case GroupDataInfo.GROUPFOOT: - row = newGroupfoot(renderer0); - break; - default: - row = newRow(renderer0); - } - }else{ - row = newRow(renderer0); - } - ((LoadStatus)row.getExtraCtrl()).setLoaded(false); - ((LoadStatus)row.getExtraCtrl()).setIndex(index); - - newUnloadedCell(renderer0, row); - return row; - } - - private Row newRow(RowRenderer renderer) { - Row row = null; - if (renderer instanceof RowRendererExt) - row = ((RowRendererExt)renderer).newRow((Grid)getOwner()); - if (row == null) { - row = new Row(); - row.applyProperties(); - } - return row; - } - private Group newGroup(RowRenderer renderer) { - Group group = null; - if (renderer instanceof GroupRendererExt) - group = ((GroupRendererExt)renderer).newGroup((Grid)getOwner()); - if (group == null) { - group = new Group(); - group.applyProperties(); - } - return group; - } - private Groupfoot newGroupfoot(RowRenderer renderer) { - Groupfoot groupfoot = null; - if (renderer instanceof GroupRendererExt) - groupfoot = ((GroupRendererExt)renderer).newGroupfoot((Grid)getOwner()); - if (groupfoot == null) { - groupfoot = new Groupfoot(); - groupfoot.applyProperties(); - } - return groupfoot; - } - private Component newUnloadedCell(RowRenderer renderer, Row row) { - Component cell = null; - if (renderer instanceof RowRendererExt) - cell = ((RowRendererExt)renderer).newCell(row); - - if (cell == null) { - cell = newRenderLabel(null); - cell.applyProperties(); - } - cell.setParent(row); - return cell; - } - /** Returns the label for the cell generated by the default renderer. - */ - private static Label newRenderLabel(String value) { - final Label label = - new Label(value != null && value.length() > 0 ? value: " "); - label.setPre(true); //to make sure   is generated, and then occupies some space - return label; - } - - public Object getRealRenderer() { - final RowRenderer renderer = _grid.getRowRenderer(); - return renderer != null ? renderer : _defRend; - } - private static final RowRenderer _defRend = new RowRenderer() { - public void render(final Row row, final Object data, final int index) { - final Rows rows = (Rows)row.getParent(); - final Grid grid = (Grid)rows.getParent(); - Template tm = getTemplate(grid, rows, "model"); - GroupingInfo info = null; - if (row instanceof Group) { - final Template tm2 = getTemplate(grid, rows, "model:group"); - if (tm2 != null) - tm = tm2; - if (grid.getModel() instanceof GroupsListModel) { - final GroupsListModel gmodel = (GroupsListModel)grid.getModel(); - info = gmodel.getDataInfo(index); - } - } else if (row instanceof Groupfoot) { - final Template tm2 = getTemplate(grid, rows, "model:groupfoot"); - if (tm2 != null) - tm = tm2; - } - if (tm == null) { - final Label label = newRenderLabel(Objects.toString(data)); - label.applyProperties(); - label.setParent(row); - row.setValue(data); - } else { - final GroupingInfo groupingInfo = info; - final Component[] items = tm.create(rows, row, - new VariableResolver() { - public Object resolveVariable(String name) { - if ("each".equals(name)) { - return data; - } else if ("forEachStatus".equals(name)) { - return new ForEachStatus() { - - public ForEachStatus getPrevious() { - return null; - } - - public Object getEach() { - return data; - } - - public int getIndex() { - return index; - } - - public Integer getBegin() { - return 0; - } - - public Integer getEnd() { - return grid.getModel().getSize(); - } - }; - } else if ("groupingInfo".equals(name)) { - return groupingInfo; - } else { - return null; - } - } - }, null); - if (items.length != 1) - throw new UiException("The model template must have exactly one row, not "+items.length); - - final Row nr = (Row)items[0]; - - //sync open state - if (nr instanceof Group && row instanceof Group) { - ((Group)nr).setOpen(((Group)row).isOpen()); - } - - if (nr.getValue() == null) //template might set it - nr.setValue(data); - row.setAttribute("org.zkoss.zul.model.renderAs", nr); - //indicate a new row is created to replace the existent one - row.detach(); - } - } - }; - private static Template getTemplate(Grid grid, Rows rows, String name) { - final Template tm = grid.getTemplate(name); - return tm != null ? tm: rows != null ? rows.getTemplate(name): null; - // Also allow model's template to be declared in Rows - } - - public void syncModel(int offset, int limit) { - int min = offset; - int max = offset + limit - 1; - - final ListModel model = _grid.getModel(); - Rows rows = _grid.getRows(); - final int newsz = model.getSize(); - final int oldsz = rows != null ? rows.getChildren().size(): 0; - final Paginal pgi = _grid.getPaginal(); - final boolean inPaging = inPagingMold(); - final boolean shallInvalidated = //Bug 3147518: avoid memory leak - (min < 0 || min == 0) && (max < 0 || max >= newsz || max >= oldsz); - - int newcnt = newsz - oldsz; - int atg = pgi != null ? _grid.getActivePage(): 0; - RowRenderer renderer = null; - Component next = null; - if (oldsz > 0) { - if (min < 0) min = 0; - else if (min > oldsz - 1) min = oldsz - 1; - if (max < 0) max = oldsz - 1; - else if (max > oldsz - 1) max = oldsz - 1; - if (min > max) { - int t = min; min = max; max = t; - } - - int cnt = max - min + 1; //# of affected - if (rows != null) { - if (model instanceof GroupsListModel) { - //detach all from end to front since groupfoot - //must be detached before group - newcnt += cnt; //add affected later - if ((shallInvalidated || newcnt > INVALIDATE_THRESHOLD) - && !inPaging) - rows.invalidate(); - //Invalidate rows to improve the performance see above - - Component comp = rows.getChildren().get(max); - next = comp.getNextSibling(); - while (--cnt >= 0) { - Component p = comp.getPreviousSibling(); - comp.detach(); - comp = p; - } - } else { //ListModel - int addcnt = 0; - Component row = rows.getChildren().get(min); - while (--cnt >= 0) { - next = row.getNextSibling(); - - if (cnt < -newcnt) { //if shrink, -newcnt > 0 - row.detach(); //remove extra - } else if (((LoadStatus)((Row)row).getExtraCtrl()).isLoaded()) { - if (renderer == null) - renderer = (RowRenderer)getRealRenderer(); - row.detach(); //always detach - rows.insertBefore(newUnloadedItem(renderer, min), next); - ++addcnt; - } - ++min; - row = next; - } - - if ((shallInvalidated || addcnt > INVALIDATE_THRESHOLD || addcnt + newcnt > INVALIDATE_THRESHOLD) - && !inPaging) - rows.invalidate(); - //Invalidate rows to improve the performance see above - } - } - } else { - min = 0; - - //auto create but it means ... will fail - if (rows == null) { - rows = new Rows(); - rows.setParent(_grid); - } - } - - for (; --newcnt >= 0; ++min) { - if (renderer == null) - renderer = (RowRenderer) getRealRenderer(); - rows.insertBefore(newUnloadedItem(renderer, min), next); - } - - if (pgi != null) { - if (atg >= pgi.getPageCount()) - atg = pgi.getPageCount() - 1; - pgi.setActivePage(atg); - if (pgi.getTotalSize() != newsz) - pgi.setTotalSize(newsz); //Bug ZK-1888 - Grid in paging mold doesn't change pages count - } - } - - protected boolean inPagingMold() { - return "paging".equals(_grid.getMold()); - } - - public void updateModelInfo() { - // do nothing - } - - public void setLoadAll(boolean b) { - //do nothing - } - - //--Cropper--// - public boolean isCropper() { - return _grid != null && - inPagingMold() - && _grid.getPageSize() <= getTotalSize(); - //Single page is considered as not a cropper. - //isCropper is called after a component is removed, so - //we have to test >= rather than > - } - - public Set getAvailableAtClient() { - if (!isCropper()) - return null; - - final Paginal pgi = _grid.getPaginal(); - int pgsz = pgi.getPageSize(); - int ofs = pgi.getActivePage() * pgsz; - return getAvailableAtClient(ofs, pgsz); - } - - protected Set getAvailableAtClient(int offset, int limit) { - final Set avail = new LinkedHashSet(32); - final Rows rows = _grid.getRows(); - Row row = (Row) rows.getFirstChild(); - while(row != null) { - if (limit == 0) break; - if (row.isVisible()) { - if (--offset < 0) { - --limit; - avail.add(row); - } - } - if (row instanceof Group) { - final Group g = (Group) row; - if (!g.isOpen()) { - for (int j = 0, len = g.getItemCount(); j < len && row != null; j++) - row = (Row) row.getNextSibling(); - } - } - if (row != null) - row = (Row) row.getNextSibling(); - } - return avail; - } - - public Component getCropOwner() { - return _grid; - } -}