private JPanel createHistogramPanel(Node selected){
  DataSet dataSet=(DataSet)dataEditor.getSelectedDataModel();
  Histogram histogram=new Histogram(dataSet);
  histogram.setTarget(selected == null ? null : selected.getName());
  HistogramView view=new HistogramView(histogram);
  Box box=Box.createHorizontalBox();
  box.add(view);
  box.add(Box.createHorizontalStrut(5));
  box.add(Box.createHorizontalGlue());
  Box vBox=Box.createVerticalBox();
  vBox.add(Box.createVerticalStrut(15));
  vBox.add(box);
  vBox.add(Box.createVerticalStrut(5));
  JPanel panel=new JPanel();
  panel.setLayout(new BorderLayout());
  panel.add(vBox,BorderLayout.CENTER);
  return panel;
}

private JPanel createHistogramPanel ( Node selected ) { DataSet dataSet = ( DataSet ) dataEditor . getSelectedDataModel ( ) ; Histogram histogram = new Histogram ( dataSet ) ; histogram . setTarget ( selected == null ? null : selected . getName ( ) ) ; HistogramView view = new HistogramView ( histogram ) ; Box box = Box . createHorizontalBox ( ) ; box . add ( view ) ; box . add ( Box . createHorizontalStrut ( 5 ) ) ; box . add ( Box . createHorizontalGlue ( ) ) ; Box vBox = Box . createVerticalBox ( ) ; vBox . add ( Box . createVerticalStrut ( 15 ) ) ; vBox . add ( box ) ; vBox . add ( Box . createVerticalStrut ( 5 ) ) ; JPanel panel = new JPanel ( ) ; panel . setLayout ( new BorderLayout ( ) ) ; panel . add ( vBox , BorderLayout . CENTER ) ; return panel ; }
creates a dialog that is showing the histogram for the given node ( if null one is selected for you )
