Use a constant for the silhouette image
... so that it only gets loaded once
This commit is contained in:
parent
0b762eba0d
commit
c609014952
|
@ -81,6 +81,7 @@ import javafx.util.Callback;
|
|||
|
||||
public abstract class AbstractRecordedModelsTab extends Tab implements TabSelectionListener {
|
||||
private static final Logger LOG = LoggerFactory.getLogger(AbstractRecordedModelsTab.class);
|
||||
private static Image SILHOUETTE = new Image(AbstractRecordedModelsTab.class.getResourceAsStream("/silhouette_256.png"));
|
||||
|
||||
protected ReentrantLock lock = new ReentrantLock();
|
||||
protected ObservableList<JavaFxModel> observableModels = FXCollections.observableArrayList();
|
||||
|
@ -110,6 +111,7 @@ public abstract class AbstractRecordedModelsTab extends Tab implements TabSelect
|
|||
|
||||
AbstractRecordedModelsTab(String text) {
|
||||
super(text);
|
||||
|
||||
registerPortraitListener();
|
||||
}
|
||||
|
||||
|
@ -567,7 +569,7 @@ public abstract class AbstractRecordedModelsTab extends Tab implements TabSelect
|
|||
LOG.error("Couldn't load portrait file {}", portraitFile, e);
|
||||
}
|
||||
}
|
||||
return new Image(AbstractRecordedModelsTab.class.getResourceAsStream("/silhouette_256.png"));
|
||||
return SILHOUETTE;
|
||||
}
|
||||
|
||||
protected void showColumnSelection(ActionEvent evt) {
|
||||
|
|
Loading…
Reference in New Issue