Index: applications/editors/josm/plugins/smed/plugs/harbour/src/harbour/panels/PanelLimits.java
===================================================================
--- applications/editors/josm/plugins/smed/plugs/harbour/src/harbour/panels/PanelLimits.java	(revision 24451)
+++ applications/editors/josm/plugins/smed/plugs/harbour/src/harbour/panels/PanelLimits.java	(revision 24460)
@@ -2,6 +2,6 @@
 
 import harbour.widgets.LightTile;
-import harbour.widgets.TextFieldEx;
-import harbour.widgets.TextFieldEx.Ssize;
+import harbour.widgets.SizePanel;
+// import harbour.widgets.SizePanel.Ssize;
 import harbour.widgets.TristateCheckBox;
 
@@ -10,5 +10,4 @@
 
 import java.awt.Color;
-import java.awt.GridBagLayout;
 import java.awt.Dimension;
 import javax.swing.JLabel;
@@ -17,4 +16,5 @@
 import java.awt.Font;
 
+import javax.swing.ButtonGroup;
 import javax.swing.Icon;
 import javax.swing.JTextField;
@@ -23,9 +23,9 @@
 import javax.swing.JButton;
 import javax.swing.ImageIcon;
-import java.awt.Button;
 
 
 public class PanelLimits extends JPanel {
 
+	private ButtonGroup buttons = new ButtonGroup();
 	private JLabel limLabel = null;
 	private JCheckBox tideCheckBox = null;
@@ -44,5 +44,8 @@
 	private JCheckBox etaCheckBox = null;
 	private JPanel exPanel = null;
-	
+	private JLabel unitLabel = null;
+	private JRadioButton meterRadioButton = null;
+	private JRadioButton feetRadioButton = null;
+		
 	public PanelLimits() {
 		super();
@@ -55,6 +58,10 @@
 	 */
 	private void initialize() {
+        unitLabel = new JLabel();
+        unitLabel.setBounds(new Rectangle(235, 53, 50, 20));
+        unitLabel.setFont(new Font("Dialog", Font.PLAIN, 12));
+        unitLabel.setText("Einheit:");
         grLabel = new JLabel();
-        grLabel.setBounds(new Rectangle(215, 222, 80, 16));
+        grLabel.setBounds(new Rectangle(213, 242, 80, 16));
         grLabel.setFont(new Font("Dialog", Font.PLAIN, 12));
         grLabel.setText("Ankergrund");
@@ -86,4 +93,10 @@
         this.add(getAllComboBox(), null);
         this.add(getExPanel(), null);
+        this.add(unitLabel, null);
+        this.add(getMeterRadioButton(), null);
+        this.add(getFeetRadioButton(), null);
+        
+        buttons.add(feetRadioButton);
+        buttons.add(meterRadioButton);
 	}
 
@@ -169,31 +182,47 @@
 		if (allComboBox == null) {
 			allComboBox = new JComboBox();
-			allComboBox.setBounds(new Rectangle(135, 70, 190, 20));
+			allComboBox.setBounds(new Rectangle(135, 83, 190, 20));
 			allComboBox.setFont(new Font("Dialog", Font.PLAIN, 12));
 			allComboBox.addActionListener(new java.awt.event.ActionListener() {
 				public void actionPerformed(java.awt.event.ActionEvent e) {
+					
+					if(((SizePanel) exPanel).selTextField == null ) return;
 					int type = allComboBox.getSelectedIndex();
-					Ssize sType = ((TextFieldEx) exPanel).getSizeType();
-					if(sType == TextFieldEx.VS_SIZE ) {
+					if(type < 0) return;
+					
+					((SizePanel) exPanel).selTextField.setIndex(type, false);
+					/*
+					Ssize sType = ((SizePanel) exPanel).getSizeType();
+					if(sType == SizePanel.VS_SIZE ) {
 						switch (type) {
-							case TextFieldEx.NOT_SELECTED:
-								if(((TextFieldEx) exPanel).selTextField != null ) ((TextFieldEx) exPanel).selTextField.setText("");
+							case SizePanel.NOT_SELECTED:
+								((SizePanel) exPanel).selTextField.setText("");
 								break;
 
-							case TextFieldEx.LARGE:
-								((TextFieldEx) exPanel).selTextField.setText("> 500ft");
+							case SizePanel.UNKNOWN:
+								((SizePanel) exPanel).selTextField.setText("unbekannt");
 								break;
-								
-							case TextFieldEx.MEDIUM:
-								((TextFieldEx) exPanel).selTextField.setText("bis 500ft");
+
+							default:
+								((SizePanel) exPanel).selTextField.setText(((SizePanel) exPanel).vsSize[type-1][((SizePanel) exPanel).units]);
 								break;
-								
-							case TextFieldEx.UNKNOWN:
-								((TextFieldEx) exPanel).selTextField.setText("unbekannt");
-								break;
-								
 						}
-
 					}
+					
+					if(sType == SizePanel.AN_SIZE) {
+						switch (type) {
+						case SizePanel.NOT_SELECTED:
+							((SizePanel) exPanel).selTextField.setText("");
+							break;
+							
+						case SizePanel.CAT_UNKNOWN:
+							((SizePanel) exPanel).selTextField.setText("unbekannt");
+							break;
+							
+						default:
+							((SizePanel) exPanel).selTextField.setText(((SizePanel) exPanel).anSize[type-1][((SizePanel) exPanel).units]);
+							break;
+						}
+					} */
 				}
 			});
@@ -215,5 +244,5 @@
 			
 			grButton = new LightTile(grey, green, yellow, red);
-			grButton.setBounds(new Rectangle(164, 220, 50, 20));
+			grButton.setBounds(new Rectangle(162, 240, 50, 20));
 		}
 		return grButton;
@@ -228,5 +257,5 @@
 		if (olCheckBox == null) {
 			olCheckBox = new TristateCheckBox();
-			olCheckBox.setBounds(new Rectangle(2, 95, 133, 20));
+			olCheckBox.setBounds(new Rectangle(7, 109, 133, 20));
 			olCheckBox.setFont(new Font("Dialog", Font.PLAIN, 12));
 			olCheckBox.setText("Overhead Limits");
@@ -243,5 +272,5 @@
 		if (turnCheckBox == null) {
 			turnCheckBox = new TristateCheckBox();
-			turnCheckBox.setBounds(new Rectangle(2, 118, 105, 20));
+			turnCheckBox.setBounds(new Rectangle(7, 132, 105, 20));
 			turnCheckBox.setFont(new Font("Dialog", Font.PLAIN, 12));
 			turnCheckBox.setText("Wendeplatz");
@@ -258,5 +287,5 @@
 		if (impCheckBox == null) {
 			impCheckBox = new TristateCheckBox();
-			impCheckBox.setBounds(new Rectangle(2, 141, 95, 20));
+			impCheckBox.setBounds(new Rectangle(7, 155, 95, 20));
 			impCheckBox.setFont(new Font("Dialog", Font.PLAIN, 12));
 			impCheckBox.setText("Zollhafen");
@@ -273,5 +302,5 @@
 		if (usCheckBox == null) {
 			usCheckBox = new TristateCheckBox();
-			usCheckBox.setBounds(new Rectangle(2, 164, 125, 20));
+			usCheckBox.setBounds(new Rectangle(7, 178, 125, 20));
 			usCheckBox.setFont(new Font("Dialog", Font.PLAIN, 12));
 			usCheckBox.setText("US. Vertretung");
@@ -288,5 +317,5 @@
 		if (etaCheckBox == null) {
 			etaCheckBox = new TristateCheckBox();
-			etaCheckBox.setBounds(new Rectangle(2, 187, 120, 20));
+			etaCheckBox.setBounds(new Rectangle(7, 201, 120, 20));
 			etaCheckBox.setText("ETA Nachricht");
 			etaCheckBox.setFont(new Font("Dialog", Font.PLAIN, 12));
@@ -302,11 +331,54 @@
 	private JPanel getExPanel() {
 		if (exPanel == null) {
-			exPanel = new TextFieldEx();
+			exPanel = new SizePanel();
 			exPanel.setLayout(null);
-			exPanel.setBounds(new Rectangle(135, 95, 190, 112));
-			((TextFieldEx) exPanel).setComboBox(allComboBox);
-			((TextFieldEx) exPanel).initialize();
+			exPanel.setBounds(new Rectangle(135, 110, 190, 112));
+			((SizePanel) exPanel).setComboBox(allComboBox);
+			((SizePanel) exPanel).initialize();
 		}
 		return exPanel;
 	}
+
+	/**
+	 * This method initializes meterRadioButton	
+	 * 	
+	 * @return javax.swing.JRadioButton	
+	 */
+	private JRadioButton getMeterRadioButton() {
+		if (meterRadioButton == null) {
+			meterRadioButton = new JRadioButton();
+			meterRadioButton.setBounds(new Rectangle(290, 45, 38, 20));
+			meterRadioButton.setFont(new Font("Dialog", Font.PLAIN, 12));
+			meterRadioButton.setSelected(true);
+			meterRadioButton.setText("m");
+			meterRadioButton.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					((SizePanel) exPanel).units = SizePanel.METER;
+					((SizePanel) exPanel).changeUnits();
+				}
+			});
+		}
+		return meterRadioButton;
+	}
+
+	/**
+	 * This method initializes feetRadioButton	
+	 * 	
+	 * @return javax.swing.JRadioButton	
+	 */
+	private JRadioButton getFeetRadioButton() {
+		if (feetRadioButton == null) {
+			feetRadioButton = new JRadioButton();
+			feetRadioButton.setBounds(new Rectangle(290, 62, 38, 20));
+			feetRadioButton.setFont(new Font("Dialog", Font.PLAIN, 12));
+			feetRadioButton.setText("ft");
+			feetRadioButton.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					((SizePanel) exPanel).units = SizePanel.FEET;
+					((SizePanel) exPanel).changeUnits();
+				}
+			});
+		}
+		return feetRadioButton;
+	}
 }
Index: applications/editors/josm/plugins/smed/plugs/harbour/src/harbour/widgets/SizePanel.java
===================================================================
--- applications/editors/josm/plugins/smed/plugs/harbour/src/harbour/widgets/SizePanel.java	(revision 24460)
+++ applications/editors/josm/plugins/smed/plugs/harbour/src/harbour/widgets/SizePanel.java	(revision 24460)
@@ -0,0 +1,412 @@
+package harbour.widgets;
+
+import harbour.widgets.TristateCheckBox.State;
+
+import java.awt.GridBagLayout;
+
+import javax.swing.ButtonGroup;
+import javax.swing.JComboBox;
+import javax.swing.JPanel;
+import javax.swing.JTextField;
+import java.awt.Rectangle;
+import javax.swing.JLabel;
+import java.awt.Font;
+import javax.swing.JRadioButton;
+
+public class SizePanel extends JPanel {
+
+	private static final long serialVersionUID = 1L;
+	
+	private ButtonGroup buttons = new ButtonGroup();
+	public  TextFieldEx sizeTextField = null;
+	private JLabel sizeLabel = null;
+	private JRadioButton sizeRadioButton = null;
+	private TextFieldEx chTextField = null;
+	private JLabel chLabel = null;
+	private JRadioButton chRadioButton = null;
+	private TextFieldEx tieTextField = null;
+	private JLabel tieLabel = null;
+	private JRadioButton tieRadioButton = null;
+	private TextFieldEx cargoTextField = null;
+	private JLabel cargoLabel = null;
+	private JRadioButton cargoRadioButton = null;
+	private TextFieldEx oilTextField = null;
+	private JLabel oilLabel = null;
+	private JRadioButton oilRadioButton = null;
+	
+	private JComboBox comboBox = null;
+	private Cat catType = VS_SIZE;  //  @jve:decl-index=0:
+	public TextFieldEx selTextField = null;
+
+	// Enumarations
+	public static class Cat {private Cat() {} }
+	public final static Cat VS_SIZE = new Cat();  //  @jve:decl-index=0:
+	public final static Cat AN_SIZE = new Cat();  //  @jve:decl-index=0:
+	
+	public final static int NOT_SELECTED =  0;
+	public final static int UNKNOWN      =  3;
+	
+	public final static int CAT_UNKNOWN  = 17;
+	public final static int FEET         =  0;
+	public final static int METER        =  1;
+	
+	public int units = METER;
+	public String[][] anSize = {{"> 76ft"," > 23.2m"},
+								{"71-75ft","21.6-22.9m"},
+								{"66-70ft","20.1-21.3m"},
+								{"61-65ft","18.6-19.8m"},
+								{"56-60ft","17.1-18.2m"},
+								{"51-55ft","15.5-16.0m"},
+								{"46-50ft","14.0-15.2m"},
+								{"41-45ft","12.5-13.7m"},
+								{"36-40ft","11.0-12.2m"},
+								{"31-35ft"," 9.4-10.0m"},
+								{"26-30ft"," 7.9- 9.1m"},
+								{"21-25ft"," 6.4- 7.6m"},
+								{"16-20ft"," 4.9- 6.1m"},
+								{"11-15ft"," 3.4- 4.6m"},
+								{" 6-10ft"," 1.8- 3.0m"},
+								{" 0- 5ft"," 0.0- 1.5m"}};
+
+	public String[][] vsSize = {{"> 500ft lang","> 152m lang"},
+								{"bis 500ft lang","bis 152m lang"}};
+	
+	/**
+	 * This is the default constructor
+	 */
+	public SizePanel() {
+		super();
+	}
+
+	/**
+	 * This method initializes this
+	 * 
+	 * @return void
+	 */
+	public void initialize() {
+		oilLabel = new JLabel();
+		oilLabel.setBounds(new Rectangle(75, 94, 80, 15));
+		oilLabel.setFont(new Font("Dialog", Font.PLAIN, 12));
+		oilLabel.setText("Oelterminal");
+		cargoLabel = new JLabel();
+		cargoLabel.setBounds(new Rectangle(75, 71, 90, 15));
+		cargoLabel.setFont(new Font("Dialog", Font.PLAIN, 12));
+		cargoLabel.setText("Frachtanleger");
+		tieLabel = new JLabel();
+		tieLabel.setBounds(new Rectangle(75, 48, 75, 15));
+		tieLabel.setFont(new Font("Dialog", Font.PLAIN, 12));
+		tieLabel.setText("Ankerplatz");
+		chLabel = new JLabel();
+		chLabel.setBounds(new Rectangle(75, 25, 75, 15));
+		chLabel.setFont(new Font("Dialog", Font.PLAIN, 12));
+		chLabel.setText("Fahrwasser");
+		sizeLabel = new JLabel();
+		sizeLabel.setBounds(new Rectangle(75, 2, 95, 15));
+		sizeLabel.setFont(new Font("Dialog", Font.PLAIN, 12));
+		sizeLabel.setText("Schiffsgroesse");
+		this.setSize(190, 112);
+		this.setLayout(null);
+		this.add(getSizeTextField(), null);
+		this.add(sizeLabel, null);
+		this.add(getSizeRadioButton(), null);
+		this.add(getChTextField(), null);
+		this.add(chLabel, null);
+		this.add(getChRadioButton(), null);
+		this.add(getTieTextField(), null);
+		this.add(tieLabel, null);
+		this.add(getTieRadioButton(), null);
+		this.add(getCargoTextField(), null);
+		this.add(cargoLabel, null);
+		this.add(getCargoRadioButton(), null);
+		this.add(getOilTextField(), null);
+		this.add(oilLabel, null);
+		this.add(getOilRadioButton(), null);
+		
+		buttons.add(sizeRadioButton);
+		buttons.add(chRadioButton);
+		buttons.add(tieRadioButton);
+		buttons.add(cargoRadioButton);
+		buttons.add(oilRadioButton);
+		
+		sizeRadioButton.setSelected(true);
+		selTextField = 	sizeTextField;
+	}
+
+	/**
+	 * This method initializes sizeTextField	
+	 * 	
+	 * @return javax.swing.JTextField	
+	 */
+	private JTextField getSizeTextField() {
+		if (sizeTextField == null) {
+			sizeTextField = new TextFieldEx(new Bounds(NOT_SELECTED, UNKNOWN), vsSize);
+			sizeTextField.setBounds(new Rectangle(0, 0, 75, 20));
+			sizeTextField.setEditable(false);
+		}
+		return sizeTextField;
+	}
+
+	/**
+	 * This method initializes sizeRadioButton	
+	 * 	
+	 * @return javax.swing.JRadioButton	
+	 */
+	private JRadioButton getSizeRadioButton() {
+		if (sizeRadioButton == null) {
+			sizeRadioButton = new JRadioButton();
+			sizeRadioButton.setBounds(new Rectangle(170, 0, 20, 20));
+
+			setComboBoxSize();
+			
+			sizeRadioButton.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					catType = VS_SIZE;
+					selTextField.setIndex(comboBox.getSelectedIndex(), true);
+					selTextField = sizeTextField ;
+					comboBox.removeAllItems();
+					setComboBoxSize();
+					comboBox.setSelectedIndex(selTextField.index);
+				}
+			});
+		}
+		return sizeRadioButton;
+	}
+
+
+	/**
+	 * This method initializes chTextField	
+	 * 	
+	 * @return javax.swing.JTextField	
+	 */
+	private JTextField getChTextField() {
+		if (chTextField == null) {
+			chTextField = new TextFieldEx(new Bounds(NOT_SELECTED, CAT_UNKNOWN), anSize);
+			chTextField.setBounds(new Rectangle(0, 23, 75, 20));
+		}
+		return chTextField;
+	}
+
+	/**
+	 * This method initializes chRadioButton	
+	 * 	
+	 * @return javax.swing.JRadioButton	
+	 */
+	private JRadioButton getChRadioButton() {
+		if (chRadioButton == null) {
+			chRadioButton = new JRadioButton();
+			chRadioButton.setBounds(new Rectangle(170, 23, 20, 20));
+			chRadioButton.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					catType = AN_SIZE;
+					selTextField.setIndex(comboBox.getSelectedIndex(), true);
+					selTextField = chTextField ;
+					comboBox.removeAllItems();
+					setAnchorageSize();
+					comboBox.setSelectedIndex(selTextField.index);
+				}
+			});
+		}
+		return chRadioButton;
+	}
+
+
+	/**
+	 * This method initializes tieTextField	
+	 * 	
+	 * @return javax.swing.JTextField	
+	 */
+	private JTextField getTieTextField() {
+		if (tieTextField == null) {
+			tieTextField = new TextFieldEx(new Bounds(NOT_SELECTED, CAT_UNKNOWN), anSize);
+			tieTextField.setBounds(new Rectangle(0, 46, 75, 20));
+		}
+		return tieTextField;
+	}
+
+	/**
+	 * This method initializes tieRadioButton	
+	 * 	
+	 * @return javax.swing.JRadioButton	
+	 */
+	private JRadioButton getTieRadioButton() {
+		if (tieRadioButton == null) {
+			tieRadioButton = new JRadioButton();
+			tieRadioButton.setBounds(new Rectangle(170, 46, 20, 20));
+			tieRadioButton.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					catType = AN_SIZE;
+					selTextField.setIndex(comboBox.getSelectedIndex(), true);
+					selTextField = tieTextField;
+					comboBox.removeAllItems();
+					setAnchorageSize();
+					comboBox.setSelectedIndex(selTextField.index);
+				}
+			});
+		}
+		return tieRadioButton;
+	}
+
+	/**
+	 * This method initializes cargoTextField	
+	 * 	
+	 * @return javax.swing.JTextField	
+	 */
+	private JTextField getCargoTextField() {
+		if (cargoTextField == null) {
+			cargoTextField = new TextFieldEx(new Bounds(NOT_SELECTED, CAT_UNKNOWN), anSize);
+			cargoTextField.setBounds(new Rectangle(0, 69, 75, 20));
+		}
+		return cargoTextField;
+	}
+
+	/**
+	 * This method initializes cargoRadioButton	
+	 * 	
+	 * @return javax.swing.JRadioButton	
+	 */
+	private JRadioButton getCargoRadioButton() {
+		if (cargoRadioButton == null) {
+			cargoRadioButton = new JRadioButton();
+			cargoRadioButton.setBounds(new Rectangle(170, 69, 20, 20));
+			cargoRadioButton.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					catType = AN_SIZE;
+					selTextField.setIndex(comboBox.getSelectedIndex(), true);
+					selTextField = cargoTextField;
+					comboBox.removeAllItems();
+					setAnchorageSize();
+					comboBox.setSelectedIndex(selTextField.index);
+				}
+			});
+		}
+		return cargoRadioButton;
+	}
+
+	/**
+	 * This method initializes oilTextField	
+	 * 	
+	 * @return javax.swing.JTextField	
+	 */
+	private JTextField getOilTextField() {
+		if (oilTextField == null) {
+			oilTextField = new TextFieldEx(new Bounds(NOT_SELECTED, CAT_UNKNOWN), anSize);
+			oilTextField.setBounds(new Rectangle(0, 92, 75, 20));
+		}
+		return oilTextField;
+	}
+
+	/**
+	 * This method initializes oilRadioButton	
+	 * 	
+	 * @return javax.swing.JRadioButton	
+	 */
+	private JRadioButton getOilRadioButton() {
+		if (oilRadioButton == null) {
+			oilRadioButton = new JRadioButton();
+			oilRadioButton.setBounds(new Rectangle(170, 92, 20, 20));
+			oilRadioButton.addActionListener(new java.awt.event.ActionListener() {
+				public void actionPerformed(java.awt.event.ActionEvent e) {
+					catType = AN_SIZE;
+					selTextField.setIndex(comboBox.getSelectedIndex(), true);
+					selTextField = oilTextField;
+					comboBox.removeAllItems();
+					setAnchorageSize();
+					comboBox.setSelectedIndex(selTextField.index);
+				}
+			});
+		}
+		return oilRadioButton;
+	}
+
+	public void setComboBox(JComboBox box) {
+		comboBox = box;
+	}
+
+	private void setComboBoxSize() {
+		comboBox.addItem("* Waehle Groesse ...");
+		comboBox.addItem(vsSize[0][units]);
+		comboBox.addItem(vsSize[1][units]);
+		comboBox.addItem("Unbekannt");
+	}
+
+	
+	private void setAnchorageSize() {
+		comboBox.addItem("* Waehle Groesse ...");
+		
+		for(int i = 0; i < 16; i++) {
+			comboBox.addItem(anSize[i][units]);
+		}
+		
+		comboBox.addItem("Unbekannt");
+	}
+	
+	public Cat getCatType() {
+		return catType;
+	}
+	
+	public void changeUnits() {
+		int i;
+		
+		selTextField.setIndex(comboBox.getSelectedIndex(),true);
+		comboBox.removeAllItems();
+		
+		if(catType == AN_SIZE ) setAnchorageSize();
+		else setComboBoxSize();
+		
+		comboBox.setSelectedIndex(selTextField.index);
+
+		sizeTextField.setUnits(units);
+		chTextField.setUnits(units);
+		tieTextField.setUnits(units);
+		cargoTextField.setUnits(units);
+		oilTextField.setUnits(units);
+		// comboBox.setSelectedIndex(i);
+	}
+	
+	public class TextFieldEx extends JTextField {
+
+		private int index;
+		private int units;
+		private Bounds bounds;
+		private String [][] str;
+		
+		public TextFieldEx(Bounds b,String[][] s) {
+			super();
+			
+			index = 0;
+			bounds = b;
+			units = METER;
+			str = s;
+			setText("");
+		}
+		
+		public void setIndex(int i, boolean upd) {
+			if(upd) this.index = i;
+			
+			if(i == bounds.getBottom()) setText("");
+			if(i > bounds.getBottom() && i < bounds.getTop()) setText(str[i-1][units]);
+			if(i == bounds.getTop()) setText("unbekannt");
+
+		}
+		
+		private void setUnits(int u) {
+			units = u;
+			setIndex(index, false);
+		}
+
+	}
+	
+	public class Bounds {
+		
+		private int bottom;
+		private int top;
+		
+		private Bounds(int b,int t) {
+			bottom = b;
+			top    = t;
+		}
+		
+		private int getTop()	{ return top; }
+		private int getBottom() { return bottom; }
+	}
+}
Index: applications/editors/josm/plugins/smed/plugs/harbour/src/harbour/widgets/TextFieldEx.java
===================================================================
--- applications/editors/josm/plugins/smed/plugs/harbour/src/harbour/widgets/TextFieldEx.java	(revision 24451)
+++ 	(revision )
@@ -1,326 +1,0 @@
-package harbour.widgets;
-
-import harbour.widgets.TristateCheckBox.State;
-
-import java.awt.GridBagLayout;
-
-import javax.swing.ButtonGroup;
-import javax.swing.JComboBox;
-import javax.swing.JPanel;
-import javax.swing.JTextField;
-import java.awt.Rectangle;
-import javax.swing.JLabel;
-import java.awt.Font;
-import javax.swing.JRadioButton;
-
-public class TextFieldEx extends JPanel {
-
-	private static final long serialVersionUID = 1L;
-	
-	private ButtonGroup buttons = new ButtonGroup();
-	private JTextField sizeTextField = null;
-	private JLabel sizeLabel = null;
-	private JRadioButton sizeRadioButton = null;
-	private JTextField chTextField = null;
-	private JLabel chLabel = null;
-	private JRadioButton chRadioButton = null;
-	private JTextField tieTextField = null;
-	private JLabel tieLabel = null;
-	private JRadioButton tieRadioButton = null;
-	private JTextField cargoTextField = null;
-	private JLabel cargoLabel = null;
-	private JRadioButton cargoRadioButton = null;
-
-	private JTextField oilTextField = null;
-
-	private JLabel oilLabel = null;
-
-	private JRadioButton oilRadioButton = null;
-	
-	private JComboBox comboBox = null;
-	private Ssize sizeType = VS_SIZE;  //  @jve:decl-index=0:
-	public JTextField selTextField = null;
-
-	// Enumarations
-	public static class Ssize {private Ssize() {} }
-	public final static Ssize VS_SIZE = new Ssize();  //  @jve:decl-index=0:
-	public final static Ssize AN_SIZE = new Ssize();  //  @jve:decl-index=0:
-	
-	public final static int NOT_SELECTED = 0;
-	public final static int LARGE        = 1;
-	public final static int MEDIUM       = 2;
-	public final static int UNKNOWN      = 3;
-	
-	/**
-	 * This is the default constructor
-	 */
-	public TextFieldEx() {
-		super();
-	}
-
-	/**
-	 * This method initializes this
-	 * 
-	 * @return void
-	 */
-	public void initialize() {
-		oilLabel = new JLabel();
-		oilLabel.setBounds(new Rectangle(75, 94, 80, 15));
-		oilLabel.setFont(new Font("Dialog", Font.PLAIN, 12));
-		oilLabel.setText("Oelterminal");
-		cargoLabel = new JLabel();
-		cargoLabel.setBounds(new Rectangle(75, 71, 90, 15));
-		cargoLabel.setFont(new Font("Dialog", Font.PLAIN, 12));
-		cargoLabel.setText("Frachtanleger");
-		tieLabel = new JLabel();
-		tieLabel.setBounds(new Rectangle(75, 48, 75, 15));
-		tieLabel.setFont(new Font("Dialog", Font.PLAIN, 12));
-		tieLabel.setText("Ankerplatz");
-		chLabel = new JLabel();
-		chLabel.setBounds(new Rectangle(75, 25, 60, 15));
-		chLabel.setFont(new Font("Dialog", Font.PLAIN, 12));
-		chLabel.setText("Channel");
-		sizeLabel = new JLabel();
-		sizeLabel.setBounds(new Rectangle(75, 2, 95, 15));
-		sizeLabel.setFont(new Font("Dialog", Font.PLAIN, 12));
-		sizeLabel.setText("Schiffsgroesse");
-		this.setSize(190, 112);
-		this.setLayout(null);
-		this.add(getSizeTextField(), null);
-		this.add(sizeLabel, null);
-		this.add(getSizeRadioButton(), null);
-		this.add(getChTextField(), null);
-		this.add(chLabel, null);
-		this.add(getChRadioButton(), null);
-		this.add(getTieTextField(), null);
-		this.add(tieLabel, null);
-		this.add(getTieRadioButton(), null);
-		this.add(getCargoTextField(), null);
-		this.add(cargoLabel, null);
-		this.add(getCargoRadioButton(), null);
-		this.add(getOilTextField(), null);
-		this.add(oilLabel, null);
-		this.add(getOilRadioButton(), null);
-		
-		buttons.add(sizeRadioButton);
-		buttons.add(chRadioButton);
-		buttons.add(tieRadioButton);
-		buttons.add(cargoRadioButton);
-		buttons.add(oilRadioButton);
-		
-		sizeRadioButton.setSelected(true);
-		selTextField = 	sizeTextField;
-	}
-
-	/**
-	 * This method initializes sizeTextField	
-	 * 	
-	 * @return javax.swing.JTextField	
-	 */
-	private JTextField getSizeTextField() {
-		if (sizeTextField == null) {
-			sizeTextField = new JTextField();
-			sizeTextField.setBounds(new Rectangle(0, 0, 75, 20));
-			sizeTextField.setEditable(false);
-		}
-		return sizeTextField;
-	}
-
-	/**
-	 * This method initializes sizeRadioButton	
-	 * 	
-	 * @return javax.swing.JRadioButton	
-	 */
-	private JRadioButton getSizeRadioButton() {
-		if (sizeRadioButton == null) {
-			sizeRadioButton = new JRadioButton();
-			sizeRadioButton.setBounds(new Rectangle(170, 0, 20, 20));
-
-			setComboBoxSize();
-			
-			sizeRadioButton.addActionListener(new java.awt.event.ActionListener() {
-				public void actionPerformed(java.awt.event.ActionEvent e) {
-					sizeType = VS_SIZE;
-					selTextField = sizeTextField ;
-					comboBox.removeAllItems();
-					setComboBoxSize();
-				}
-			});
-		}
-		return sizeRadioButton;
-	}
-
-
-	/**
-	 * This method initializes chTextField	
-	 * 	
-	 * @return javax.swing.JTextField	
-	 */
-	private JTextField getChTextField() {
-		if (chTextField == null) {
-			chTextField = new JTextField();
-			chTextField.setBounds(new Rectangle(0, 23, 75, 20));
-		}
-		return chTextField;
-	}
-
-	/**
-	 * This method initializes chRadioButton	
-	 * 	
-	 * @return javax.swing.JRadioButton	
-	 */
-	private JRadioButton getChRadioButton() {
-		if (chRadioButton == null) {
-			chRadioButton = new JRadioButton();
-			chRadioButton.setBounds(new Rectangle(170, 23, 20, 20));
-			chRadioButton.addActionListener(new java.awt.event.ActionListener() {
-				public void actionPerformed(java.awt.event.ActionEvent e) {
-					sizeType = AN_SIZE;
-					selTextField = chTextField ;
-					comboBox.removeAllItems();
-					setAnchorageSize();
-				}
-			});
-		}
-		return chRadioButton;
-	}
-
-
-	/**
-	 * This method initializes tieTextField	
-	 * 	
-	 * @return javax.swing.JTextField	
-	 */
-	private JTextField getTieTextField() {
-		if (tieTextField == null) {
-			tieTextField = new JTextField();
-			tieTextField.setBounds(new Rectangle(0, 46, 75, 20));
-		}
-		return tieTextField;
-	}
-
-	/**
-	 * This method initializes tieRadioButton	
-	 * 	
-	 * @return javax.swing.JRadioButton	
-	 */
-	private JRadioButton getTieRadioButton() {
-		if (tieRadioButton == null) {
-			tieRadioButton = new JRadioButton();
-			tieRadioButton.setBounds(new Rectangle(170, 46, 20, 20));
-			tieRadioButton.addActionListener(new java.awt.event.ActionListener() {
-				public void actionPerformed(java.awt.event.ActionEvent e) {
-					sizeType = AN_SIZE;
-					selTextField = tieTextField;
-					comboBox.removeAllItems();
-					setAnchorageSize();
-				}
-			});
-		}
-		return tieRadioButton;
-	}
-
-	/**
-	 * This method initializes cargoTextField	
-	 * 	
-	 * @return javax.swing.JTextField	
-	 */
-	private JTextField getCargoTextField() {
-		if (cargoTextField == null) {
-			cargoTextField = new JTextField();
-			cargoTextField.setBounds(new Rectangle(0, 69, 75, 20));
-		}
-		return cargoTextField;
-	}
-
-	/**
-	 * This method initializes cargoRadioButton	
-	 * 	
-	 * @return javax.swing.JRadioButton	
-	 */
-	private JRadioButton getCargoRadioButton() {
-		if (cargoRadioButton == null) {
-			cargoRadioButton = new JRadioButton();
-			cargoRadioButton.setBounds(new Rectangle(170, 69, 20, 20));
-			cargoRadioButton.addActionListener(new java.awt.event.ActionListener() {
-				public void actionPerformed(java.awt.event.ActionEvent e) {
-					sizeType = AN_SIZE;
-					selTextField = cargoTextField;
-					comboBox.removeAllItems();
-					setAnchorageSize();
-				}
-			});
-		}
-		return cargoRadioButton;
-	}
-
-	/**
-	 * This method initializes oilTextField	
-	 * 	
-	 * @return javax.swing.JTextField	
-	 */
-	private JTextField getOilTextField() {
-		if (oilTextField == null) {
-			oilTextField = new JTextField();
-			oilTextField.setBounds(new Rectangle(0, 92, 75, 20));
-		}
-		return oilTextField;
-	}
-
-	/**
-	 * This method initializes oilRadioButton	
-	 * 	
-	 * @return javax.swing.JRadioButton	
-	 */
-	private JRadioButton getOilRadioButton() {
-		if (oilRadioButton == null) {
-			oilRadioButton = new JRadioButton();
-			oilRadioButton.setBounds(new Rectangle(170, 92, 20, 20));
-			oilRadioButton.addActionListener(new java.awt.event.ActionListener() {
-				public void actionPerformed(java.awt.event.ActionEvent e) {
-					sizeType = AN_SIZE;
-					selTextField = oilTextField;
-					comboBox.removeAllItems();
-					setAnchorageSize();					
-				}
-			});
-		}
-		return oilRadioButton;
-	}
-
-	public void setComboBox(JComboBox box) {
-		comboBox = box;
-	}
-
-	private void setComboBoxSize() {
-		comboBox.addItem("* Waehle Groesse ...");
-		comboBox.addItem("> 500 ft lang");
-		comboBox.addItem("bis 500 ft lang");
-		comboBox.addItem("Unbekannt");
-	}
-
-	private void setAnchorageSize() {
-		comboBox.addItem("* Waehle Groesse ...");
-		comboBox.addItem("A > 76 ft       > 23.2m");
-		comboBox.addItem("B 71-75ft      21.6-22.9m");
-		comboBox.addItem("C 66-70ft      20.1-21.3m");
-		comboBox.addItem("D 61-65ft      18.6-19.8m");
-		comboBox.addItem("E 56-60ft      17.1-18.2m");
-		comboBox.addItem("F 51-55ft      15.5-16.0m");
-		comboBox.addItem("G 46-50ft      14.0-15.2m");
-		comboBox.addItem("H 41-45ft      12.5-13.7m");
-		comboBox.addItem("J 36-40ft      11.0-12.2m");
-		comboBox.addItem("K 31-35ft       9.4-10.0m");
-		comboBox.addItem("L 26-30ft       7.9- 9.1m");
-		comboBox.addItem("M 21-25ft       6.4- 7.6m");
-		comboBox.addItem("N 16-20ft       4.9- 6.1m");
-		comboBox.addItem("O 11-15ft       3.4- 4.6m");
-		comboBox.addItem("P  6-10ft       1.8- 3.0m");
-		comboBox.addItem("Q  0- 5ft       0.0- 1.5m");
-		comboBox.addItem("U Unbekannt    Unbekannt");
-	}
-	
-	public Ssize getSizeType() {
-		return sizeType;
-	}
-}
