| 1 |
// Copyright 2003, FreeHEP. |
| 2 |
package org.freehep.graphicsio.exportchooser; |
| 3 |
|
| 4 |
import java.awt.event.ActionEvent; |
| 5 |
import java.awt.event.ActionListener; |
| 6 |
import java.util.Properties; |
| 7 |
|
| 8 |
import javax.swing.JButton; |
| 9 |
import javax.swing.JDialog; |
| 10 |
|
| 11 |
/** |
| 12 |
* |
| 13 |
* @author Mark Donszelmann |
| 14 |
* @version $Id: freehep-graphicsio/src/main/java/org/freehep/graphicsio/exportchooser/OptionButton.java 5641ca92a537 2005/11/26 00:15:35 duns $ |
| 15 |
*/ |
| 16 |
public class OptionButton extends JButton implements Options { |
| 17 |
|
| 18 |
protected String key; |
| 19 |
|
| 20 |
public OptionButton(Properties options, String key, String text, |
| 21 |
final JDialog dialog) { |
| 22 |
super(text); |
| 23 |
this.key = key; |
| 24 |
addActionListener(new ActionListener() { |
| 25 |
public void actionPerformed(ActionEvent event) { |
| 26 |
dialog.setVisible(true); |
| 27 |
dialog.dispose(); |
| 28 |
} |
| 29 |
}); |
| 30 |
} |
| 31 |
|
| 32 |
public boolean applyChangedOptions(Properties options) { |
| 33 |
return false; |
| 34 |
} |
| 35 |
|
| 36 |
} |