Skip to content

Commit

Permalink
ADD: ModelSelection.getModelByName(string model name) so that...
Browse files Browse the repository at this point in the history
...derived GUIs can conveniently query a SAMModel from those
available with the GUI
  • Loading branch information
xulman committed Dec 18, 2024
1 parent bce3441 commit 2afa860
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions src/main/java/ai/nets/samj/gui/ModelSelection.java
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,13 @@ protected boolean isModelInstalled(String modelName) {
return false;
}

protected SAMModel getModelByName(String modelName) {
for (SAMModel m : this.models) {
if (m.getName().equals(modelName)) return m;
}
return null;
}

protected JButton getButton() {
return this.btn;
}
Expand Down

0 comments on commit 2afa860

Please sign in to comment.