Public Methods | |
| CorbaHistogram3dViewer (HxCorba.HistogramData histo) | |
| void | actionPerformed (ActionEvent e) |
|
|
00028 {
00029 createContents();
00030
00031 _butBgColor.addActionListener(this);
00032 _butPoint.addActionListener(this);
00033
00034 if(histo.dimensionality() != 3) return;
00035
00036 _thresField.setActionCommand("Threshold");
00037 _thresField.addActionListener(this);
00038
00039 _histogram = histo;
00040 _data = _histogram.getDataDouble();
00041
00042 _dimSize1 = histo.dimensionSize(1);
00043 _dimSize2 = histo.dimensionSize(2);
00044 _dimSize3 = histo.dimensionSize(3);
00045 _lowBin1 = histo.lowBin(1);
00046 _lowBin2 = histo.lowBin(2);
00047 _lowBin3 = histo.lowBin(3);
00048 _highBin1 = histo.highBin(1);
00049 _highBin2 = histo.highBin(2);
00050 _highBin3 = histo.highBin(3);
00051 _binWidth1 = histo.binWidth(1);
00052 _binWidth2 = histo.binWidth(2);
00053 _binWidth3 = histo.binWidth(3);
00054
00055 setPreferredSize(new Dimension(400,400));
00056
00057 updateThreshold(0.0);
00058 }
|
|
|
00061 {
00062 if(e.getActionCommand().equals("Threshold")) {
00063 try {
00064 double threshold = Double.parseDouble(_thresField.getText());
00065 updateThreshold(threshold);
00066 }catch(NumberFormatException ex) { }
00067
00068 }else if(e.getActionCommand().equals("Background")) {
00069 _histoPanel.setBgColor(new Color(_bgColor, _bgColor, _bgColor));
00070 _bgColor += 50;
00071 if(_bgColor > 255) _bgColor = 0;
00072
00073 }else if(e.getActionCommand().equals("Point Size")) {
00074 _histoPanel.setPointSize(_pointSize++);
00075 if(_pointSize > 5) _pointSize = 1;
00076 }
00077 }
|
1.2.12 written by Dimitri van Heesch,
© 1997-2001