Example #1
0
 public void set(Integer value) {
   if (value == null)
     throw new NullPointerException("Null not allowed as the value for index");
   if (value >= getItems().size())
     throw new IllegalArgumentException(
         "Index out of bounds: "
             + value
             + ", valid values are 0-"
             + (getItems().size() - 1));
   super.set(value);
 }
Example #2
0
  public void mount() {
    ContextMenu menu = new ContextMenu();

    MenuItem menuItem;
    for (Operation operation : operations.getOperations()) {
      menuItem = new MenuItem(operation.getName());
      menuItem.setOnAction((event) -> operation.getAction().accept(event));
      menu.getItems().add(menuItem);
    }

    control.setContextMenu(menu);
  }
  public void show(Control ownerControl) {

    Point2D point =
        ownerControl.localToScene(ownerControl.getWidth() / 2, ownerControl.getHeight());
    double x =
        point.getX() + ownerControl.getScene().getX() + ownerControl.getScene().getWindow().getX();
    double y =
        point.getY() + ownerControl.getScene().getY() + ownerControl.getScene().getWindow().getY();
    popup.show(ownerControl, x - getPopoverPointX(), y - getPopoverPointY());
  }
 @Override
 public void setMaxSize(double d, double d1) {
   super.setMaxSize(d, d1);
   textField.setMaxSize(d, d1);
 }
 @Override
 public void resize(double d, double d1) {
   super.resize(d, d1);
   textField.resize(d, d1);
 }
 @Override
 public void requestFocus() {
   super.requestFocus();
   textField.requestFocus();
 }
Example #7
0
 private void setSize(Control control, double width, double height) {
   control.setMaxSize(width, height);
   control.setMinSize(width, height);
   control.setPrefSize(width, height);
 }
 static {
   final List<CssMetaData<? extends Styleable, ?>> styleables =
       new ArrayList<>(Control.getClassCssMetaData());
   styleables.add(INNER_CIRCLE_RADIUS);
   STYLEABLES = Collections.unmodifiableList(styleables);
 }
Example #9
0
 public void set(Pos value) {
   if (value == null)
     throw new NullPointerException("Null not allowed as the value for alignment");
   super.set(value);
 }
Example #10
0
 public void set(ArrowPosition value) {
   if (value == null)
     throw new NullPointerException("Null not allowed as the value for arrowPosition");
   super.set(value);
 }
Example #11
0
 public void set(ObservableList<T> value) {
   if (value == null)
     throw new NullPointerException("Null not allowed as the value for items");
   super.set(value);
 }
Example #12
0
 public void set(Boolean value) {
   if (value == null)
     throw new NullPointerException("Null not allowed as the value for editable");
   super.set(value);
 }
Example #13
0
 public void set(T value) {
   if (getItems().indexOf(value) < 0)
     throw new IllegalArgumentException("Value does not exist in the list: " + value);
   super.set(value);
 }
Example #14
0
 static {
   List<CssMetaData<? extends Styleable, ?>> temp =
       new ArrayList<>(Control.getClassCssMetaData());
   Collections.addAll(temp, LCD_CLOCK_METADATA);
   cssMetaDataList = Collections.unmodifiableList(temp);
 }