설정되지 않았습니다. 반환 된 값이 별에 설정되어 있지는 않지만. 그것은 버그평가 값은 내가 각 파일에 대한 데이터베이스에서 평가 등급을 얻기 위해 시도 controlsfx <a href="http://fxexperience.com/controlsfx/features/#rating" rel="nofollow noreferrer">http://fxexperience.com/controlsfx/features/#rating</a> 사자 아의 평가 기능을 사용하고
File apps = new File("D:\\SERVER\\Server Content\\Apps");
File[] applist = apps.listFiles();
ArrayList<File> applistar = new ArrayList<>();
rathboxar = new ArrayList<>();
for (File f : applist) {
applistar.add(f);
}
try {
for (File file : applistar) {
if (!file.getName().equals("icons")) {
String appname = file.getName();
System.out.println("app name:" + appname);
*String strat = downloadcontroller.getThatRating(appname);* //retrieving rating value for each file
System.out.println("Rating string:" + strat);
double ratval = Double.parseDouble(strat);
rating = new Rating();
rating.setPartialRating(true);
*rating.setRating(ratval);*// setting the value on stars
rating.setMaxSize(100, 20);
ratinghbox = new HBox();
ratinghbox.getChildren().add(rating);
rathboxar.add(ratinghbox);
}
}
} catch (RemoteException ex) {
Logger.getLogger(HomeUI_2Controller.class.getName()).log(Level.SEVERE, null, ex);
} catch (SQLException ex) {
Logger.getLogger(HomeUI_2Controller.class.getName()).log(Level.SEVERE, null, ex);
} catch (ClassNotFoundException ex) {
Logger.getLogger(HomeUI_2Controller.class.getName()).log(Level.SEVERE, null, ex);
}
File tempfile2 = new File("D:\\client\\Temp\\appicons");
File[] filelist1 = tempfile2.listFiles();
gridpane.setAlignment(Pos.CENTER);
gridpane.setPadding(new Insets(20, 20, 20, 20));
gridpane.setHgap(20);
gridpane.setVgap(20);
ColumnConstraints columnConstraints = new ColumnConstraints();
columnConstraints.setFillWidth(true);
columnConstraints.setHgrow(Priority.ALWAYS);
gridpane.getColumnConstraints().add(columnConstraints);
int imageCol = 0;
int imageRow = 0;
for (int i = 0; i < filelist1.length; i++) {
//System.out.println(filelist1[i].getName());
image = new Image(filelist1[i].toURI().toString());
pic = new ImageView();
pic.setFitWidth(130);
pic.setFitHeight(130);
pic.setImage(image);
vb = new VBox();
*vb.getChildren().addAll(pic, (Button) btnar.get(i), (HBox) rathboxar.get(i));*//adding rathboxar to vbox
gridpane.add(vb, imageCol, imageRow);
GridPane.setMargin(pic, new Insets(2, 2, 2, 2));
imageCol++;
// To check if all the 3 images of a row are completed
if (imageCol > 2) {
// Reset Column
imageCol = 0;
// Next Row
imageRow++;
}
}
에서 문제 보고서를 제출해야합니까? ratval의 SimY4 값 @ – SimY4
당신이 어떤 예외를 얻거나 다른 루프에서 다른 곳 –
@KumaranathFernado 잘 즉, 작동해야합니다. 코드가 업데이트되었습니다! – ItachiUchiha