Skip to content

Commit

Permalink
extra space to bottom of panel so that simple view collapses to top
Browse files Browse the repository at this point in the history
  • Loading branch information
Tobi Delbruck authored and Tobi Delbruck committed Oct 27, 2024
1 parent c3b4ee2 commit 9470827
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/net/sf/jaer/eventprocessing/FilterPanel.java
Original file line number Diff line number Diff line change
Expand Up @@ -622,11 +622,15 @@ public Dimension getMaximumSize() {
// log.info("EventFilter "+filter.getClass().getSimpleName()+" encloses filterChain "+chain);
for (EventFilter f : chain) {
FilterPanel enclPanel = new FilterPanel(f);
Dimension d=enclPanel.getPreferredSize();
d.setSize(Integer.MAX_VALUE, d.getHeight()); // set height to preferred value, and width to max; see https://stackoverflow.com/questions/26596839/how-to-use-verticalglue-in-box-layout
enclPanel.setMaximumSize(d); // extra space to bottom
this.add(enclPanel);
controls.add(enclPanel);
enclosedFilterPanels.put(f, enclPanel);
((TitledBorder) enclPanel.getBorder()).setTitle("enclosed: " + f.getClass().getSimpleName());
}
// this.add(Box.createVerticalGlue()); // make the properties stick to the enclosed filters
}
} catch (Exception e) {
e.printStackTrace();
Expand Down

0 comments on commit 9470827

Please sign in to comment.