Author: scooter
Date: 2011-08-04 13:40:57 -0700 (Thu, 04 Aug 2011)
New Revision: 26378
Modified:
cytoscape/trunk/application/src/main/java/cytoscape/view/cytopanels/CytoPanelImp.java
Log:
Fix bogus logic in Cytopanel divider location calculation.
Modified:
cytoscape/trunk/application/src/main/java/cytoscape/view/cytopanels/CytoPanelImp.java
===================================================================
---
cytoscape/trunk/application/src/main/java/cytoscape/view/cytopanels/CytoPanelImp.java
2011-08-04 20:07:44 UTC (rev 26377)
+++
cytoscape/trunk/application/src/main/java/cytoscape/view/cytopanels/CytoPanelImp.java
2011-08-04 20:40:57 UTC (rev 26378)
@@ -992,12 +992,21 @@
// the last panel
if (panel != null && cytoPanelContainer
instanceof JSplitPane) {
int width =
panel.getPreferredSize().width;
- if (compassDirection ==
SwingConstants.WEST && width > WEST_MAX_WIDTH)
- width = WEST_MAX_WIDTH;
- else if (compassDirection ==
SwingConstants.EAST && width > EAST_MAX_WIDTH)
- width = EAST_MAX_WIDTH;
+ JSplitPane jsp =
(JSplitPane)cytoPanelContainer;
-
((JSplitPane)cytoPanelContainer).setDividerLocation(width);
+ if (compassDirection ==
SwingConstants.WEST) {
+ if (width >
WEST_MAX_WIDTH)
+ width =
WEST_MAX_WIDTH;
+
jsp.setDividerLocation(width+jsp.getInsets().left);
+ } else if (compassDirection ==
SwingConstants.EAST) {
+ if (width >
EAST_MAX_WIDTH)
+ width =
EAST_MAX_WIDTH;
+
jsp.setDividerLocation(jsp.getSize().width
+
-jsp.getInsets().right
+
-jsp.getDividerSize()
+
-width);
+ }
+ // TODO: What's the right thing
to do with SOUTH?
}
int selectedIndex =
tabbedPane.getSelectedIndex();
--
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.