RocPlot(boolean precisionRecall){
  mMainPanel=new JPanel();
  mZoomPP=new RocZoomPlotPanel();
  mZoomPP.setOriginIsMin(true);
  mZoomPP.setColors(PALETTE);
  mProgressBar=new JProgressBar(-1,-1);
  mProgressBar.setVisible(true);
  mProgressBar.setStringPainted(true);
  mProgressBar.setIndeterminate(true);
  mProgressBarDelegate=new ProgressBarDelegate(mProgressBar);
  mStatusLabel=new JLabel();
  mPopup=new JPopupMenu();
  mRocLinesPanel=new RocLinesPanel(this);
  mScrollPane=new JScrollPane(mRocLinesPanel,JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED,JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
  mScrollPane.setWheelScrollingEnabled(true);
  mLineWidthSlider=new JSlider(JSlider.HORIZONTAL,LINE_WIDTH_MIN,LINE_WIDTH_MAX,1);
  mScoreCB=new JCheckBox("Show Scores");
  mScoreCB.setSelected(true);
  mSelectAllCB=new JCheckBox("Select / Deselect all");
  mTitleEntry=new JTextField("ROC");
  mTitleEntry.setMaximumSize(new Dimension(Integer.MAX_VALUE,mTitleEntry.getPreferredSize().height));
  mOpenButton=new JButton("Open...");
  mOpenButton.setToolTipText("Add a new curve from a file");
  mCommandButton=new JButton("Cmd");
  mCommandButton.setToolTipText("Send the equivalent rocplot command-line to the terminal");
  final ImageIcon icon=createImageIcon("com/rtg/graph/resources/realtimegenomics_logo.png","RTG Logo");
  mIconLabel=new JLabel(icon);
  mIconLabel.setBackground(new Color(16,159,205));
  mIconLabel.setForeground(Color.WHITE);
  mIconLabel.setOpaque(true);
  mIconLabel.setFont(new Font("Arial",Font.BOLD,24));
  mIconLabel.setHorizontalAlignment(JLabel.LEFT);
  mIconLabel.setIconTextGap(50);
  mGraphType=new JComboBox<>(new String[]{ROC_PLOT,PRECISION_SENSITIVITY});
  mGraphType.setSelectedItem(precisionRecall ? PRECISION_SENSITIVITY : ROC_PLOT);
  configureUI();
}

RocPlot ( boolean precisionRecall ) { mMainPanel = new JPanel ( ) ; mZoomPP = new RocZoomPlotPanel ( ) ; mZoomPP . setOriginIsMin ( true ) ; mZoomPP . setColors ( PALETTE ) ; mProgressBar = new JProgressBar ( - 1 , - 1 ) ; mProgressBar . setVisible ( true ) ; mProgressBar . setStringPainted ( true ) ; mProgressBar . setIndeterminate ( true ) ; mProgressBarDelegate = new ProgressBarDelegate ( mProgressBar ) ; mStatusLabel = new JLabel ( ) ; mPopup = new JPopupMenu ( ) ; mRocLinesPanel = new RocLinesPanel ( this ) ; mScrollPane = new JScrollPane ( mRocLinesPanel , JScrollPane . VERTICAL_SCROLLBAR_AS_NEEDED , JScrollPane . HORIZONTAL_SCROLLBAR_NEVER ) ; mScrollPane . setWheelScrollingEnabled ( true ) ; mLineWidthSlider = new JSlider ( JSlider . HORIZONTAL , LINE_WIDTH_MIN , LINE_WIDTH_MAX , 1 ) ; mScoreCB = new JCheckBox ( "Show Scores" ) ; mScoreCB . setSelected ( true ) ; mSelectAllCB = new JCheckBox ( "Select / Deselect all" ) ; mTitleEntry = new JTextField ( "ROC" ) ; mTitleEntry . setMaximumSize ( new Dimension ( Integer . MAX_VALUE , mTitleEntry . getPreferredSize ( ) . height ) ) ; mOpenButton = new JButton ( "Open..." ) ; mOpenButton . setToolTipText ( "Add a new curve from a file" ) ; mCommandButton = new JButton ( "Cmd" ) ; mCommandButton . setToolTipText ( "Send the equivalent rocplot command-line to the terminal" ) ; final ImageIcon icon = createImageIcon ( "com/rtg/graph/resources/realtimegenomics_logo.png" , "RTG Logo" ) ; mIconLabel = new JLabel ( icon ) ; mIconLabel . setBackground ( new Color ( 16 , 159 , 205 ) ) ; mIconLabel . setForeground ( Color . WHITE ) ; mIconLabel . setOpaque ( true ) ; mIconLabel . setFont ( new Font ( "Arial" , Font . BOLD , 24 ) ) ; mIconLabel . setHorizontalAlignment ( JLabel . LEFT ) ; mIconLabel . setIconTextGap ( 50 ) ; mGraphType = new JComboBox < > ( new String [ ] { ROC_PLOT , PRECISION_SENSITIVITY } ) ; mGraphType . setSelectedItem ( precisionRecall ? PRECISION_SENSITIVITY : ROC_PLOT ) ; configureUI ( ) ; }
creates a new swing plot .
