2 //Title: ImportExport sample
4 //Copyright: Copyright (c) 1999
6 //Company: Matra Datavision
7 //Description: Your description
16 public class TransparencyDlg extends StandardDlg
18 private RealSpin spnValue = new RealSpin("0.0", "0.1");
19 private double myValue = 0.0;
20 private boolean isOK = false;
22 //**********************************************************************
23 public TransparencyDlg(Frame parent, double value)
25 super(parent, "Transparency", true, true, false, true);
30 BigDecimal BD = new BigDecimal(myValue);
31 BD = BD.setScale(2, BigDecimal.ROUND_HALF_UP);
32 spnValue.setValue(BD.toString());
37 //**********************************************************************
38 private void InitDlg()
40 JPanel aPane = new JPanel(new GridLayout(2, 1, 0, 4));
42 aPane.add(new JLabel("Choose a value between 0 and 1"));
44 spnValue.setMinValue("0.0");
45 spnValue.setMaxValue("1.0");
46 spnValue.setColumns(5);
47 spnValue.setBorder(BorderFactory.createEmptyBorder(0, 15, 0, 15));
50 aPane.setBorder(BorderFactory.createEmptyBorder(5, 7, 5, 7));
51 ControlsPanel.setLayout(new BorderLayout());
52 ControlsPanel.add(aPane, BorderLayout.CENTER);
57 //**********************************************************************
58 public void OkAction()
60 myValue = spnValue.getValue();
65 //**********************************************************************
66 public void CancelAction()
73 //**********************************************************************
74 public double getValue()
79 //**********************************************************************