]> source.dussan.org Git - vaadin-framework.git/commitdiff
Fixed a lot of warns about unused code
authorJoonas Lehtinen <joonas.lehtinen@itmill.com>
Wed, 27 Dec 2006 15:39:00 +0000 (15:39 +0000)
committerJoonas Lehtinen <joonas.lehtinen@itmill.com>
Wed, 27 Dec 2006 15:39:00 +0000 (15:39 +0000)
svn changeset:166/svn branch:toolkit

src/com/itmill/toolkit/terminal/web/AjaxApplicationManager.java
src/com/itmill/toolkit/terminal/web/AjaxPaintTarget.java
src/com/itmill/toolkit/terminal/web/JarThemeSource.java
src/com/itmill/toolkit/terminal/web/ServletThemeSource.java
src/com/itmill/toolkit/terminal/web/Theme.java
src/com/itmill/toolkit/terminal/web/UIDLTransformerFactory.java
src/com/itmill/toolkit/terminal/web/WebPaintTarget.java

index d54a824e800f70b232c5db54253c9093d2fb18bd..4b21f699bebbfbd06eae4cbfa4ab8756c36000d7 100644 (file)
@@ -69,12 +69,8 @@ import com.itmill.toolkit.ui.Window;
 public class AjaxApplicationManager implements Paintable.RepaintRequestListener,
         Application.WindowAttachListener, Application.WindowDetachListener {
 
-    private static String GET_PARAM_VARIABLE_CHANGES = "changeVariables";
-
     private static String GET_PARAM_REPAINT_ALL = "repaintAll";
 
-    private static String GET_PARAM_UI_CHANGES_FORMAT = "format";
-
     private static int DEFAULT_BUFFER_SIZE = 32 * 1024;
 
     private static int MAX_BUFFER_SIZE = 64 * 1024;
index 5d5598bb40998aa2a95edd42544a0fdb66e2650b..62183609bf2b84ffb9df1503f8cc8f7e6aa78658 100644 (file)
@@ -59,19 +59,12 @@ public class AjaxPaintTarget implements PaintTarget {
     /* Document type declarations */
     private final static String UIDL_XML_DECL = "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
 
-    private final static String UIDL_DOCTYPE_DECL = "<!DOCTYPE uidl PUBLIC \"-//MILLSTONE//DTD UIDL//EN\" \"http://millstone.org/xml/3.0/UIDL.dtd\">";
-
-    /* commonly used tags and argument names */
-    private final static String UIDL_TAG_VARIABLE = "var";
-
     private final static String UIDL_ARG_NAME = "name";
 
     private final static String UIDL_ARG_VALUE = "value";
 
     private final static String UIDL_ARG_ID = "id";
 
-    private final static String UIDL_ARG_TYPE = "type";
-
     private Stack mOpenTags;
 
     private boolean mTagArgumentListOpen;
@@ -82,11 +75,7 @@ public class AjaxPaintTarget implements PaintTarget {
 
     private boolean closed = false;
 
-    private OutputStream output;
-
     private AjaxApplicationManager manager; 
-
-    private String paintableId;
     
     private boolean trackPaints = false;
     
@@ -108,9 +97,6 @@ public class AjaxPaintTarget implements PaintTarget {
         // Set the variable map
         this.variableMap = variableMap;
 
-        // Set the output stream
-        this.output = output;
-
         // Set the target for UIDL writing
         try {
             this.uidlBuffer = new PrintWriter(new BufferedWriter(new OutputStreamWriter(output,"UTF-8")));
index 05b47f077bdc22126c3f08a58a21ab05d20e19f1..4db464f3f1b6aeba4f33f29b8815b0042ec7005f 100644 (file)
@@ -299,7 +299,7 @@ public class JarThemeSource implements ThemeSource {
                public void put(Object key, Object value) {
                        data.put(
                                key,
-                               new SoftReference(new CacheItem(value, key.toString())));
+                               new SoftReference(new CacheItem(value)));
                }
 
                public Object get(Object key) {
@@ -322,10 +322,8 @@ public class JarThemeSource implements ThemeSource {
        private class CacheItem {
 
                private Object data;
-               private String name;
 
-               public CacheItem(Object data, String name) {
-                       this.name = name;
+               public CacheItem(Object data) {
                        this.data = data;
                }
 
@@ -335,7 +333,6 @@ public class JarThemeSource implements ThemeSource {
 
                public void finalize() throws Throwable {
                        this.data = null;
-                       this.name = null;
                        super.finalize();
                }
 
index efbadea86297a916fc3be56d3db841067becb37a..2da70f65c2d1937d9237b30c7a22843cdaee172f 100644 (file)
@@ -60,7 +60,6 @@ public class ServletThemeSource implements ThemeSource {
        private Cache resourceCache = new Cache();
 
        /** Collection of subdirectory entries */
-       private Collection subdirs = new LinkedList();
        private URL descFile;
 
        /** Creates a new instance of ThemeRepository by reading the themes
@@ -274,7 +273,7 @@ public class ServletThemeSource implements ThemeSource {
                public void put(Object key, Object value) {
                        data.put(
                                key,
-                               new SoftReference(new CacheItem(value, key.toString())));
+                               new SoftReference(new CacheItem(value)));
                }
 
                public Object get(Object key) {
@@ -297,10 +296,8 @@ public class ServletThemeSource implements ThemeSource {
        private class CacheItem {
 
                private Object data;
-               private String name;
 
-               public CacheItem(Object data, String name) {
-                       this.name = name;
+               public CacheItem(Object data) {
                        this.data = data;
                }
 
@@ -310,7 +307,6 @@ public class ServletThemeSource implements ThemeSource {
 
                public void finalize() throws Throwable {
                        this.data = null;
-                       this.name = null;
                        super.finalize();
                }
 
index ba1eedea9c10dc12d20dcd1e84c3b14cd3f81b12..d3860b5f98e7bc587516fbfcbde0439a03bb7530 100644 (file)
@@ -138,8 +138,6 @@ public class Theme extends DefaultHandler {
        /** Name of the theme. */
        private String name;
 
-       /** Description file. */
-       private java.io.File file;
 
        /** Version of the theme. */
        private String version;
@@ -174,7 +172,6 @@ public class Theme extends DefaultHandler {
         *  @throws FileNotFoundException Thrown if the given file is not found.
         */
        public Theme(java.io.File descriptionFile) throws FileNotFoundException {
-               this.file = descriptionFile;
                parse(new InputSource(new FileInputStream(descriptionFile)));
        }
 
@@ -838,11 +835,6 @@ public class Theme extends DefaultHandler {
                        this.files.add(file);
                }
 
-               /** Remove a file from fileset. */
-               private void removeFile(File file) {
-                       this.files.add(file);
-               }
-
                /** Get requirements in this fileset. */
                private RequirementCollection getRequirements() {
                        return this.requirements;
@@ -952,4 +944,9 @@ public class Theme extends DefaultHandler {
                return version;
        }
 
+       /** Get theme description */
+       public String getDescription() {
+               return description;
+       }
+
 }
index 557b42e4e40db9bb7589a9a09ae84605923f2d4b..b0c9e2874ca159407a1101cf16a4060aeb2cfdfb 100644 (file)
@@ -170,7 +170,7 @@ public class UIDLTransformerFactory {
 
                        // Create new list, if not found
                        if (list == null) {
-                               list = new TransformerList(type);
+                               list = new TransformerList();
                                this.transformerSpool.put(type, list);
                                if (webAdapterServlet.isDebugMode()) {
                                        Log.info("Created new type: " + type);
@@ -225,14 +225,9 @@ public class UIDLTransformerFactory {
 
        private class TransformerList {
 
-               private UIDLTransformerType type = null;
                private LinkedList list = new LinkedList();
                private long lastUsed = 0;
 
-               public TransformerList(UIDLTransformerType type) {
-                       this.type = type;
-               }
-
                public void add(UIDLTransformer transformer) {
                        list.add(transformer);
                }
index 7d0450ab0b500a6c229a3cd2e117fafa6e45e2d6..aba975befef23e60322be25370c84b48ae8cff17 100644 (file)
@@ -51,14 +51,10 @@ public class WebPaintTarget implements PaintTarget {
        /* Document type declarations */
        private final static String UIDL_XML_DECL =
                "<?xml version=\"1.0\" encoding=\"UTF-8\"?>";
-       private final static String UIDL_DOCTYPE_DECL =
-               "<!DOCTYPE uidl PUBLIC \"-//MILLSTONE//DTD UIDL//EN\" \"http://millstone.org/xml/3.0/UIDL.dtd\">";
        /* commonly used tags and argument names */
-       private final static String UIDL_TAG_VARIABLE = "var";
        private final static String UIDL_ARG_NAME = "name";
        private final static String UIDL_ARG_VALUE = "value";
        private final static String UIDL_ARG_ID = "id";
-       private final static String UIDL_ARG_TYPE = "type";
        private Stack mOpenTags;
        private boolean mTagArgumentListOpen;
        private StringBuffer uidlBuffer;