@FXML
  private void onTempModificationButtonClicked(MouseEvent event) throws IOException {
    PreparedStatement statement;
    ResultSet result;
    Connection connection;

    String insertStatement =
        "UPDATE ATRACAO SET DESCRICAO = \'"
            + textArea2.getText()
            + "\', CLASSIFICACAOETARIA = "
            + textField3.getText()
            + ",DATA = TO_DATE(\'"
            + textField6.getText()
            + "\',\'MM/DD/YYYY\')"
            + "WHERE ATRACAO.IDATRACAO = "
            + textField1.getText();
    System.out.println(insertStatement);
    try {
      Class.forName("oracle.jdbc.driver.OracleDriver");
      connection =
          DriverManager.getConnection(
              "jdbc:oracle:thin:@grad.icmc.usp.br:15215:orcl", "7960690", "a");
      System.out.println(insertStatement);
      statement = connection.prepareStatement(insertStatement);
      statement.executeUpdate();

      statement.close();
      connection.close();
      atracoes.get(currentSelectedRow).setDescricao(textArea2.getText());
      atracoes.get(currentSelectedRow).setClassificacaoEtaria(textField3.getText());
      atracoes.get(currentSelectedRow).setData(textField6.getText());
    } catch (SQLException | ClassNotFoundException ex) {
      Logger.getLogger(IncludeTupleController.class.getName()).log(Level.SEVERE, null, ex);
    }
  }
Пример #2
0
  public ViewChat() {

    // chatWindow properties
    chatWindow.setMinHeight(240);
    chatWindow.setEditable(false);

    // send group
    chatBox.setMinWidth(480);
    sendButton.setMinWidth(100);
    sendButton.setOnAction(this::sendButtonAction);
    chatBox.setOnKeyPressed(this::chatBoxKey);

    HBox sendGroup = new HBox(chatBox, sendButton);
    sendGroup.setPadding(new javafx.geometry.Insets(10, 10, 10, 10));

    // add all controllers to view
    this.setMinWidth(600);
    this.getChildren().add(chatWindow);
    this.getChildren().add(sendGroup);

    // start chat client
    try {
      chatClient = new ChatClient();
      chatClient.initialize(getUserName(), chatWindow);
    } catch (RemoteException e) {
      e.printStackTrace();
    }

    // chatBox focus
    Platform.runLater(chatBox::requestFocus);
  }
Пример #3
0
  private VBox LeftArea() {
    System.out.println("Gui.leftarea()");
    VBox leftArea = new VBox();

    input = new TextField();
    this.rawExile = new TextArea();
    input.setPrefColumnCount(88);
    rawExile.setPrefColumnCount(88);
    rawExile.setPrefHeight(1530);
    input.setPrefHeight(50);
    input.setOnKeyReleased(
        new EventHandler<KeyEvent>() {
          @Override
          public void handle(KeyEvent keyEvent) {
            if (keyEvent.getCode() == KeyCode.ENTER) {
              try {
                et.getOutputStream()
                    .write(input.getText().getBytes(), 0, input.getText().getBytes().length);
                et.getOutputStream().flush();
                input.setText("");
              } catch (IOException e) {
                // TODO Auto-generated catch block
                e.printStackTrace();
              }
            }
          }
        });
    leftArea.getChildren().add(rawExile);
    leftArea.getChildren().add(input);
    return leftArea;
  }
Пример #4
0
 public void setScore(Score score) {
   ScoreInfo info = score.getInfo();
   lblTitle.setText(info.getTitle());
   txtWorkNumber.setText(info.getWorkNumber());
   txtWorkTitle.setText(info.getWorkTitle());
   txtMovementNumber.setText(info.getMovementNumber());
   txtMovementTitle.setText(info.getMovementTitle());
   // creators
   String s = "-";
   if (info.getCreators().size() > 0) {
     s = "";
     for (Creator creator : info.getCreators())
       s += (creator.getType() != null ? creator.getType() + ": " : "") + creator.getName() + "\n";
   }
   txtCreators.setText(s);
   // rights
   s = "-";
   if (info.getRights().size() > 0) {
     s = "";
     for (Rights rights : info.getRights())
       s += (rights.getType() != null ? rights.getType() + ": " : "") + rights.getText() + "\n";
   }
   txtRights.setText(s);
   // parts
   s = "-";
   if (score.getStavesList().getParts().size() > 0) {
     s = "";
     for (int i : range(score.getStavesList().getParts())) {
       Part part = score.getStavesList().getParts().get(i);
       s += i + ": " + part.getName() + "\n";
     }
   }
   txtParts.setText(s);
 }
  private void showDialog(String title, String message, Throwable throwable) {
    Alert alert = new Alert(Alert.AlertType.ERROR);
    alert.setTitle(title);
    alert.setHeaderText(title);
    alert.setContentText(message);
    StringWriter stringWriter = new StringWriter();
    PrintWriter printwriter = new PrintWriter(stringWriter);
    throwable.printStackTrace(printwriter);
    String exceptionText = stringWriter.toString();

    Label label = new Label("The exception stacktrace was:");

    TextArea textArea = new TextArea(exceptionText);
    textArea.setEditable(false);
    textArea.setWrapText(true);

    textArea.setMaxWidth(Double.MAX_VALUE);
    textArea.setMaxHeight(Double.MAX_VALUE);
    GridPane.setVgrow(textArea, Priority.ALWAYS);
    GridPane.setHgrow(textArea, Priority.ALWAYS);

    GridPane expContent = new GridPane();
    expContent.setMaxWidth(Double.MAX_VALUE);
    expContent.add(label, 0, 0);
    expContent.add(textArea, 0, 1);

    alert.getDialogPane().setExpandableContent(expContent);
    alert.showAndWait();
  }
Пример #6
0
  private void generateLineNumbers(int breakCount) {
    StringBuilder builder = new StringBuilder();

    final int maxDigits = Integer.toString(breakCount).length();

    for (int i = 0; i < breakCount; i++) {
      String marker = StringUtil.padLineNumber(i + 1, maxDigits);

      builder.append(marker).append(C_NEWLINE);
    }

    taLineNumbers.setText(builder.toString());
    taLineNumbers.setMaxWidth(40 + maxDigits * 25);

    sbSource = (ScrollBar) taSource.lookup(".scroll-bar:vertical");
    sbLineNum = (ScrollBar) taLineNumbers.lookup(".scroll-bar:vertical");

    if (sbLineNum != null) {
      sbLineNum.setOpacity(0.0);
    }

    if (sbSource != null && sbLineNum != null && !scrollLinked) {
      linkScrollBars();
    }
  }
Пример #7
0
  @Override
  public void start(Stage primaryStage) throws Exception {
    BorderPane root = new BorderPane();
    HBox message = new HBox();

    userText = new TextField();
    userText.setEditable(false);
    userText.setOnAction(
        e -> {
          sendMessage(e.getEventType().toString());
          userText.setText("");
        });

    message.getChildren().add(userText);
    message.setAlignment(Pos.CENTER);
    message.setPadding(new Insets(10));

    chatWindow = new TextArea();
    chatWindow.setPrefSize(300, 150);
    chatWindow.setVisible(true);

    root.setCenter(chatWindow);
    root.setBottom(message);

    startRunning();
    primaryStage.setTitle("Instant Messenger");
    primaryStage.setScene(new Scene(root, 300, 275));
    primaryStage.show();
  }
  @FXML
  public void initialize() {
    initializeWorkflowProcessesComboBox();

    // TODO (artf231901): must move to model to handle other WorkflowProcessModel types
    instructionsTextArea.clear();

    promotionPathCoordinateLabel.setText(getDefaultPromotionPathCoordinateTextFieldContent());

    instructionsTextArea.setOnKeyTyped(
        (e) -> initiateButton.setDisable(!isDataRequiredForInitiateOk()));
    instructionsTextArea.addEventHandler(
        InputEvent.ANY,
        new EventHandler<InputEvent>() {
          @Override
          public void handle(InputEvent event) {
            initiateButton.setDisable(!isDataRequiredForInitiateOk());
          }
        });

    cancelButton.setOnAction((e) -> doCancel());

    initiateButton.setDisable(!isDataRequiredForInitiateOk());
    initiateButton.setOnAction(
        new EventHandler<ActionEvent>() {
          @Override
          public void handle(ActionEvent event) {
            initiateWorkflow();
          }
        });
  }
Пример #9
0
 /** Mets l'UI en état de chargement. */
 private void nowLoading() {
   notGood.setDisable(true);
   good.setDisable(true);
   text.setDisable(true);
   text.setText("");
   progress.setProgress(-1);
 }
Пример #10
0
 private void onRequestUpload() {
   if (tempAttachments.size() < 3) {
     FileChooser fileChooser = new FileChooser();
     fileChooser.setTitle("Open file to attach");
     /* if (Utilities.isUnix())
     fileChooser.setInitialDirectory(new File(System.getProperty("user.home")));*/
     File result = fileChooser.showOpenDialog(stage);
     if (result != null) {
       try {
         URL url = result.toURI().toURL();
         try (InputStream inputStream = url.openStream()) {
           byte[] filesAsBytes = ByteStreams.toByteArray(inputStream);
           if (filesAsBytes.length <= Connection.getMaxMsgSize()) {
             tempAttachments.add(
                 new DisputeDirectMessage.Attachment(result.getName(), filesAsBytes));
             inputTextArea.setText(
                 inputTextArea.getText() + "\n[Attachment " + result.getName() + "]");
           } else {
             new Popup().error("The max. allowed file size is 100 kB.").show();
           }
         } catch (java.io.IOException e) {
           e.printStackTrace();
           log.error(e.getMessage());
         }
       } catch (MalformedURLException e2) {
         e2.printStackTrace();
         log.error(e2.getMessage());
       }
     }
   } else {
     new Popup().error("You cannot send more then 3 attachments in one message.").show();
   }
 }
Пример #11
0
  public MainScreenView(final MainScreenController controller) {
    // Setup Job  List:
    listView_jobs.getSelectionModel().setSelectionMode(SelectionMode.MULTIPLE);

    // Setup output area:
    textArea_output.setEditable(false);
    textArea_output.setFocusTraversable(false);

    // Set Component Tooltips:
    button_createJob.setTooltip(new Tooltip("Open the Job creation dialog to create a new Job."));
    button_deleteSelectedJobs.setTooltip(
        new Tooltip("Removes all Jobs that are currently selected on the list."));
    button_deleteAllJobs.setTooltip(new Tooltip("Clears the list of all Jobs."));
    button_clearOutput.setTooltip(new Tooltip("Clears the output screen."));
    button_editSettings.setTooltip(new Tooltip("Open the settings menu."));
    button_encode.setTooltip(new Tooltip("Encodes the selected handler(s)."));
    button_decode.setTooltip(
        new Tooltip(
            "Decodes the selected handler(s).\n\n"
                + "No checking is done to see if the files have ever been encoded,\n"
                + "so it's up to you to ensure you're decoding the correct files."));

    // Set Component EventHandlers:
    button_createJob.setOnAction(controller);
    button_encode.setOnAction(controller);
    button_decode.setOnAction(controller);
    button_deleteSelectedJobs.setOnAction(controller);
    button_deleteAllJobs.setOnAction(controller);
    button_clearOutput.setOnAction(controller);
    button_editSettings.setOnAction(controller);

    // Setup the Layout:
    final HBox panel_left_top = new HBox(10);
    panel_left_top.setAlignment(Pos.CENTER);
    panel_left_top
        .getChildren()
        .addAll(button_createJob, button_deleteSelectedJobs, button_deleteAllJobs);

    final HBox panel_left_bottom = new HBox(10);
    panel_left_bottom.setAlignment(Pos.CENTER);
    panel_left_bottom.getChildren().addAll(button_encode, button_decode);

    final VBox panel_left = new VBox(4);
    HBox.setHgrow(panel_left, Priority.ALWAYS);
    VBox.setVgrow(listView_jobs, Priority.ALWAYS);
    panel_left.getChildren().addAll(panel_left_top, listView_jobs, panel_left_bottom);

    final BorderPane panel_right_bottom = new BorderPane();
    panel_right_bottom.setLeft(button_clearOutput);
    panel_right_bottom.setRight(button_editSettings);

    final VBox panel_right = new VBox(4);
    HBox.setHgrow(panel_right, Priority.ALWAYS);
    VBox.setVgrow(textArea_output, Priority.ALWAYS);
    panel_right.getChildren().addAll(textArea_output, panel_right_bottom);

    this.setSpacing(4);
    this.getChildren().addAll(panel_left, panel_right);
  }
 private void setOperaciones() {
   txtArea.setText("");
   ArrayList aux = interprete.getOperaciones();
   int i = 0;
   while (i < aux.size()) {
     txtArea.setText(txtArea.getText() + "\n" + aux.get(i++));
   }
 }
  private boolean validate(String title) {
    if (instructionsTextArea.getText() == null || instructionsTextArea.getText().length() == 0) {
      String msg = "Instructions text field is empty";
      String details = "Must enter instructions into instructions text field";
      AppContext.getCommonDialogs().showErrorDialog(title, msg, details, workflowInitiationView);
      return false;
    }

    if (workflowProcessesComboBox.getSelectionModel().getSelectedItem()
        == WorkflowProcess.REVIEW3) {
      //			if (editPathCoordinateTextField.getText() == null
      //					|| editPathCoordinateTextField.getText().length() == 0) {
      //				String msg = "Edit view coordinate UUID text field is empty";
      //				String details = "Must enter edit view coordinate UUID into edit coordinate text field";
      //				AppContext.getCommonDialogs().showErrorDialog(title, msg, details,
      // AppContext.getMainApplicationWindow().getPrimaryStage());
      //				return false;
      //			}
      if (promotionPathCoordinateLabel.getText() == null
          || promotionPathCoordinateLabel.getText().length() == 0) {
        String msg = "Promotion view coordinate is unset";
        String details = "Promotion view coordinate must be set in config file app.xml";
        AppContext.getCommonDialogs().showErrorDialog(title, msg, details, workflowInitiationView);
        return false;
      }
    } else if (workflowProcessesComboBox.getSelectionModel().getSelectedItem()
        == WorkflowProcess.DUAL_REVIEW) {
      //			if (editPathCoordinateTextField.getText() == null
      //			|| editPathCoordinateTextField.getText().length() == 0) {
      //		String msg = "Edit view coordinate UUID text field is empty";
      //		String details = "Must enter edit view coordinate UUID into edit coordinate text field";
      //		AppContext.getCommonDialogs().showErrorDialog(title, msg, details,
      // AppContext.getMainApplicationWindow().getPrimaryStage());
      //		return false;
      //	}
      if (promotionPathCoordinateLabel.getText() == null
          || promotionPathCoordinateLabel.getText().length() == 0) {
        String msg = "Promotion view coordinate is unset";
        String details = "Promotion view coordinate must be set in config file app.xml";
        AppContext.getCommonDialogs().showErrorDialog(title, msg, details, workflowInitiationView);
        return false;
      }
    } else {
      String msg =
          "Unsupported WorkflowProcessModel: "
              + workflowProcessesComboBox.getSelectionModel().getSelectedItem();
      String details =
          "Only WorkflowProcess."
              + WorkflowProcess.REVIEW3
              + " and WorkflowProcess."
              + WorkflowProcess.DUAL_REVIEW
              + " currently supported";
      AppContext.getCommonDialogs().showErrorDialog(title, msg, details, workflowInitiationView);
      return false;
    }

    return true;
  }
Пример #14
0
 @FXML
 public void sendGameLobbyMessage(Event evt) throws RemoteException {
   if (!"".equals(TaGameChat.getText())) {
     LobbySession.game.addToGameChat(LobbySession.user.getName() + ": " + TaGameChat.getText());
     initGameLobbyViews();
     TaGameChat.clear();
     loadGameLobbyChat();
   }
 }
  private void setField(TextArea field, ConfigDataHolder data) {
    field.clear();
    StringBuilder sb = new StringBuilder();
    for (Cluding i : getData()) {
      sb.append(i.toString());
      sb.append(CRLF);
    }

    field.setText(sb.toString());
  }
Пример #16
0
  // Send a message to the chat. Adding it to the lobbychat.
  @FXML
  public void sendLobbyMessage(Event evt) throws RemoteException {

    if (!"".equals(tfLobbyChat.getText())) {
      gameManager.addToChat(LobbySession.user.getName() + ": " + tfLobbyChat.getText());
      initViews();
      tfLobbyChat.clear();
      loadLobbyChat();
    }
  }
Пример #17
0
 public TextMetricViewer() {
   content.setStyle("-fx-font-family: monospace;");
   content.setEditable(false);
   content.setPrefSize(800, 120);
   AnchorPane.setTopAnchor(content, 14.0);
   AnchorPane.setLeftAnchor(content, 14.0);
   AnchorPane.setRightAnchor(content, 14.0);
   AnchorPane.setBottomAnchor(content, 14.0);
   pane.getChildren().add(content);
 }
 public void submit() {
   dbTextArea.clear();
   LocalDate from = fromDate.getValue(), to = toDate.getValue();
   Future<String[]> fwarNames = db.getWarNamesByDate(from, to);
   HashSet<Future<long[]>> fstats = new HashSet<Future<long[]>>();
   try {
     String[] warNames = fwarNames.get();
     for (String war : warNames) {
       fstats.add(db.getWarStats(war));
     }
     int i = 0;
     for (Future<long[]> fWarStats : fstats) {
       long[] stats = fWarStats.get();
       dbTextArea.appendText("\t" + warNames[i++] + " Statistics\n");
       dbTextArea.appendText("=========================================\n");
       dbTextArea.appendText('\t' + stats[0] == 0 ? "War is still running" : "\tWar has ended\n");
       dbTextArea.appendText("\tNum of launch missiles: " + stats[1] + "\n");
       dbTextArea.appendText("\tNum of intercept missiles: " + stats[2] + "\n");
       dbTextArea.appendText("\tNum of hit target missiles: " + stats[3] + "\n");
       dbTextArea.appendText("\tNum of launchers destroyed: " + stats[4] + "\n");
       dbTextArea.appendText("\ttotal damage: " + stats[5] + "\n");
       dbTextArea.appendText("==========================================\n");
     }
   } catch (InterruptedException | ExecutionException e) {
     e.printStackTrace();
   }
 }
Пример #19
0
 @FXML
 void onTweetButton(ActionEvent event) {
   String tweet = tweetTextArea.getText();
   try {
     @SuppressWarnings("unused")
     Status status = twitter.updateStatus(tweet);
     reloadHomeTL(lastStatusId);
   } catch (TwitterException e) {
     e.printStackTrace();
   }
   tweetTextArea.clear();
 }
  @FXML
  public void next() {

    if ((text.getText() != null) && (text.getText().equals("") == false)) {

      Analyzer.getInstance().productions.insertProduction(new Production(text.getText()));

    } else {

      showTextAlert();
    }

    clean();
  }
  public void setMovie(Movie movie) {
    ratingChoiceBox.valueProperty().bindBidirectional(movie.getCustomRatingProperty());
    customCommentText.textProperty().bindBidirectional(movie.getCustomCommentProperty());

    movieCoverImageView.setImage(movie.getImg());
    plotText.setText(movie.getPlot());
    titleLabel.setText(movie.getTitle());
    yearLabel.setText(Integer.toString(movie.getYear()));
    directorLabel.setText(movie.getDirector());
    genreLabel.setText(movie.getGenre());
    actorsText.setText(movie.getActors());
    runtimeLabel.setText(movie.getRuntime());
    ratingLabel.setText(Double.toString(movie.getRating()) + "/10");
  }
  @FXML
  private void buttonCheckClicked(Event event) {
    DefectSet leftSide = new DefectSet(prefix);
    DefectSet rightSide = new DefectSet(prefix);

    leftSide.load(textInputLeft.getText(), textPrefix.getText(), textMax.getText());
    rightSide.load(textInputRight.getText(), textPrefix.getText(), textMax.getText());

    labelInputLeft.setText(leftSide.size() + " defect(s) found.");
    labelInputRight.setText(rightSide.size() + " defect(s) found.");

    DefectSet outputLeft = leftSide.subtract(rightSide);
    DefectSet outputRight = rightSide.subtract(leftSide);
    DefectSet intersect = leftSide.intersect(rightSide);

    textOutputLeft.setStyle("-fx-text-fill: blue;");
    textOutputLeft.setText(outputLeft.listAll());
    labelOutputLeft.setText(outputLeft.size() + " missed defect(s) found.");

    textOutputRight.setStyle("-fx-text-fill: red;");
    textOutputRight.setText(outputRight.listAll());
    labelOutputRight.setText(outputRight.size() + " missed defect(s) found.");

    textOutputCenter.setStyle("-fx-text-fill: green;");
    textOutputCenter.setText(intersect.listAll());
    labelOutputCenter.setText(intersect.size() + " defect(s) covered by both side.");
  }
Пример #23
0
 @Override
 public void handle(ActionEvent event) {
   if (!commentaarveld.getText().isEmpty()) {
     if (exclamationField == null) {
       System.out.println("! = null");
     }
     if (commentaarveld == null) {
       System.out.println("Commentaarveld = null");
     }
     String timeStamp =
         new SimpleDateFormat("dd/MM/yyyy - HH:mm").format(Calendar.getInstance().getTime());
     exclamationField.setText(
         exclamationField.getText() + timeStamp + ": " + commentaarveld.getText() + "\n");
   }
 }
 protected void switchToTextArea() {
   if (textNode instanceof TextArea) {
     return;
   }
   // Move the node from TextField to TextArea
   TextArea textArea = new TextArea(textNode.getText());
   setTextEditorBehavior(this, textArea, valueListener);
   textArea.setPrefRowCount(5);
   setLayoutFormat(LayoutFormat.SIMPLE_LINE_TOP);
   if (textNode.getParent() != null) {
     // textNode is already in scene graph
     EditorUtils.replaceNode(textNode, textArea, getLayoutFormat());
   }
   textNode = textArea;
 }
Пример #25
0
 FFOTesterViewer(FFOTesterController controller, Board board) {
   this.controller = controller;
   this.board = board;
   this.com = new PVS(this, PatternRecognitioner.INSTANCE, 1, 40, 1000000000);
   TextArea log = controller.log;
   valueProperty()
       .addListener(
           (observable, oldValue, newValue) -> {
             log.appendText(com.toString());
             log.appendText(System.lineSeparator());
             log.appendText(newValue.toString());
             log.appendText(System.lineSeparator());
             completedUpdate = true;
           });
 }
 @FXML
 private void onClear(ActionEvent event) {
   scoreboard.clear();
   String string = scoreboard.toString();
   scoreboardArea.setText(string);
   serialize();
 }
 @SuppressWarnings("restriction")
 @FXML
 private void sendButtonPressed(ActionEvent action) {
   // Send message to server
   String text = sendTextArea.getText();
   websocketClientEndpoint.sendTextToServer(text);
 }
  /**
   * Initializes the controller class.
   *
   * @param url
   * @param rb
   */
  @Override
  public void initialize(URL url, ResourceBundle rb) {
    setupTable();
    inflateTable();

    atracaoTableView.setRowFactory(
        (TableView<Atracao> atracaoTablewView) -> {
          final TableRow<Atracao> row = new TableRow<>();
          row.addEventFilter(
              MouseEvent.MOUSE_PRESSED,
              (MouseEvent event) -> {
                final int index = row.getIndex();
                this.currentSelectedRow = index;
                if (index >= 0 && index < atracaoTablewView.getItems().size()) {
                  atracaoTableView.getSelectionModel().select(index);
                  textField1.setText(atracaoTableView.getItems().get(index).getIdAtracao());
                  textArea2.setText(atracaoTableView.getItems().get(index).getDescricao());
                  textField3.setText(
                      atracaoTableView.getItems().get(index).getClassificacaoEtaria());
                  textField4.setText(atracaoTableView.getItems().get(index).getLocal());
                  textField5.setText(atracaoTableView.getItems().get(index).getEvento());
                  textField6.setText(atracaoTableView.getItems().get(index).getData());
                  event.consume();
                }
              });
          return row;
        });
  }
Пример #29
0
  public void confirm(ActionEvent event) {
    String name = nameField.getText();
    if (S.isEmpty(name)) {
      tipsLabel.setText("错误:工具名字不能为空!");
      nameField.requestFocus();
      return;
    }
    String command = commandText.getText();
    String order = orderField.getText();
    ToolsTray bandeja = (ToolsTray) parentCombo.getSelectionModel().getSelectedItem();
    Integer parentId = bandeja.getId();
    ToolType toolType = (ToolType) typeCombo.getSelectionModel().getSelectedItem();
    String type = toolType.getToolType();

    ToolsTray toolsTray = new ToolsTray();
    toolsTray.setTrayName(name);
    toolsTray.setCommand(command);
    toolsTray.setParentId(parentId);
    toolsTray.setToolOrder(order);
    toolsTray.setToolType(type);
    if (null == id) {
      dao.insert(toolsTray);
      id = toolsTray.getId();
      tipsLabel.setText("添加成功:" + name);
    } else {
      toolsTray.setId(id);
      dao.update(toolsTray);
      tipsLabel.setText("更新成功:" + name);
    }
    refresh(null);
  }
Пример #30
0
 @FXML
 private void initialize() {
   textArea.setEditable(false);
   imageView.setImage(null);
   String imageResourceClass = getClass().getResource("recording.jpg").toString();
   recordingImage = new Image(imageResourceClass);
 }