title: Design choice: multiple choices dialog?
body: <p>I need to create and display several multiple choices dialogs. Those are dialogs with 3 or more buttons, like for instance "copy/move/link", or "replace/overwrite/ignore", that sort of thing.</p>
  
  <p>I'm stuck with three competing implementation ideas, and none of them seems good enough:</p>
  
  <ul>
  <li>Creating dialogs for each problem, and returning the result as an enum,</li>
  <li>Creating a dynamic dialog that takes a vararg of String, turn them into buttons using the String as labels, and return the selected String as a result.</li>
  <li>Creating a dialog that take a vararg of DialogChoice, an interface I would create with a getText() method for the label and an act() method that is called when the DialogChoice is selected.</li>
  </ul>
  
  <p>The first one will obviously produce redundant code, but the return type of the second one is quite dirty. The third seems the best so far, but it looks like some kind of disguised functional code and I'm not sure if that's the healthy OO way of doing things.</p>
  
  <p>So, is there another solution that I omitted, am I completely reinventing the wheel, or is one of these three ideas the best one? </p>
  
  <p>Edit : I'm using JavaFx so there's no built-in mechanisms that I could reuse, but it's more of a general question that can be adapted to multiple frameworks, or even multiple languages. I only included the Java tag so as not to confuse people with the "enum" and "interface" keywords.</p>