changeset 219:d17b410682ad

Unhide components for setting cache size limit in itw-settings
author Andrew Su <asu@redhat.com>
date Wed, 20 Apr 2011 10:44:58 -0400
parents bc48727cfc1a
children 6e89f860a35a
files ChangeLog netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java
diffstat 2 files changed, 24 insertions(+), 20 deletions(-) [+]
line wrap: on
line diff
--- a/ChangeLog	Wed Apr 20 09:26:50 2011 -0400
+++ b/ChangeLog	Wed Apr 20 10:44:58 2011 -0400
@@ -1,3 +1,9 @@
+2011-04-20  Andrew Su  <asu@redhat.com>
+
+	* netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java:
+	(addComponents): Uncommented lines of code to reintroduce components
+	to handle setting cache size limit.
+
 2011-04-20  Andrew Su  <asu@redhat.com>
 
 	* netx/net/sourceforge/jnlp/cache/CacheUtil.java:
--- a/netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java	Wed Apr 20 09:26:50 2011 -0400
+++ b/netx/net/sourceforge/jnlp/controlpanel/TemporaryInternetFilesPanel.java	Wed Apr 20 10:44:58 2011 -0400
@@ -151,17 +151,15 @@
             }
         });
 
-        // TODO: This property is currently not honored, uncomment to enable when it is implemented.
-        // This is to work with how much space is available for caching.
-        // JLabel lCacheSize = new JLabel(Translator.R("TIFPCacheSize") + ":");
-        // slCacheSize = new JSlider(minSize, maxSize, Integer.parseInt(this.config.getProperty(properties[2])));
-        // slCacheSize.setMinorTickSpacing(50);
-        // slCacheSize.setPaintTicks(true);
-        // SpinnerNumberModel snmCacheSize = new SpinnerNumberModel(Integer.parseInt(this.config.getProperty(properties[2])), minSize, maxSize, 1);
-        // spCacheSize = new JSpinner(snmCacheSize);
-        //
-        // slCacheSize.addChangeListener(this);
-        // spCacheSize.addChangeListener(this);
+        JLabel lCacheSize = new JLabel(Translator.R("TIFPCacheSize") + ":");
+        slCacheSize = new JSlider(minSize, maxSize, Integer.parseInt(this.config.getProperty(properties[2])));
+        slCacheSize.setMinorTickSpacing(50);
+        slCacheSize.setPaintTicks(true);
+        SpinnerNumberModel snmCacheSize = new SpinnerNumberModel(Integer.parseInt(this.config.getProperty(properties[2])), minSize, maxSize, 1);
+        spCacheSize = new JSpinner(snmCacheSize);
+
+        slCacheSize.addChangeListener(this);
+        spCacheSize.addChangeListener(this);
 
         c.gridy = 0;
         c.gridx = 0;
@@ -170,16 +168,16 @@
         c.gridx = 1;
         c.weightx = 0;
         diskSpacePanel.add(cbCompression, c);
-        // c.gridy = 1;
-        // c.gridx = 0;
-        // c.gridwidth = GridBagConstraints.REMAINDER;
+        c.gridy = 1;
+        c.gridx = 0;
+        c.gridwidth = GridBagConstraints.REMAINDER;
         c.weightx = 1;
-        // diskSpacePanel.add(lCacheSize, c);
-        // c.gridwidth = 1;
-        // c.gridy = 2;
-        // diskSpacePanel.add(slCacheSize, c);
-        // c.gridx = 1;
-        // diskSpacePanel.add(spCacheSize, c);
+        diskSpacePanel.add(lCacheSize, c);
+        c.gridwidth = 1;
+        c.gridy = 2;
+        diskSpacePanel.add(slCacheSize, c);
+        c.gridx = 1;
+        diskSpacePanel.add(spCacheSize, c);
 
         JPanel buttonDeleteRestore = new JPanel(new FlowLayout(FlowLayout.TRAILING));
         JButton bViewFiles = new JButton(Translator.R("TIFPViewFiles"));