package com.ts3client.ui; import com.ts3client.config.Settings; import javax.swing.JCheckBox; import java.awt.GridBagConstraints; /** Options page for general behaviour: the muted-microphone warning and the reported client version. */ final class ApplicationPanel extends FormPanel { private final Settings settings; private final JCheckBox mutedWarning; private final ClientVersionPanel clientVersion; ApplicationPanel(Settings settings) { this.settings = settings; GridBagConstraints c = gbc(); mutedWarning = new JCheckBox("Warn when talking while microphone is muted", settings.mutedTalkWarning); clientVersion = new ClientVersionPanel(settings); int row = 0; addSection(this, c, row++, "Misc"); addWide(this, c, row++, mutedWarning); addSection(this, c, row++, "Client Version"); addWide(this, c, row++, clientVersion); addFiller(this, c, row); } /** Copies the page into the settings; the caller saves them. */ void apply() { settings.mutedTalkWarning = mutedWarning.isSelected(); clientVersion.apply(); } }