File tree Expand file tree Collapse file tree 2 files changed +5
-2
lines changed
csv-validator-ui/src/main/scala/uk/gov/nationalarchives/csv/validator/ui Expand file tree Collapse file tree 2 files changed +5
-2
lines changed Original file line number Diff line number Diff line change @@ -71,6 +71,9 @@ object CsvValidatorUi extends SimpleSwingApplication {
7171 // handle resizing the main window, when resizing the settings panel
7272 settings.settingsGroup.reactions += SJXTaskPane .onViewStateChanged {
7373 this .preferredSize = this .size
74+ if (settings.settingsGroup.collapsed) settings.settingsGroup.remove(settings.settingsGroupLayout)
75+ else settings.settingsGroup.add(settings.settingsGroupLayout)
76+
7477 this .pack()
7578 }
7679 new ContentPanel (settings, this )
@@ -582,7 +585,7 @@ object CsvValidatorUi extends SimpleSwingApplication {
582585 btnRemovePathSubstitution.reactions += onClick(tblPathSubstitutions.removeSelectedRows())
583586 btnAddPathSubstitution.reactions += onClick(tablePathDialog())
584587
585- private val settingsGroupLayout = new GridBagPanel {
588+ val settingsGroupLayout : GridBagPanel = new GridBagPanel {
586589 private val c = new Constraints
587590 c.anchor = Anchor .West
588591
@@ -658,7 +661,6 @@ object CsvValidatorUi extends SimpleSwingApplication {
658661 c.anchor = Anchor .LastLineEnd
659662 layout(btnAddPathSubstitution) = c
660663 }
661- settingsGroup.add(settingsGroupLayout)
662664
663665 add(settingsGroup)
664666
Original file line number Diff line number Diff line change @@ -44,6 +44,7 @@ class SJXTaskPane(title: String) extends Panel with Publisher {
4444 this .collapsed = collapsed
4545 }
4646 def add (component : Component ) = peer.add(component.peer)
47+ def remove (component : Component ) = peer.remove(component.peer)
4748 def collapsed = peer.isCollapsed
4849 def collapsed_= (c : Boolean ) : Unit = {
4950 peer.setCollapsed(c)
You can’t perform that action at this time.
0 commit comments