forked from j62/ctbrec
Code cleanup
This commit is contained in:
parent
30a8a50402
commit
6f278b6c49
|
@ -16,7 +16,7 @@ import javafx.scene.Node;
|
|||
import javafx.scene.control.TableView;
|
||||
|
||||
public class EditNotesAction {
|
||||
private static final transient Logger LOG = LoggerFactory.getLogger(EditNotesAction.class);
|
||||
private static final Logger LOG = LoggerFactory.getLogger(EditNotesAction.class);
|
||||
|
||||
private Node source;
|
||||
private Model model;
|
||||
|
@ -30,8 +30,7 @@ public class EditNotesAction {
|
|||
|
||||
public void execute() {
|
||||
source.setCursor(Cursor.WAIT);
|
||||
new Thread(() -> {
|
||||
Platform.runLater(() -> {
|
||||
new Thread(() -> Platform.runLater(() -> {
|
||||
String notes = Config.getInstance().getSettings().modelNotes.getOrDefault(model.getUrl(), "");
|
||||
Optional<String> newNotes = Dialogs.showTextInput(source.getScene(), "Model Notes", "Notes for " + model.getName(), notes);
|
||||
newNotes.ifPresent(n -> {
|
||||
|
@ -48,7 +47,6 @@ public class EditNotesAction {
|
|||
});
|
||||
table.refresh();
|
||||
source.setCursor(Cursor.DEFAULT);
|
||||
});
|
||||
}).start();
|
||||
})).start();
|
||||
}
|
||||
}
|
||||
|
|
|
@ -35,7 +35,7 @@ public class ModelMassEditAction {
|
|||
}
|
||||
|
||||
public void execute() {
|
||||
execute((m) -> {});
|
||||
execute(m -> {});
|
||||
}
|
||||
|
||||
public void execute(Consumer<Model> callback) {
|
||||
|
|
|
@ -12,7 +12,7 @@ public class PauseAction extends ModelMassEditAction {
|
|||
|
||||
public PauseAction(Node source, List<? extends Model> models, Recorder recorder) {
|
||||
super(source, models);
|
||||
action = (m) -> {
|
||||
action = m -> {
|
||||
try {
|
||||
recorder.suspendRecording(m);
|
||||
} catch(Exception e) {
|
||||
|
|
|
@ -12,7 +12,7 @@ public class ResumeAction extends ModelMassEditAction {
|
|||
|
||||
public ResumeAction(Node source, List<? extends Model> models, Recorder recorder) {
|
||||
super(source, models);
|
||||
action = (m) -> {
|
||||
action = m -> {
|
||||
try {
|
||||
recorder.resumeRecording(m);
|
||||
} catch(Exception e) {
|
||||
|
|
Loading…
Reference in New Issue