private void initType(Type type) {
    this.type = type;

    if (!Objects.isNull(type)) {
      getStyleClass().add(type.name().toLowerCase());
    } else {
      // don't add any buttonTypes if type is null
      return;
    }

    switch (type) {
      case INPUT:
        getButtonTypes().setAll(ButtonType.OK, ButtonType.CANCEL);
        break;
      case ERROR:
        getButtonTypes().setAll(ButtonType.CLOSE);
        break;
      case WARNING:
        getButtonTypes().setAll(ButtonType.OK, ButtonType.CANCEL);
        break;
      case CONFIRMATION:
        getButtonTypes().setAll(ButtonType.YES, ButtonType.NO);
        break;
      default: // INFORMATION
        getButtonTypes().setAll(ButtonType.OK);
    }
  }
Builds and fully initializes a {@link WorkbenchDialog} object.

@return the {@link WorkbenchDialog} object
workbenchfx-core/src/main/java/com/dlsc/workbenchfx/model/WorkbenchDialog.java