Skip to content

Commit

Permalink
Created a name group for VCard
Browse files Browse the repository at this point in the history
  • Loading branch information
Simon Scholz committed Nov 5, 2023
1 parent d6283d3 commit c8b1591
Showing 1 changed file with 24 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,13 +7,15 @@ import java.awt.GridLayout
import java.time.LocalDate
import java.time.LocalDateTime
import java.time.LocalTime
import javax.swing.BorderFactory
import javax.swing.JLabel
import javax.swing.JOptionPane
import javax.swing.JPanel
import javax.swing.JSpinner
import javax.swing.JTextArea
import javax.swing.JTextField
import javax.swing.SpinnerNumberModel
import javax.swing.border.TitledBorder

object InputDialogs {
fun showTwoValueInputDialog(title: String, firstLabel: String, secondLabel: String): Pair<String, String>? {
Expand Down Expand Up @@ -79,6 +81,17 @@ object InputDialogs {
val formattedNameLabel = JLabel("Formatted Name")
val formattedNameTextField = JTextField()

val borderPropertiesPanel = JPanel(MigLayout())

borderPropertiesPanel.setBorder(
BorderFactory.createTitledBorder(
BorderFactory.createEtchedBorder(),
"Name Details (optional)",
TitledBorder.LEFT,
TitledBorder.TOP,
),
)

val familyNameLabel = JLabel("Family Name")
val familyNameTextField = JTextField()

Expand Down Expand Up @@ -140,16 +153,17 @@ object InputDialogs {

panel.add(formattedNameLabel)
panel.add(formattedNameTextField, "wrap, grow, width 300:300:300")
panel.add(familyNameLabel)
panel.add(familyNameTextField, "wrap, grow, width 300:300:300")
panel.add(givenNameLabel)
panel.add(givenNameTextField, "wrap, grow, width 300:300:300")
panel.add(additionalNameLabel)
panel.add(additionalNameTextField, "wrap, grow, width 300:300:300")
panel.add(namePrefixLabel)
panel.add(namePrefixTextField, "wrap, grow, width 300:300:300")
panel.add(nameSuffixLabel)
panel.add(nameSuffixTextField, "wrap, grow, width 300:300:300")
borderPropertiesPanel.add(familyNameLabel)
borderPropertiesPanel.add(familyNameTextField, "wrap, grow, width 300:300:300")
borderPropertiesPanel.add(givenNameLabel)
borderPropertiesPanel.add(givenNameTextField, "wrap, grow, width 300:300:300")
borderPropertiesPanel.add(additionalNameLabel)
borderPropertiesPanel.add(additionalNameTextField, "wrap, grow, width 300:300:300")
borderPropertiesPanel.add(namePrefixLabel)
borderPropertiesPanel.add(namePrefixTextField, "wrap, grow, width 300:300:300")
borderPropertiesPanel.add(nameSuffixLabel)
borderPropertiesPanel.add(nameSuffixTextField, "wrap, grow, width 300:300:300")
panel.add(borderPropertiesPanel, "wrap, grow, span 2")
panel.add(organizationLabel)
panel.add(organizationTextField, "wrap, grow, width 300:300:300")
panel.add(phoneNumberLabel)
Expand Down

0 comments on commit c8b1591

Please sign in to comment.