Common und CommonUI - nur ein paar Utility-Klassen

Ein paar updates mit ein paar vergleichsweise “sophisticateten” Klassen:

<dependency>
  <groupId>de.javagl</groupId>
  <artifactId>common-ui</artifactId>
  <version>0.0.6</version>
</dependency>
  • Added JOptionPanes class with a method to show an option pane that does an input validation
  • Added a ToggleListSelectionModel that allows toggling the selection state with clicks
  • Added GenericTableModel that builds the table contents with accessor functions
  • Added CustomizedTableHeader that allows adding custom components to a table header
  • Added a MultiColumnRegexFilter that allows adding text fields to table columns that may be used to filter a table based on regular expressions
  • Added various table cell renderers
  • Added text component utilities: An UndoRedoHandler that generically adds undo/redo functionality to text components, and a SearchableTextComponent that adds a simple search functionality to text components

Die Suchfunktionalität in Textkomponenten war ein bißchen frickelig, und da gibt’s eigentlich die meisten Freiheitsgrade, was man vielleicht anders machen oder konfigurieren können will, aber die Basisfunktionalität ist da:

SearchableTextComponent

Der mehr-Spalten-Tabellen-Regex-Filter ist auch fancy. Tatsächlich war das komplizierteste da, die Textfelder in den Tabellenheader zu kriegen:

gif

1 „Gefällt mir“