Esempio n. 1
0
  private void clearModels() {
    structureStick.selectedProperty().unbind();
    structureBall.selectedProperty().unbind();
    structureMesh.selectedProperty().unbind();

    structureBall.setOnAction(event -> {});

    rnaSequence3D.getModels().clear();
  }
Esempio n. 2
0
 private void createShowAlertsButton() {
   showAlertsToggleButton = new ToggleButton(FontAwesome.ICON_WARNING);
   showAlertsToggleButton.setFont(Font.font("FontAwesome", 14));
   showAlertsToggleButton.setTextFill(Color.DARKGOLDENROD);
   showAlertsToggleButton.setTooltip(new Tooltip("Show/Hide Alerts."));
   showAlertsToggleButton.selectedProperty().bindBidirectional(showAlerts);
 }
Esempio n. 3
0
 private void createProxyRequestsButton() {
   proxyRequestsToggleButton = new ToggleButton(FontAwesome.ICON_EXCHANGE);
   proxyRequestsToggleButton.setFont(Font.font("FontAwesome", 14));
   proxyRequestsToggleButton.setTextFill(Color.BLACK);
   proxyRequestsToggleButton.setTooltip(new Tooltip("Enable/Disable Proxying via Burp"));
   proxyRequestsToggleButton.selectedProperty().bindBidirectional(isProxyingEnabled);
 }
Esempio n. 4
0
 private void createShowConsoleButton() {
   consoleToggleButton = new ToggleButton(FontAwesome.ICON_TERMINAL);
   consoleToggleButton.setFont(Font.font("FontAwesome", 14));
   consoleToggleButton.setTextFill(Color.DARKBLUE);
   consoleToggleButton.setTooltip(new Tooltip("Show/Hide Console."));
   consoleToggleButton.selectedProperty().bindBidirectional(isDetailNodeVisible);
 }
Esempio n. 5
0
 public boolean removeLinkButton() {
   if (!linkButtonContainer.getChildren().isEmpty()) {
     linkButton.selectedProperty().unbindBidirectional(linkedProperty);
     linkButton.disableProperty().unbind();
     linkButtonContainer.getChildren().clear();
     return true;
   } else {
     return false;
   }
 }
Esempio n. 6
0
  public ToggleButton addLinkButton(SceneItem scenario) {

    if (!linkButtonContainer.getChildren().isEmpty()) {
      linkButtonContainer.getChildren().clear();
    }

    linkedProperty = getLinkedProperty(scenario);
    linkButton = linkScenarioButton(linkedProperty);

    linkButton.selectedProperty().bindBidirectional(linkedProperty);
    playButton.bindToSelectedProperty(linkButton.disableProperty());

    linkButtonContainer.getChildren().add(linkButton);
    return linkButton;
  }
Esempio n. 7
0
  private void loadAllmodels() {
    rnaSequence3D.addModel(new StickModel());
    rnaSequence3D.addModel(new MeshModel());
    rnaSequence3D.addModel(new BallModel());

    structureStick.selectedProperty().unbind();
    structureMesh.selectedProperty().unbind();
    structureBall.selectedProperty().unbind();

    rnaSequence3D.getModels().get(0).visibleProperty().bind(structureStick.selectedProperty());
    rnaSequence3D.getModels().get(1).visibleProperty().bind(structureMesh.selectedProperty());
    rnaSequence3D.getModels().get(2).visibleProperty().bind(structureBall.selectedProperty());

    tertiaryRoom.getObject().getChildren().addAll(rnaSequence3D.getModels().get(0));
    tertiaryRoom.getObject().getChildren().addAll(rnaSequence3D.getModels().get(1));
    tertiaryRoom.getObject().getChildren().addAll(rnaSequence3D.getModels().get(2));
  }
Esempio n. 8
0
  @Override
  protected void onConfigure() {
    cfg = Configuration.getDefault();

    flinger = new Flinger();
    flinger.gapProperty().set(4);
    flinger
        .directionProperty()
        .setValue(cfg.isVertical() ? Direction.VERTICAL : Direction.HORIZONTAL);
    slideLeft.disableProperty().bind(flinger.leftOrUpDisableProperty());
    slideRight.disableProperty().bind(flinger.rightOrDownDisableProperty());
    shortcuts.getChildren().add(flinger);

    AnchorPane.setTopAnchor(flinger, 0d);
    AnchorPane.setBottomAnchor(flinger, 0d);
    AnchorPane.setLeftAnchor(flinger, 0d);
    AnchorPane.setRightAnchor(flinger, 0d);

    networkResources.setTooltip(
        UIHelpers.createDockButtonToolTip(resources.getString("network.toolTip")));
    networkResources.selectedProperty().bindBidirectional(cfg.showNetworkProperty());

    ssoResources.setTooltip(UIHelpers.createDockButtonToolTip(resources.getString("sso.toolTip")));
    ssoResources.selectedProperty().bindBidirectional(cfg.showSSOProperty());

    browserResources.setTooltip(
        UIHelpers.createDockButtonToolTip(resources.getString("web.toolTip")));
    browserResources.selectedProperty().bindBidirectional(cfg.showWebProperty());

    status.setTooltip(UIHelpers.createDockButtonToolTip(status.getTooltip().getText()));
    exit.setTooltip(UIHelpers.createDockButtonToolTip(exit.getTooltip().getText()));
    signIn.setTooltip(UIHelpers.createDockButtonToolTip(signIn.getTooltip().getText()));
    options.setTooltip(UIHelpers.createDockButtonToolTip(options.getTooltip().getText()));

    fileResources.setTooltip(
        UIHelpers.createDockButtonToolTip(resources.getString("files.toolTip")));
    fileResources.selectedProperty().bindBidirectional(cfg.showFilesProperty());

    // Button size changes
    sizeChangeListener =
        new ChangeListener<Number>() {
          @Override
          public void changed(
              ObservableValue<? extends Number> observable, Number oldValue, Number newValue) {
            flinger.recentre();
            sizeButtons();
          }
        };
    cfg.sizeProperty().addListener(sizeChangeListener);

    // Colour changes
    colorChangeListener =
        new ChangeListener<Color>() {
          @Override
          public void changed(
              ObservableValue<? extends Color> observable, Color oldValue, Color newValue) {
            // styleToolTips();
          }
        };
    cfg.colorProperty().addListener(colorChangeListener);

    // Border changes
    borderChangeListener =
        new ChangeListener<Boolean>() {

          @Override
          public void changed(
              ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {
            if (newValue) {
              flinger
                  .directionProperty()
                  .setValue(cfg.isVertical() ? Direction.VERTICAL : Direction.HORIZONTAL);
              configurePull();
            }
          }
        };
    cfg.topProperty().addListener(borderChangeListener);
    cfg.bottomProperty().addListener(borderChangeListener);
    cfg.leftProperty().addListener(borderChangeListener);
    cfg.rightProperty().addListener(borderChangeListener);

    dockContent.prefWidthProperty().bind(dockStack.widthProperty());

    // Hide the pull tab initially
    pull.setVisible(false);

    if (context.getBridge().isServiceUpdating()) {
      setMode(Mode.UPDATE);
    }

    rebuildResources();
    rebuildIcons();
    // styleToolTips();
    sizeButtons();
    setAvailable();
    configurePull();
    if (cfg.autoHideProperty().get()) maybeHideDock(INITIAL_AUTOHIDE_HIDE_TIME);
  }
Esempio n. 9
0
 private void bindMenuItemsToButtons() {
   pyrpurItem.selectedProperty().bindBidirectional(colorPyrpur.selectedProperty());
   augcItem.selectedProperty().bindBidirectional(colorAugc.selectedProperty());
   meshItem.selectedProperty().bindBidirectional(structureMesh.selectedProperty());
   stickItem.selectedProperty().bindBidirectional(structureStick.selectedProperty());
 }