comparison src/name/blackcap/exifwasher/HelpDialog.kt @ 54:40911898ed23

Fix multiple border glitches.
author davidb
date Thu, 07 May 2020 14:05:40 -0700
parents 61a06e050bac
children 224572069e36
comparison
equal deleted inserted replaced
53:61a06e050bac 54:40911898ed23
2 * The dialog that displays the Exif data in a single file (display only, 2 * The dialog that displays the Exif data in a single file (display only,
3 * no changing). We do this after washing. 3 * no changing). We do this after washing.
4 */ 4 */
5 package name.blackcap.exifwasher 5 package name.blackcap.exifwasher
6 6
7 import java.awt.Color
8 import java.awt.Dimension 7 import java.awt.Dimension
9 import java.awt.Font 8 import java.awt.Font
10 import java.awt.event.ActionEvent 9 import java.awt.event.ActionEvent
11 import java.awt.event.ActionListener 10 import java.awt.event.ActionListener
12 import java.io.BufferedReader 11 import java.io.BufferedReader
15 import java.io.InputStream 14 import java.io.InputStream
16 import java.io.InputStreamReader 15 import java.io.InputStreamReader
17 import java.util.logging.Level 16 import java.util.logging.Level
18 import java.util.logging.Logger 17 import java.util.logging.Logger
19 import javax.swing.* 18 import javax.swing.*
20 import javax.swing.UIManager
21 import javax.swing.text.html.HTMLEditorKit 19 import javax.swing.text.html.HTMLEditorKit
22 import javax.swing.text.html.StyleSheet 20 import javax.swing.text.html.StyleSheet
23 21
24 import name.blackcap.exifwasher.exiv2.* 22 import name.blackcap.exifwasher.exiv2.*
25 23
64 } 62 }
65 it.text = this::class.java.getResourceAsStream("help.html").bufferedReader().use { it.readText() } 63 it.text = this::class.java.getResourceAsStream("help.html").bufferedReader().use { it.readText() }
66 it.setEditable(false) 64 it.setEditable(false)
67 }).apply { 65 }).apply {
68 alignmentX = JScrollPane.CENTER_ALIGNMENT 66 alignmentX = JScrollPane.CENTER_ALIGNMENT
69 border = BorderFactory.createCompoundBorder( 67 addBorder(BorderFactory.createEmptyBorder(BW2, BW2, BW, BW2))
70 BorderFactory.createEmptyBorder(BW2, BW2, BW, BW2),
71 UIManager.getBorder("ScrollPane.border") ?: BorderFactory.createLineBorder(Color.GRAY))
72 verticalScrollBarPolicy = ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS 68 verticalScrollBarPolicy = ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS
73 horizontalScrollBarPolicy = ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER 69 horizontalScrollBarPolicy = ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER
74 preferredSize = Dimension(WIDTH, HEIGHT) 70 preferredSize = Dimension(WIDTH, HEIGHT)
75 background = Application.mainFrame.background 71 background = Application.mainFrame.background
76 } 72 }