Examples of Vbox


Examples of com.alexecollins.vbox.core.VBox

  public VBox call() throws Exception {

    if (!target.exists() && !target.mkdirs())
      throw new IllegalStateException(target + " does not exit and cannot create");

    final VBox box = new VBox(context, resource.toURI());

    for (String f : ImmutableSet.<String>builder()
        .addAll(Arrays.asList("MediaRegistry.xml", "VirtualBox.xml", "Manifest.xml", "Provisioning.xml", "Profile.xml"))
        .addAll(box.getManifest().getFile()).build()) {
      FileUtils.copyURLToFile(getClass().getResource("/" + templateName + "/" + f), new File(target, f));
    }

    LOGGER.info("created " + target);
    return new VBox(context, target.toURI());
  }
View Full Code Here

Examples of com.eagerlogic.cubee.client.components.VBox

        ScrollPanel sp = new ScrollPanel();
        sp.widthProperty().bind(this.clientWidthProperty());
        sp.heightProperty().bind(this.clientHeightProperty());
        this.getChildren().add(sp);
       
        VBox root = new VBox();
        sp.setContent(root);
       
        boolean isFirst = true;
        for (AttributeGroup group : groups) {
            if (isFirst) {
                isFirst = false;
            } else {
                root.addEmptyCell(10);
            }
           
            AttributeGroupView agv = new AttributeGroupView(group);
            agv.widthProperty().bind(this.clientWidthProperty());
            root.getChildren().add(agv);
        }
    }
View Full Code Here

Examples of com.eagerlogic.cubee.client.components.VBox

        if (attributeGroup == null) {
            throw new NullPointerException("The attributeGroup parameter can not be null.");
        }
        this.attributeGroup = attributeGroup;
       
        VBox root = new VBox();
        this.getChildren().add(root);
       
        final boolean nameVisible = attributeGroup.getName() != null;
       
        if (nameVisible) {
            // TODO set styleable
            collapseLabel = new CollapseLabel();
            collapseLabel.widthProperty().bind(this.clientWidthProperty());
            collapseLabel.textProperty().set(attributeGroup.getName());
            collapseLabel.collapsedProperty().bidirectionalBind(collapsed);
            root.getChildren().add(collapseLabel);
           
            root.addEmptyCell(2);
           
            Panel pnlSep = new Panel();
            pnlSep.widthProperty().bind(clientWidthProperty());
            // TODO set styleable
            pnlSep.heightProperty().set(1);
            // TODO set styleable
            pnlSep.backgroundProperty().set(new ColorBackground(Color.BLACK));
            root.getChildren().add(pnlSep);
           
            root.addEmptyCell(2);
        }
       
        attributesPanel = new Panel();
        attributesPanel.widthProperty().bind(new AExpression<Integer>() {
           
            {
                bind(clientWidthProperty());
            }

            @Override
            public Integer calculate() {
                return clientWidthProperty().get() - 10;
            }
        });
        attributesPanel.translateXProperty().set(10);
        root.getChildren().add(attributesPanel);
       
        vbAttributes = new VBox();
        attributesPanel.getChildren().add(vbAttributes);
       
        for (AAttribute<?> attribute : attributeGroup.getAttributes()) {
            AttributePanelItem item = new AttributePanelItem(attribute);
            item.widthProperty().bind(attributesPanel.clientWidthProperty());
View Full Code Here

Examples of javafx.scene.layout.VBox

    UISession.getMediaView().setFitWidth(1);
    UISession.getMediaView().setFitHeight(1);
    UISession.getMediaView().setPreserveRatio(false);

    final VBox vbox = new VBox();
    final HBox hbox = new HBox(2);
    final int bands = UISession.getMediaPlayer().getAudioSpectrumNumBands() - 20;
    final Rectangle[] rects = new Rectangle[bands];
    for (int i = 0; i < rects.length; i++) {
      rects[i] = new Rectangle();
      rects[i].getTransforms().add(new Rotate(180, 0, 0)); //
      rects[i].setFill(Color.GRAY);
      rects[i].setArcHeight(screenHeight);
      hbox.getChildren().add(rects[i]);

    }

    final Text durationLabel = new Text(25, 25, MediaUtils.activeInfo);
    durationLabel.setFill(Color.WHITESMOKE);
    durationLabel.setFont(Font.font(java.awt.Font.SANS_SERIF, 25));
    final DropShadow ds = new DropShadow();
    ds.setOffsetY(3.0f);
    ds.setColor(Color.BLACK);

    durationLabel.setEffect(ds);

    vbox.getChildren().add(hbox);
    root.getChildren().add(UISession.getMediaView());
    root.getChildren().add(vbox);

    root.getChildren().add(durationLabel);
    durationLabel.setTranslateX(-25);
    vbox.setMaxWidth(screenWidth);

    hbox.setTranslateY(translatLocation);
    final Scene scene = new Scene(root, screenWidth, screenHeight,
        Color.rgb(35, 35, 35));
    hbox.setMinWidth(screenWidth);
    final int bandWidth = screenWidth / rects.length;
    int recheight = 2;
    for (final Rectangle r : rects) {
      recheight++;
      r.setWidth(bandWidth);

      r.setHeight(recheight);
    }

    vbox.setMinSize(screenWidth, 100);

    vbox.setTranslateY(405 - 100);
    UISession.getMediaPlayer()
        .setAudioSpectrumListener(
            (v, v1, mags, floats1) -> {

              for (int i = 0; i < rects.length; i++) {
View Full Code Here

Examples of javafx.scene.layout.VBox

//        }
//      }
    if (remCnt != 0) {
      getChildren().clear();
    }
    VBox circleBox;
    Digit digit;
    char c;
    int d;
    Circle circle;
    for (int i=0; i<value.length(); i++) {
      c = value.charAt(i);
      if (remCnt != 0) {
        if (c == '.') {
          circleBox = new VBox();
          circleBox.setCache(true);
          circleBox.setCacheHint(CacheHint.SPEED);
          circleBox.setStyle("-fx-alignment: BOTTOM_LEFT;");
          circle = new Circle(0, 0, 6 * getScale(), onColor);
          circle.setCache(true);
          circle.setSmooth(false);
          circleBox.getChildren().add(circle);
          getChildren().add(circleBox);
        } else {
          d = c == '-' ? Digit.NEGATIVE_SIGN_DIGIT : Integer.valueOf(String.valueOf(c));
          digit = new Digit(getScale(), d, onColor, offColor);
          getChildren().add(digit);
View Full Code Here

Examples of javafx.scene.layout.VBox

    addIntensityChangeListener(gauge, gaugeRegion1, gaugeRegion2, gaugeRegion3, 0);
    addIntensityChangeListener(gauge, gaugeRegion2, gaugeRegion1, gaugeRegion3, 1);
    addIntensityChangeListener(gauge, gaugeRegion3, gaugeRegion1, gaugeRegion2, 2);
    final HBox gaugeIntensitySliders = new HBox(5d);
    gaugeIntensitySliders.getChildren().addAll(gaugeRegion1, gaugeRegion2, gaugeRegion3);
    final VBox col1 = new VBox();
    col1.getChildren().addAll(gauge, gaugeIntensitySliders);
   
    final Gauge gauge2 = new Gauge(IndicatorType.NEEDLE, 0.5d, 1d, null, -2, 45d, 90d, 5, 0);
    gauge2.setTickValue(0);
    final Gauge gauge4 = new Gauge(IndicatorType.NEEDLE, 0.5d, 1d, "%03d", 2, 135d, 90d, 9, 4);
    final VBox col2 = new VBox();
    col2.getChildren().addAll(gauge2, gauge4);

    final Gauge gauge5 = new Gauge(IndicatorType.KNOB, 1d, 1d, "%04.2f", 0, 0d, 360d, 20, 0);
    gauge5.setTickValue(11.5d);
    final VBox col3 = new VBox();
    col3.getChildren().addAll(gauge5);
   
    final HBox row1 = new HBox();
    row1.getChildren().addAll(col1, col2, col3);
   
    final HBox row2 = new HBox();
View Full Code Here

Examples of javafx.scene.layout.VBox

            try {
            image = new Image(new FileInputStream(file));
          } catch (FileNotFoundException e1) {
            throw new RuntimeException(e1);
          }
            final VBox frame = new VBox(10);
            final ImageView imgView = new ImageView(image);
            frame.getStyleClass().add("displayshelfpopup");
            VBox.setMargin(imgView, new Insets(10, 10, 0, 10));
            final VBox info = new VBox();
            VBox.setMargin(info, new Insets(0, 10, 0, 10));
            final Text infoText = new Text(label.getText());
            infoText.setWrappingWidth(imgView.getImage().getWidth());
            info.setPrefHeight(imgView.getImage().getHeight() / 7);
            info.getChildren().add(infoText);
            frame.getChildren().addAll(imgView, info);
            final Popup popup = new Popup();
            popup.addEventHandler(MouseEvent.MOUSE_CLICKED, new EventHandler<MouseEvent>() {
              @Override
              public void handle(MouseEvent event) {
View Full Code Here

Examples of javafx.scene.layout.VBox

      titleBarRight.setPrefWidth(TOP_RIGHT_WIDTH);
        titleBarRight.setMaxWidth(TOP_RIGHT_WIDTH);
      //titleBarRight.getChildren().add(newMinMaxClose(stage, 0, TOP_BORDER_HEIGHT / 2 + TOP_MIN_MAX_CLOSE_Y));
        titleBar.getChildren().addAll(titleBarLeft, titleBarCenter, titleBarRight);
     
      final VBox leftBar = new VBox();
      leftBar.setId("border-left");
      leftBar.setPrefWidth(LEFT_BORDER_WIDTH);
      leftBar.setMaxWidth(LEFT_BORDER_WIDTH);
      leftBar.setTranslateX(1);
      Bindings.bindBidirectional(leftBar.translateYProperty(), content.translateYProperty());
      Bindings.bindBidirectional(leftBar.maxHeightProperty(), content.maxHeightProperty());
     
      final VBox rightBar = new VBox();
      rightBar.setId("border-right");
      rightBar.setPrefWidth(RIGHT_BORDER_WIDTH);
      rightBar.setMaxWidth(RIGHT_BORDER_WIDTH);
      Bindings.bindBidirectional(rightBar.translateYProperty(), content.translateYProperty());
      Bindings.bindBidirectional(rightBar.maxHeightProperty(), content.maxHeightProperty());
     
      final HBox statusBar = new HBox();
      //statusBar.setStyle("-fx-background-color: black;");
      statusBar.setPrefHeight(BOTTOM_BORDER_HEIGHT);
      statusBar.setMaxHeight(BOTTOM_BORDER_HEIGHT);
        final Region statusBarLeft = new Region();
        statusBarLeft.setId("status-bar-left");
        statusBarLeft.setPrefWidth(BOTTOM_LEFT_WIDTH);
        statusBarLeft.setMaxWidth(BOTTOM_LEFT_WIDTH);
      final Region statusBarCenter = new Region();
      statusBarCenter.setId("status-bar");
        HBox.setHgrow(statusBarCenter, Priority.ALWAYS);
      final HBox statusBarRight = new HBox();
      statusBarRight.setAlignment(Pos.BOTTOM_RIGHT);
      statusBarRight.setId("status-bar-right");
      statusBarRight.setPrefWidth(BOTTOM_RIGHT_WIDTH);
      statusBarRight.setMaxWidth(BOTTOM_RIGHT_WIDTH);
      if (isResizable) {
        final WindowReziseButton windowResizeButton = new WindowReziseButton(stage, this.getMinWidth(), this.getMinHeight());
        HBox.setMargin(windowResizeButton, new Insets(BOTTOM_BORDER_HEIGHT - 11, 0, 0, 0));
        statusBarRight.getChildren().addAll(windowResizeButton);
      }
        statusBar.getChildren().addAll(statusBarLeft, statusBarCenter, statusBarRight);
     
      // content adjustment
      stage.widthProperty().addListener(new InvalidationListener() {
      @Override
      public void invalidated(Observable observable) {
        content.setMaxWidth(stage.getWidth() - content.getTranslateX() - RIGHT_BORDER_WIDTH);
        rightBar.setTranslateX(content.getMaxWidth() - RIGHT_BORDER_WIDTH);
      }
    });
      stage.heightProperty().addListener(new InvalidationListener() {
      @Override
      public void invalidated(Observable observable) {
View Full Code Here

Examples of javafx.scene.layout.VBox

    final Parent laserCell = createCell(laserThreshold, laserTripGauge);
    add(laserCell, ++ci, ri);
  }

  protected void addDelayChildren(final int columnIndex, final int rowIndex) {
    final VBox sp = new VBox();
    final Label sonarDelayLabel = createLabel(KEY.SONAR_ALARM_DELAY);
    final UGateGaugeBox<RemoteNode> sonarTripRateGauge = new UGateGaugeBox<>(
        controlBar.getRemoteNodePA(),
        RemoteNodeType.SONAR_DELAY_BTWN_TRIPS, null,
        IndicatorType.NEEDLE, DELAY_SIZE_SCALE, 1d,
        RemoteNodeType.SONAR_DELAY_BTWN_TRIPS.getMin().intValue(), 0d, 180d,
        RemoteNodeType.SONAR_DELAY_BTWN_TRIPS.getMax().intValue() + 1, 0,
        FORMAT_DELAY, RS.IMG_STOPWATCH, GuiUtil.COLOR_SONAR);
    controlBar.addHelpTextTrigger(sonarTripRateGauge, RS.rbLabel(KEY.SONAR_ALARM_DELAY_DESC));
    sonarTripRateGauge.gauge.setIntensity(Color.TRANSPARENT, Color.TRANSPARENT, Color.TRANSPARENT);
    sp.getChildren().addAll(sonarDelayLabel, sonarTripRateGauge);

    final VBox pp = new VBox();
    final Label pirDelay = createLabel(KEY.PIR_ALARM_DELAY);
    final UGateGaugeBox<RemoteNode> pirTripRateGauge = new UGateGaugeBox<>(
        controlBar.getRemoteNodePA(),
        RemoteNodeType.PIR_DELAY_BTWN_TRIPS, null,
        IndicatorType.NEEDLE, DELAY_SIZE_SCALE, 1d,
        RemoteNodeType.PIR_DELAY_BTWN_TRIPS.getMin().intValue(), 0d, 180d,
        RemoteNodeType.PIR_DELAY_BTWN_TRIPS.getMax().intValue() + 1, 0,
        FORMAT_DELAY, RS.IMG_STOPWATCH, GuiUtil.COLOR_PIR);
    controlBar.addHelpTextTrigger(pirTripRateGauge, RS.rbLabel(KEY.PIR_ALARM_DELAY_DESC));
    pirTripRateGauge.gauge.setIntensity(Color.TRANSPARENT, Color.TRANSPARENT, Color.TRANSPARENT);
    pp.getChildren().addAll(pirDelay, pirTripRateGauge);

    final VBox mp = new VBox();
    final Label mwDelay = createLabel(KEY.MW_ALARM_DELAY);
    final UGateGaugeBox<RemoteNode> mwTripRateGauge = new UGateGaugeBox<>(
        controlBar.getRemoteNodePA(),
        RemoteNodeType.MW_DELAY_BTWN_TRIPS, null, IndicatorType.NEEDLE,
        DELAY_SIZE_SCALE, 1d,
        RemoteNodeType.MW_DELAY_BTWN_TRIPS.getMin().intValue(), 0d, 180d,
        RemoteNodeType.MW_DELAY_BTWN_TRIPS.getMax().intValue() + 1, 0, FORMAT_DELAY,
        RS.IMG_STOPWATCH, GuiUtil.COLOR_MW);
    controlBar.addHelpTextTrigger(mwTripRateGauge, RS.rbLabel(KEY.MW_ALARM_DELAY_DESC));
    mwTripRateGauge.gauge.setIntensity(Color.TRANSPARENT, Color.TRANSPARENT, Color.TRANSPARENT);
    mp.getChildren().addAll(mwDelay, mwTripRateGauge);

    final VBox lp = new VBox();
    final Label laserDelay = createLabel(KEY.LASER_ALARM_DELAY);
    final UGateGaugeBox<RemoteNode> laserTripRateGauge = new UGateGaugeBox<>(
        controlBar.getRemoteNodePA(),
        RemoteNodeType.LASER_DELAY_BTWN_TRIPS, null,
        IndicatorType.NEEDLE, DELAY_SIZE_SCALE, 1d,
        RemoteNodeType.LASER_DELAY_BTWN_TRIPS.getMin().intValue(), 0d, 180d,
        RemoteNodeType.LASER_DELAY_BTWN_TRIPS.getMax().intValue() + 1, 0,
        FORMAT_DELAY, RS.IMG_STOPWATCH, GuiUtil.COLOR_LASER);
    controlBar.addHelpTextTrigger(laserTripRateGauge, RS.rbLabel(KEY.LASER_ALARM_DELAY_DESC));
    laserTripRateGauge.gauge.setIntensity(Color.TRANSPARENT, Color.TRANSPARENT, Color.TRANSPARENT);
    lp.getChildren().addAll(laserDelay, laserTripRateGauge);
   
    final HBox p = new HBox(CHILD_PADDING);
    p.setAlignment(Pos.CENTER);
    p.getChildren().addAll(sp, pp, mp, lp);
    final Parent cell = createCell(p);
View Full Code Here

Examples of javafx.scene.layout.VBox

   *            the nodes to add to the side (when null, the group returned
   *            will be null)
   * @return the {@linkplain Parent}
   */
  public static Parent createCell(final Node... nodes) {
    final VBox view = new VBox();
    VBox.setVgrow(view, Priority.ALWAYS);
    view.getStyleClass().add("section-pane");
    view.getChildren().addAll(nodes);
    return view;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.