@Override
    public void actionPerformed(final ActionEvent event) {
      if (event.getSource() == okButton) {
        if (Integer.parseInt(posterRows.getText()) < 0) {
          CMessageBox.showInformation(
              PrintGraphOptionsDialog.this, "Poster rows value must be greater than 0.");

          return;
        }
        if (Integer.parseInt(posterCols.getText()) < 0) {
          CMessageBox.showInformation(
              PrintGraphOptionsDialog.this, "Poster columns value must be greater than 0.");

          return;
        }
        if (Integer.parseInt(fontSize.getText()) < 0) {
          CMessageBox.showInformation(
              PrintGraphOptionsDialog.this, "Font size value must be greater than 0.");

          return;
        }

        okPressed = true;

        printer.setPosterRows(Integer.parseInt(posterRows.getText()));
        printer.setPosterColumns(Integer.parseInt(posterCols.getText()));
        printer.setClipType(
            clipArea.getSelectedIndex() == 0
                ? Graph2DPrinter.CLIP_GRAPH
                : Graph2DPrinter.CLIP_VIEW);
        printer.setPrintPosterCoords(posterCoords.getSelectedIndex() == 0);

        final Graph2DPrinter.DefaultTitleDrawable dtd = new Graph2DPrinter.DefaultTitleDrawable();
        dtd.setText(titleTextField.getText());
        dtd.setTitleBarColor(titleTextColor.getColor());
        dtd.setTextColor(titleBarColor.getColor());
        dtd.setFont(new Font("Dialog", Font.PLAIN, Integer.parseInt(fontSize.getText())));
        printer.setTitleDrawable(dtd);
      }

      dispose();
    }
Dialog for settings print options before printing the current graph view.
java/ui/src/main/java/com/google/security/zynamics/bindiff/gui/dialogs/printing/PrintGraphOptionsDialog.java