01: package org.osbl.client.wings.devtools;
02:
03: import org.conform.BeanMeta;
04: import org.osbl.client.wings.XOptionPane;
05: import org.osbl.client.wings.shell.Client;
06:
07: import javax.swing.*;
08: import java.awt.event.ActionEvent;
09: import java.awt.event.ActionListener;
10:
11: public class MetaViewerDevTool extends AbstractAction {
12: private BeanMeta beanMeta;
13:
14: public MetaViewerDevTool(BeanMeta beanMeta) {
15: this .beanMeta = beanMeta;
16: putValue(Action.NAME, "Meta of "
17: + beanMeta.getType().getSimpleName());
18: //putValue(Action.SMALL_ICON, XIcons.REPLACE);
19: }
20:
21: public void actionPerformed(ActionEvent e) {
22: XOptionPane.showInputDialog(Client.getInstance()
23: .getShownComponent(), beanMeta.getName(), ""
24: + getValue(Action.NAME),
25: new org.conform.wings.devel.MetaViewer(beanMeta),
26: new ActionListener() {
27: public void actionPerformed(ActionEvent e) {
28: }
29: });
30: }
31: }
|