Author: rozagh
Date: 2012-06-25 16:47:43 -0700 (Mon, 25 Jun 2012)
New Revision: 29688

Modified:
   
core3/impl/trunk/work-swing-impl/impl/src/main/java/org/cytoscape/work/internal/tunables/JPanelTunableMutator.java
Log:
fixes #1169 adding a repacking function when collapsible panel is expanded or 
collapsed.

Modified: 
core3/impl/trunk/work-swing-impl/impl/src/main/java/org/cytoscape/work/internal/tunables/JPanelTunableMutator.java
===================================================================
--- 
core3/impl/trunk/work-swing-impl/impl/src/main/java/org/cytoscape/work/internal/tunables/JPanelTunableMutator.java
  2012-06-25 23:46:17 UTC (rev 29687)
+++ 
core3/impl/trunk/work-swing-impl/impl/src/main/java/org/cytoscape/work/internal/tunables/JPanelTunableMutator.java
  2012-06-25 23:47:43 UTC (rev 29688)
@@ -257,7 +257,7 @@
         * if it is requested, or a simple one if not
         */
        private JPanel createJPanel(final String title, final GUITunableHandler 
gh, 
-                                   final Boolean vertical, final Boolean 
displayed) {
+                       final Boolean vertical, final Boolean displayed) {
                if (gh == null)
                        return createSimplePanel(title, vertical, displayed);
 
@@ -271,13 +271,12 @@
                                final BasicCollapsiblePanel cp = new 
BasicCollapsiblePanel(title);
                                if 
(displayState.equalsIgnoreCase("uncollapsed"))
                                        cp.setCollapsed(false); 
+                       
                                cp.addPropertyChangeListener(new 
PropertyChangeListener() {
-                                       
                                        @Override
                                        public void 
propertyChange(PropertyChangeEvent arg0) {
                                                repackEnclosingDialog();
                                        }
-                                       
                                        /**
                                         * Attempts to locate the instance of 
the enclosing JDialog.  If successful we will call the pack() method on it.
                                         */
@@ -289,9 +288,10 @@
                                                        
((JDialog)container).pack();
                                        }
                                });
+                               
                                return cp;
 
-                       // We're not collapsable, so return a normal jpanel
+                               // We're not collapsable, so return a normal 
jpanel
                        } else {
                                return createSimplePanel(title, vertical, 
displayed);
                        }

-- 
You received this message because you are subscribed to the Google Groups 
"cytoscape-cvs" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/cytoscape-cvs?hl=en.

Reply via email to