@@ -0,0 +1,1554 @@
+/*%0A * @@COPYRIGHT@@%0A */%0Apackage com.cosylab.gui.components.wheelswitch;%0A%0Aimport java.awt.Component;%0Aimport java.awt.Container;%0Aimport java.awt.Dimension;%0Aimport java.awt.LayoutManager;%0A%0A/**%0A * Implementation of %3Ccode%3Ejava.awt.LayoutManager%3C/code%3E to be used for%0A * %3Ccode%3EUpDownButton%3C/code%3E layout.%0A * %0A * @author %3Ca href=%22mailto:jernej.kamenik@cosylab.com%22%3EJernej Kamenik%3C/a%3E%0A * @version $id$%0A */%0Apublic class UpDownLayout implements LayoutManager %7B%0A%09%0A%09/**%0A%09 * @see LayoutManager#addLayoutComponent(String, Component)%0A%09 */%0A%09public void addLayoutComponent(String name, Component comp) %7B%0A%09%7D%0A%0A%09/**%0A%09 * @see LayoutManager#removeLayoutComponent(Component)%0A%09 */%0A%09public void removeLayoutComponent(Component comp) %7B%7D%0A%0A%09/**%0A%09 * @see LayoutManager#preferredLayoutSize(Container)%0A%09 */%0A%09public Dimension preferredLayoutSize(Container parent) %7B%0A%09%09return parent.getPreferredSize();%0A%09%7D%0A%0A%09/**%0A%09 * @see LayoutManager#minimumLayoutSize(Container)%0A%09 */%0A%09public Dimension minimumLayoutSize(Container parent) %7B%0A%09%09return parent.getMinimumSize();%0A%09%7D%0A%0A%09/**%0A%09 * @see LayoutManager#layoutContainer(Container)%0A%09 */%0A%09public void layoutContainer(Container parent) %7B%0A%09%09UpDownButton upDownButton = (UpDownButton)parent;;%0A%09%09if (upDownButton==null %7C%7C upDownButton.getComponentCount()!=2) return;%09%09%0A%09%09int height = upDownButton.getHeight();%0A%09%09int width = upDownButton.getWidth();%0A%09%09%0A%09%09upDownButton.getComponent(0).setBounds(0,0,width,Math.round(height/2f)+1);%09%09%09%0A%09%09upDownButton.getComponent(1).setBounds(0,Math.round(height/2f)-1,width,height/2+1);%09%09%09%0A%09%09upDownButton.revalidate();%0A%09%7D%09%0A%7D%0A

Add dependency 'UpDownLayout'.