Author: kono
Date: 2012-07-11 19:50:26 -0700 (Wed, 11 Jul 2012)
New Revision: 29850
Modified:
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/view/CytoPanelImp.java
Log:
Max and Min sizes of panels had been modified.
Modified:
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/view/CytoPanelImp.java
===================================================================
---
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/view/CytoPanelImp.java
2012-07-11 23:23:53 UTC (rev 29849)
+++
core3/impl/trunk/swing-application-impl/src/main/java/org/cytoscape/internal/view/CytoPanelImp.java
2012-07-12 02:50:26 UTC (rev 29850)
@@ -99,9 +99,11 @@
private static final int WEST_MIN_HEIGHT = 500;
private static final int SOUTH_MIN_WIDTH = 500;
private static final int SOUTH_MIN_HEIGHT = 50;
+
private static final int EAST_MIN_WIDTH = 100;
- private static final int EAST_MAX_WIDTH = 500;
+ private static final int EAST_MAX_WIDTH = 1500;
private static final int EAST_MIN_HEIGHT = 100;
+ private static final int EAST_MAX_HEIGHT = 600;
/**
* The JTabbedPane we hide.
@@ -542,9 +544,10 @@
if (panel.getSize().width == 0 &&
panel.getSize().height == 0)
return;
- if (panel.getPreferredSize() != null)
+ if (panel.getPreferredSize() != null) {
width = panel.getPreferredSize().width;
-
+ }
+
if (compassDirection == CytoPanelName.WEST) {
if (width > WEST_MAX_WIDTH)
width = WEST_MAX_WIDTH;
@@ -556,6 +559,7 @@
width = EAST_MAX_WIDTH;
else if (width < EAST_MIN_WIDTH)
width = EAST_MIN_WIDTH;
+
jsp.setDividerLocation(jsp.getSize().width
-jsp.getInsets().right
-jsp.getInsets().left
@@ -728,7 +732,12 @@
// Add CytoPanel to the New External Frame
Container contentPane = externalFrame.getContentPane();
contentPane.add(this, BorderLayout.CENTER);
- externalFrame.setSize(this.getSize());
+ final Dimension windowSize =
this.getSelectedComponent().getPreferredSize();
+
+ int height = windowSize.height;
+ if(height>EAST_MAX_HEIGHT)
+ windowSize.height = EAST_MAX_HEIGHT;
+ externalFrame.setSize(windowSize);
externalFrame.validate();
// set proper title of frame
@@ -740,7 +749,7 @@
// set float label text
floatLabel.setText("");
-
+
// set location of external frame
setLocationOfExternalFrame(externalFrame);
// lets show it
--
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.