diff options
Diffstat (limited to 'src/main/kotlin/me/kyren223/harpoonforjb/SettingsData.kt')
| -rw-r--r-- | src/main/kotlin/me/kyren223/harpoonforjb/SettingsData.kt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/main/kotlin/me/kyren223/harpoonforjb/SettingsData.kt b/src/main/kotlin/me/kyren223/harpoonforjb/SettingsData.kt index 3749661..3e0c60f 100644 --- a/src/main/kotlin/me/kyren223/harpoonforjb/SettingsData.kt +++ b/src/main/kotlin/me/kyren223/harpoonforjb/SettingsData.kt @@ -1,6 +1,7 @@ package me.kyren223.harpoonforjb import com.intellij.ui.JBIntSpinner +import com.intellij.ui.components.JBCheckBox import com.intellij.ui.components.JBLabel import com.intellij.util.ui.FormBuilder import javax.swing.JPanel @@ -11,12 +12,14 @@ class SettingsData { private val harpoonWidth: JBIntSpinner = JBIntSpinner(800, 1, 5000, 10) private val harpoonHeight: JBIntSpinner = JBIntSpinner(400, 1, 5000, 10) private val harpoonFontSize: JBIntSpinner = JBIntSpinner(20, 1, 100) + private val harpoonEnter: JBCheckBox = JBCheckBox() init { panel = FormBuilder.createFormBuilder() .addLabeledComponent(JBLabel("Harpoon width"), harpoonWidth, 1, false) .addLabeledComponent(JBLabel("Harpoon height"), harpoonHeight, 1, false) .addLabeledComponent(JBLabel("Harpoon font size"), harpoonFontSize, 1, false) + .addLabeledComponent(JBLabel("Press enter to select item in the QuickMenu"), harpoonEnter, 1, false) .addComponentFillVertically(JPanel(), 0) .panel } @@ -33,6 +36,10 @@ class SettingsData { return harpoonFontSize.number } + fun getHarpoonEnterToSelect(): Boolean { + return harpoonEnter.isSelected + } + fun setHarpoonWidth(width: Int) { harpoonWidth.number = width } @@ -44,4 +51,8 @@ class SettingsData { fun setHarpoonFontSize(fontSize: Int) { harpoonFontSize.number = fontSize } + + fun setHarpoonEnterToSelect(enter: Boolean) { + harpoonEnter.isSelected = enter + } } |
