ObstaclePopupMenu(AtomisticView v) {

		super("Obstacle");

		view = v;

		JMenuItem mi = new JMenuItem(view.getActionMap().get(AtomisticView.COPY));
		String s = MDView.getInternationalText("Copy");
		if (s != null)
			mi.setText(s);
		add(mi);

		mi = new JMenuItem(view.getActionMap().get(AtomisticView.CUT));
		s = MDView.getInternationalText("Cut");
		if (s != null)
			mi.setText(s);
		add(mi);
		addSeparator();

		s = MDView.getInternationalText("Steer");
		miSteer = new JMenuItem(s != null ? s : "Steer", UserAction.steerIcon);
		miSteer.setEnabled(false);
		miSteer.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if (view.selectedComponent instanceof RectangularObstacle) {
					view.setAction(UserAction.SELE_ID);
					((RectangularObstacle) view.selectedComponent).setUserField(new UserField(0, view.getBounds()));
					view.repaint();
				}
			}
		});
		add(miSteer);

		s = MDView.getInternationalText("SteeringOff");
		miUnsteer = new JMenuItem(s != null ? s : "Steering Off", UserAction.unsteerIcon);
		miUnsteer.setEnabled(false);
		miUnsteer.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				if (view.selectedComponent instanceof RectangularObstacle) {
					((RectangularObstacle) view.selectedComponent).setUserField(null);
				}
			}
		});
		add(miUnsteer);
		addSeparator();

		s = MDView.getInternationalText("Properties");
		mi = new JMenuItem(s != null ? s : "Properties", IconPool.getIcon("properties"));
		mi.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				DialogFactory.showDialog(view.selectedComponent);
			}
		});
		add(mi);

		s = MDView.getInternationalText("DraggableByUserInNonEditingMode");
		miDraggable = new JCheckBoxMenuItem(s != null ? s : "Draggable by User in Non-Editing Mode");
		miDraggable.setIcon(IconPool.getIcon("user draggable"));
		miDraggable.addItemListener(new ItemListener() {
			public void itemStateChanged(ItemEvent e) {
				if (view.selectedComponent instanceof RectangularObstacle) {
					view.selectedComponent.setDraggable(e.getStateChange() == ItemEvent.SELECTED);
					view.repaint();
					view.getModel().notifyChange();
				}
			}
		});
		add(miDraggable);

		pack();

	}