Commit 1bfd7af3 authored by Philipp Spohr's avatar Philipp Spohr
Browse files

Fix for width?

parent 3ae8a0a3
......@@ -44,6 +44,7 @@ import javax.swing.JPanel;
import javax.swing.JTabbedPane;
import javax.swing.LayoutStyle;
import javax.swing.SwingConstants;
import javax.swing.SwingUtilities;
import org.cytoscape.application.swing.CytoPanelComponent;
import org.cytoscape.application.swing.CytoPanelName;
......@@ -84,9 +85,6 @@ NetworkAboutToBeDestroyedListener
//MACRO
//TODO: (Nächstes Leben) find a good solution with Swing that scales the panel and respects layout
private static final int HACKFIX_FIXED_WIDTH = 128+256;
private final JTabbedPane tabbedPane;
private final JButton destroyButton;
......@@ -183,7 +181,7 @@ NetworkAboutToBeDestroyedListener
horizontalGroup
.addComponent(marker,DEFAULT_SIZE,DEFAULT_SIZE,DEFAULT_SIZE)
.addComponent(invalidLabel,DEFAULT_SIZE, PREFERRED_SIZE,Short.MAX_VALUE)
.addComponent(tabbedPane,HACKFIX_FIXED_WIDTH, PREFERRED_SIZE,Short.MAX_VALUE)
.addComponent(tabbedPane,DEFAULT_SIZE, PREFERRED_SIZE,Short.MAX_VALUE)
.addComponent(destroyButton,DEFAULT_SIZE, DEFAULT_SIZE,DEFAULT_SIZE);
verticalGroup
.addComponent(marker,DEFAULT_SIZE,DEFAULT_SIZE,PREFERRED_SIZE)
......@@ -195,9 +193,14 @@ NetworkAboutToBeDestroyedListener
layout.setAutoCreateGaps(true);
layout.setAutoCreateContainerGaps(true);
//SWING BLACK MAGIC FOR ADEPTS
this.setMinimumSize(new Dimension(HACKFIX_FIXED_WIDTH,this.getMinimumSize().height));
SwingUtilities.invokeLater(new Runnable() {
@Override
public void run() {
revalidate();
}
});
this.setLayout(layout);
registerAllListeners();
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment