/*
 * @@COPYRIGHT@@
 */
package xal.tools.swing.wheelswitch;

import java.awt.Component;
import java.awt.Container;
import java.awt.Dimension;
import java.awt.LayoutManager;

/**
 * Implementation of <code>java.awt.LayoutManager</code> to be used for
 * <code>UpDownButton</code> layout.
 * 
 * @author <a href="mailto:jernej.kamenik@cosylab.com">Jernej Kamenik</a>
 * @version $id$
 */
public class UpDownLayout implements LayoutManager {
	
	/**
	 * @see LayoutManager#addLayoutComponent(String, Component)
	 */
	public void addLayoutComponent(String name, Component comp) {
	}

	/**
	 * @see LayoutManager#removeLayoutComponent(Component)
	 */
	public void removeLayoutComponent(Component comp) {}

	/**
	 * @see LayoutManager#preferredLayoutSize(Container)
	 */
	public Dimension preferredLayoutSize(Container parent) {
		return parent.getPreferredSize();
	}

	/**
	 * @see LayoutManager#minimumLayoutSize(Container)
	 */
	public Dimension minimumLayoutSize(Container parent) {
		return parent.getMinimumSize();
	}

	/**
	 * @see LayoutManager#layoutContainer(Container)
	 */
	public void layoutContainer(Container parent) {
		UpDownButton upDownButton = (UpDownButton)parent;;
		if (upDownButton==null || upDownButton.getComponentCount()!=2) return;		
		int height = upDownButton.getHeight();
		int width = upDownButton.getWidth();
		
		upDownButton.getComponent(0).setBounds(0,0,width,Math.round(height/2f)+1);			
		upDownButton.getComponent(1).setBounds(0,Math.round(height/2f)-1,width,height/2+1);			
		upDownButton.revalidate();
	}	
}

@@ -498,32 +498,46 @@
 Component)%0A%09 */%0A
+    @Override%0A
 %09public void add
@@ -649,24 +649,38 @@
 onent)%0A%09 */%0A
+    @Override%0A
 %09public void
@@ -778,32 +778,46 @@
 Container)%0A%09 */%0A
+    @Override%0A
 %09public Dimensio
@@ -952,32 +952,46 @@
 Container)%0A%09 */%0A
+    @Override%0A
 %09public Dimensio
@@ -1128,16 +1128,30 @@
 r)%0A%09 */%0A
+    @Override%0A
 %09public 
@@ -1191,16 +1191,16 @@
 rent) %7B%0A
+
 %09%09UpDown
@@ -1242,17 +1242,16 @@
 )parent;
-;
 %0A%09%09if (u

Fix trivial warnings in 'UpDownLayout' class.