Skip to content

Commit

Permalink
Merge branch 'develop' of github.com:knime-mpicbg/knime-scripting int…
Browse files Browse the repository at this point in the history
…o develop

synchronizing...
  • Loading branch information
fmeyenhofer committed Feb 24, 2015
2 parents cb6aa1f + 62cca7a commit 193d831
Show file tree
Hide file tree
Showing 10 changed files with 52 additions and 1,275 deletions.
2 changes: 1 addition & 1 deletion de.mpicbg.knime.scripting.core/.classpath
Original file line number Diff line number Diff line change
Expand Up @@ -11,13 +11,13 @@
<classpathentry exported="true" kind="lib" path="lib/jakarta-oro-2.0.8.jar"/>
<classpathentry exported="true" kind="lib" path="lib/jakarta-regexp.jar"/>
<classpathentry exported="true" kind="lib" path="lib/log4j-1.2.15.jar"/>
<classpathentry exported="true" kind="lib" path="lib/RGG.jar"/>
<classpathentry exported="true" kind="lib" path="lib/swing-layout-1.0.3.jar"/>
<classpathentry exported="true" kind="lib" path="lib/swing-worker-1.1.jar"/>
<classpathentry exported="true" kind="lib" path="lib/swingx-0.9.2.jar"/>
<classpathentry exported="true" kind="lib" path="lib/xercesImpl.jar"/>
<classpathentry exported="true" kind="lib" path="lib/xml-apis.jar"/>
<classpathentry kind="con" path="org.eclipse.pde.core.requiredPlugins"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER/org.eclipse.jdt.internal.debug.ui.launcher.StandardVMType/JavaSE-1.7"/>
<classpathentry kind="lib" path="lib/RGG.jar" sourcepath="/Users/niederle/knimeInDev/git-repositories/rgg/src"/>
<classpathentry kind="output" path="bin"/>
</classpath>
Binary file modified de.mpicbg.knime.scripting.core/lib/RGG.jar
Binary file not shown.

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
/**
*
*/
package de.mpicbg.knime.scripting.core;

import java.awt.CardLayout;
import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.Insets;

/**
* @author niederle
*
*/
public class ResizableCardLayout extends CardLayout {

/**
* adapts preferred size to content of current visible component
*/
@Override
public Dimension preferredLayoutSize(Container parent) {
Component current = findCurrentComponent(parent);
if (current != null) {
Insets insets = parent.getInsets();
Dimension pref = current.getPreferredSize();
pref.width += insets.left + insets.right;
pref.height += insets.top + insets.bottom;
return pref;
}
return super.preferredLayoutSize(parent);
}

/**
* retrieves the currently visible component
* @param parent
* @return
*/
private Component findCurrentComponent(Container parent) {
for (Component comp : parent.getComponents()) {
if (comp.isVisible()) {
return comp;
}
}
return null;
}

}
Loading

0 comments on commit 193d831

Please sign in to comment.