Example #1
0
  public VideoOutput() {
    placeholder = new Placeholder();
    registerPort(Port.IN, new DefaultVideoInputPort(placeholder));
    client = new OutputClientImpl();
    wHints = new WindowHints();

    registerControl(
        "title", StringProperty.builder().binding(new TitleBinding()).emptyIsDefault().build());

    device =
        ArgumentProperty.builder()
            .emptyIsDefault()
            .suggestedValues(
                PNumber.valueOf(1), PNumber.valueOf(2), PNumber.valueOf(3), PNumber.valueOf(4))
            .build();
    width = ArgumentProperty.builder().emptyIsDefault().build();
    height = ArgumentProperty.builder().emptyIsDefault().build();
    rotation =
        ArgumentProperty.builder()
            .emptyIsDefault()
            .suggestedValues(
                PNumber.valueOf(0), PNumber.valueOf(90), PNumber.valueOf(180), PNumber.valueOf(270))
            .build();
    registerControl("device", device);
    registerControl("width", width);
    registerControl("height", height);
    registerControl("rotation", rotation);

    registerControl("full-screen", BooleanProperty.create(new FullScreenBinding(), false));
    registerControl("always-on-top", BooleanProperty.create(new AlwaysOnTopBinding(), false));
    registerControl("undecorated", BooleanProperty.create(new UndecoratedBinding(), false));
  }
Example #2
0
 private Integer getInteger(Argument val) {
   if (val.isEmpty()) {
     return null;
   } else {
     try {
       return PNumber.coerce(val).toIntValue();
     } catch (ArgumentFormatException ex) {
       return null;
     }
   }
 }