From: Florian L. <fle...@us...> - 2005-09-28 15:53:12
|
Update of /cvsroot/magicmap/magicmapclient/src/net/sf/magicmap/client/gui/dialogs In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv11202/src/net/sf/magicmap/client/gui/dialogs Added Files: ViewOptionsDialog.java Log Message: view options menu started --- NEW FILE: ViewOptionsDialog.java --- package net.sf.magicmap.client.gui.dialogs; import java.awt.Frame; import java.awt.event.ActionEvent; import java.awt.event.ActionListener; import java.io.IOException; import javax.swing.ImageIcon; import javax.swing.JButton; import javax.swing.JDialog; import javax.swing.JEditorPane; import javax.swing.JLabel; import javax.swing.JPanel; import javax.swing.JTextField; import net.sf.magicmap.client.gui.utils.GUIUtils; import net.sf.magicmap.client.gui.utils.RelativePanelBuilder; import com.Ostermiller.util.Browser; import com.brunchboy.util.swing.relativelayout.RelativeLayout; public class ViewOptionsDialog extends JDialog implements ActionListener{ private JPanel mainPanel; private JTextField text; public static void showDialog(Frame owner){ ViewOptionsDialog d = new ViewOptionsDialog(owner); GUIUtils.locateOnScreen(d); Browser.init(); d.setModal(true); d.setVisible(true); } private ViewOptionsDialog(Frame owner) { super(owner, GUIUtils.filterMnemonic(GUIUtils.i18n("about"))); setSize(406, 430); this.setResizable(false); RelativeLayout layout = new RelativeLayout(); RelativePanelBuilder builder = new RelativePanelBuilder(layout); // OK / Abbrechen JButton ok = builder.createButton(GUIUtils.i18n("ok"), "OK", this); JButton cancel = builder.createButton(GUIUtils.i18n("cancel"), "CANCEL", this); builder.addOKCancelButtonBar(ok, cancel, "okcancel"); builder.setLeftLeftDistance("okcancel", null, 10); builder.setRightRightDistance("okcancel", null, -10); builder.setBottomBottomDistance("okcancel", null, -10); mainPanel = builder.getPanel(); setContentPane(mainPanel); getRootPane().setDefaultButton(ok); } /** */ public void actionPerformed(ActionEvent e){ if ("OK".equals(e.getActionCommand())){ this.setVisible(false); } } } |