0% found this document useful (0 votes)
13 views

tmp_Controller

Uploaded by

ledat5934
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

tmp_Controller

Uploaded by

ledat5934
Copyright
© © All Rights Reserved
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

package com.nichga.

proj97;

import javafx.fxml.FXML;
import javafx.scene.control.Button;
import javafx.event.ActionEvent;
import javafx.scene.control.Label;
import javafx.scene.image.ImageView;
import javafx.scene.layout.FlowPane;

import java.io.IOException;

public class UserMainDashboardController extends StageController {


private Users user;
protected void setUser(Users user) {
this.user = user;
userID.setText(user.getName());
}
@FXML
private Label userID;
@FXML
private Button signOut;
@FXML
private FlowPane tagsField;
@FXML
private Label docName;
@FXML
private ImageView image;
private void displayTags(Documents doc) {
tagsField.getChildren().clear();
for(String tags : doc.tag) {
Button tagLabel = new Button(tags);
tagLabel.getStyleClass().add("function-button");
tagLabel.setPrefSize(68,31);
// c�i d?t ch?c nang sau khi b?m v�o n�t hi?n ra danh s�ch c�c document
c� c�ng tag.
tagsField.getChildren().add(tagLabel);
}
}
private void displayDoc(Documents doc) {
docName.setText(doc.getTitle());
displayTags(doc);
//set image cho image view ? d�y.
}
public void signOut(ActionEvent e) throws IOException {
super.goToNextStage("LogIn.fxml", signOut, null);
}
}

You might also like