Skip to content

Commit 278bcc8

Browse files
authored
Merge pull request #3292 from ControlSystemStudio/CSSTUDIO-2647
Save-and-restore toolbar icon
2 parents 9065d8a + 0d32432 commit 278bcc8

File tree

6 files changed

+42
-3
lines changed

6 files changed

+42
-3
lines changed

app/save-and-restore/app/src/main/java/org/phoebus/applications/saveandrestore/SaveAndRestoreMenuEntry.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public String getMenuPath() {
4545

4646
@Override
4747
public Image getIcon() {
48-
return ImageCache.getImage(SaveAndRestoreMenuEntry.class, "/icons/bookcase.png");
48+
return ImageCache.getImage(SaveAndRestoreMenuEntry.class, "/icons/save-and-restore.png");
4949
}
5050

5151
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright (C) 2024 European Spallation Source ERIC.
3+
*/
4+
5+
package org.phoebus.applications.saveandrestore;
6+
7+
import javafx.scene.image.Image;
8+
import org.phoebus.framework.workbench.ApplicationService;
9+
import org.phoebus.ui.javafx.ImageCache;
10+
import org.phoebus.ui.spi.ToolbarEntry;
11+
12+
public class SaveAndRestoreToolbarEntry implements ToolbarEntry {
13+
14+
@Override
15+
public String getName() {
16+
return SaveAndRestoreApplication.DISPLAY_NAME;
17+
}
18+
19+
@Override
20+
public Image getIcon() {
21+
return ImageCache.getImage(getClass(), "/icons/save-and-restore.png");
22+
}
23+
24+
@Override
25+
public Void call() throws Exception {
26+
ApplicationService.createInstance(SaveAndRestoreApplication.NAME);
27+
return null;
28+
}
29+
30+
/**
31+
* DO NOT CHANGE RETURN VALUE!
32+
* @return The unique id of this {@link ToolbarEntry}.
33+
*/
34+
@Override
35+
public String getId(){
36+
return "Save And Restore";
37+
}
38+
}

app/save-and-restore/app/src/main/java/org/phoebus/applications/saveandrestore/actions/OpenFilterAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ public OpenFilterAction(String description, String filterId) {
4343

4444
@Override
4545
public Image getImage() {
46-
return ImageCache.getImage(OpenFilterAction.class, "/icons/bookcase.png");
46+
return ImageCache.getImage(OpenFilterAction.class, "/icons/save-and-restore.png");
4747
}
4848

4949
@Override

app/save-and-restore/app/src/main/java/org/phoebus/applications/saveandrestore/actions/OpenNodeAction.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ public OpenNodeAction(String description, String nodeId) {
4545

4646
@Override
4747
public Image getImage() {
48-
return ImageCache.getImage(OpenNodeAction.class, "/icons/bookcase.png");
48+
return ImageCache.getImage(OpenNodeAction.class, "/icons/save-and-restore.png");
4949
}
5050

5151
@Override
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
org.phoebus.applications.saveandrestore.SaveAndRestoreToolbarEntry

app/save-and-restore/app/src/main/resources/icons/bookcase.png renamed to app/save-and-restore/app/src/main/resources/icons/save-and-restore.png

File renamed without changes.

0 commit comments

Comments
 (0)