EFieldOption(final AtomisticView view) {

		super(JOptionPane.getFrameForComponent(view), "Electric Field Options", true);
		setDefaultCloseOperation(DISPOSE_ON_CLOSE);
		String s = MDView.getInternationalText("ElectricFieldOptions");
		if (s != null)
			setTitle(s);
		this.view = view;

		JPanel p = new JPanel();
		p.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));

		s = MDView.getInternationalText("ElectricFieldShadingMode");
		JLabel label = new JLabel((s != null ? s : "Shading mode") + ":", JLabel.LEFT);
		p.add(label);
		comboBoxMode = new JComboBox(new String[] { "Transparency", "Two colors" });
		switch (view.getEFShadingMode()) {
		case ElectricForceField.TRANSPARENCY_SHADING_MODE:
			comboBoxMode.setSelectedIndex(0);
			break;
		case ElectricForceField.TWO_COLORS_SHADING_MODE:
			comboBoxMode.setSelectedIndex(1);
			break;
		}
		p.add(comboBoxMode);

		s = MDView.getInternationalText("ElectricFieldCellSize");
		label = new JLabel((s != null ? s : "Cell size") + ":", JLabel.LEFT);
		p.add(label);
		cellSizeSpinner = new JSpinner(new SpinnerNumberModel(1, 0, 50, 1));
		cellSizeSpinner.setValue(view.getEFCellSize());
		p.add(cellSizeSpinner);

		getContentPane().add(p, BorderLayout.CENTER);

		p = new JPanel(new FlowLayout(FlowLayout.CENTER));

		s = MDView.getInternationalText("OKButton");
		JButton button = new JButton(s != null ? s : "OK");
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				confirm();
				dispose();
			}
		});
		p.add(button);

		s = MDView.getInternationalText("CancelButton");
		button = new JButton(s != null ? s : "Cancel");
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				dispose();
			}
		});
		p.add(button);

		s = MDView.getInternationalText("Apply");
		button = new JButton(s != null ? s : "Apply");
		button.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent e) {
				confirm();
			}
		});
		p.add(button);

		getContentPane().add(p, BorderLayout.SOUTH);

		pack();

	}