diff --git a/PlayWall/assets/de/tobias/playpad/assets/dialog/project/openDialog.fxml b/PlayWall/assets/de/tobias/playpad/assets/dialog/project/openDialog.fxml index f5055c1aab8683e19be3be2e3face7f8b276b2f4..256e734cd33b06858e49ef69264824019c8b02b8 100644 --- a/PlayWall/assets/de/tobias/playpad/assets/dialog/project/openDialog.fxml +++ b/PlayWall/assets/de/tobias/playpad/assets/dialog/project/openDialog.fxml @@ -24,13 +24,13 @@ <children> <VBox spacing="14.0"> <children> - <Label text="%project.label.fileSize" /> + <Label text="%project.label.profile" /> <Label text="%project.label.lastModified" /> </children> </VBox> <VBox spacing="14.0"> <children> - <Label fx:id="sizeLabel" text="100 MB" /> + <Label fx:id="profileLabel" text="Default" /> <Label fx:id="dateLabel" text="20. Dez 2015 19:45" /> </children> </VBox> diff --git a/PlayWall/assets/de/tobias/playpad/assets/lang/ui_de.properties b/PlayWall/assets/de/tobias/playpad/assets/lang/ui_de.properties index 0a25de603931f3f67290f340ead6ffcc0bc2a300..9438e06b62639682604ff2e1351a3afefbc41a97 100644 --- a/PlayWall/assets/de/tobias/playpad/assets/lang/ui_de.properties +++ b/PlayWall/assets/de/tobias/playpad/assets/lang/ui_de.properties @@ -144,7 +144,7 @@ project.button.export=Exportieren... project.button.import=Importieren.. project.label.export=Wenn Sie ein ge�ffnetes Projekt exportieren, wird dieses zuerst gespeichert. project.label.name=Name: -project.label.fileSize=Dateigr��e +project.label.profile=Profile: project.label.lastModified=Zuletzt bearbeitet: project.export.label.headline=Projekt exportieren: diff --git a/PlayWall/src/de/tobias/playpad/viewcontroller/LaunchDialog.java b/PlayWall/src/de/tobias/playpad/viewcontroller/LaunchDialog.java index a1aa93939d236d0703ecfb71a8e02581e609fa3a..d659f482f881527f96cb000d17c10405ec4c776d 100644 --- a/PlayWall/src/de/tobias/playpad/viewcontroller/LaunchDialog.java +++ b/PlayWall/src/de/tobias/playpad/viewcontroller/LaunchDialog.java @@ -77,7 +77,7 @@ public class LaunchDialog extends ViewController implements ProfileChooseable { // Load project to list projectListView.setPlaceholder(new Label(getString(Strings.UI_Placeholder_Project))); projectListView.setId("list"); - projectListView.setCellFactory(list -> new ProjectCell()); + projectListView.setCellFactory(list -> new ProjectCell(true)); // List selection listener projectListView.getSelectionModel().selectedItemProperty().addListener((a, b, c) -> diff --git a/PlayWall/src/de/tobias/playpad/viewcontroller/cell/ProjectCell.java b/PlayWall/src/de/tobias/playpad/viewcontroller/cell/ProjectCell.java index 184351ebd87efebe5f7afaf2877060b426e0552f..650064aac576b12399d42c650a4b3309f3de78ae 100644 --- a/PlayWall/src/de/tobias/playpad/viewcontroller/cell/ProjectCell.java +++ b/PlayWall/src/de/tobias/playpad/viewcontroller/cell/ProjectCell.java @@ -18,7 +18,13 @@ import javafx.scene.paint.Color; public class ProjectCell extends ListCell<ProjectReference> { - private Displayable ref; + private transient Displayable ref; + + private boolean showProfileName; + + public ProjectCell(boolean showProfileName) { + this.showProfileName = showProfileName; + } @Override protected void updateItem(ProjectReference ref, boolean empty) { @@ -37,14 +43,16 @@ public class ProjectCell extends ListCell<ProjectReference> { projectNameLabel.getStyleClass().add("projectname"); nameBox.getChildren().add(projectNameLabel); - // Profile name - ProfileReference profileRef = ref.getProfileReference(); - if (profileRef != null) { - String name = profileRef.getName(); + if (showProfileName) { + // Profile name + ProfileReference profileRef = ref.getProfileReference(); + if (profileRef != null) { + String name = profileRef.getName(); - Label label = new Label(name); - label.getStyleClass().add("profilename"); - nameBox.getChildren().add(label); + Label label = new Label(name); + label.getStyleClass().add("profilename"); + nameBox.getChildren().add(label); + } } HBox.setHgrow(nameBox, Priority.ALWAYS); diff --git a/PlayWall/src/de/tobias/playpad/viewcontroller/dialog/ProjectManagerDialog.java b/PlayWall/src/de/tobias/playpad/viewcontroller/dialog/ProjectManagerDialog.java index 6de43dc90b92a830ef846210f318b6513ac58c83..83bf7d61f216e0d82d8b821a6256251620df9590 100644 --- a/PlayWall/src/de/tobias/playpad/viewcontroller/dialog/ProjectManagerDialog.java +++ b/PlayWall/src/de/tobias/playpad/viewcontroller/dialog/ProjectManagerDialog.java @@ -13,12 +13,12 @@ import de.tobias.playpad.project.Project; import de.tobias.playpad.project.ProjectImporter; import de.tobias.playpad.project.ProjectReference; import de.tobias.playpad.settings.Profile; +import de.tobias.playpad.settings.ProfileReference; import de.tobias.playpad.viewcontroller.cell.ProjectCell; import de.tobias.utils.ui.NotificationHandler; import de.tobias.utils.ui.ViewController; import de.tobias.utils.ui.scene.NotificationPane; import de.tobias.utils.util.Localization; -import de.tobias.utils.util.NumberUtils; import de.tobias.utils.util.TimeUtils; import javafx.application.Platform; import javafx.event.ActionEvent; @@ -56,7 +56,7 @@ public class ProjectManagerDialog extends ViewController implements Notification @FXML private Button exportButton; @FXML private Label dateLabel; - @FXML private Label sizeLabel; + @FXML private Label profileLabel; private Project currentProject; @@ -85,7 +85,7 @@ public class ProjectManagerDialog extends ViewController implements Notification ((AnchorPane) getParent()).getChildren().add(notificationPane); projectList.setPlaceholder(new Label(Localization.getString(Strings.UI_Placeholder_Project))); - projectList.setCellFactory(list -> new ProjectCell()); + projectList.setCellFactory(list -> new ProjectCell(false)); projectList.setOnMouseClicked(mouseEvent -> { @@ -109,10 +109,11 @@ public class ProjectManagerDialog extends ViewController implements Notification nameTextField.setText(c.toString()); try { - sizeLabel.setText(NumberUtils.numberToString(ref.getSize())); + ProfileReference profileRef = ref.getProfileReference(); + profileLabel.setText(profileRef.getName()); dateLabel.setText(TimeUtils.getDfmLong().format(ref.getLastMofied())); } catch (Exception e) { - sizeLabel.setText("-"); + profileLabel.setText("-"); dateLabel.setText("-"); e.printStackTrace(); } @@ -130,7 +131,7 @@ public class ProjectManagerDialog extends ViewController implements Notification renameButton.setDisable(true); nameTextField.setText(null); - sizeLabel.setText("-"); + profileLabel.setText("-"); dateLabel.setText("-"); } }); @@ -141,7 +142,7 @@ public class ProjectManagerDialog extends ViewController implements Notification exportButton.setDisable(true); renameButton.setDisable(true); - sizeLabel.setText("-"); + profileLabel.setText("-"); dateLabel.setText("-"); addCloseKeyShortcut(() -> getStage().close());