Ejemplo n.º 1
0
  public FlatbedDpiChooser(ObjectProperty<FlatbedDpi> property) {
    super("Select DPI", property);

    final FlatbedDpi lastUsedDpi = model.getFlatbedDpi();

    for (FlatbedDpi dpi : FlatbedDpi.values()) {
      addButton(dpi.toString(), dpi, (lastUsedDpi == dpi));
    }
  }
Ejemplo n.º 2
0
/**
 * A widget that allows the user to select a DPI setting.
 *
 * <p>The user's election is saved to PlateModel.
 */
public class FlatbedDpiChooser extends RadioButtonChooser<FlatbedDpi> {

  private final PlateModel model = PlateModel.getInstance();

  public FlatbedDpiChooser(ObjectProperty<FlatbedDpi> property) {
    super("Select DPI", property);

    final FlatbedDpi lastUsedDpi = model.getFlatbedDpi();

    for (FlatbedDpi dpi : FlatbedDpi.values()) {
      addButton(dpi.toString(), dpi, (lastUsedDpi == dpi));
    }
  }
}