-
Notifications
You must be signed in to change notification settings - Fork 78
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Show names and descriptions as tooltips for renderer, bvh and output …
…mode dropdowns.
- Loading branch information
Showing
13 changed files
with
151 additions
and
77 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
26 changes: 26 additions & 0 deletions
26
chunky/src/java/se/llbit/chunky/ui/RegisterableCellAdapter.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,26 @@ | ||
package se.llbit.chunky.ui; | ||
|
||
import javafx.scene.control.Tooltip; | ||
import se.llbit.fxutil.CustomizedListCellFactory; | ||
import se.llbit.util.Registerable; | ||
|
||
public class RegisterableCellAdapter implements CustomizedListCellFactory.Adapter<Registerable> { | ||
public static final RegisterableCellAdapter INSTANCE = new RegisterableCellAdapter(); | ||
|
||
private RegisterableCellAdapter() { | ||
} | ||
|
||
@Override | ||
public String getLabel(Registerable item) { | ||
return item.getName(); | ||
} | ||
|
||
@Override | ||
public Tooltip getTooltip(Registerable item) { | ||
String description = item.getDescription(); | ||
if (description != null && !description.isEmpty()) { | ||
return new Tooltip(item.getDescription()); | ||
} | ||
return null; | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.