@@ -43,8 +43,6 @@ import javax.swing.JSeparator
43
43
import javax.swing.JSplitPane
44
44
import javax.swing.JTabbedPane
45
45
import javax.swing.JTable
46
- import javax.swing.JTextArea
47
- import javax.swing.JTextField
48
46
import javax.swing.SwingConstants
49
47
import javax.swing.UIManager
50
48
import javax.swing.border.EmptyBorder
@@ -92,18 +90,18 @@ class RunnerPanel implements FocusListener, ActionListener {
92
90
JCheckBoxMenuItem showWarningIndicatorCheckBoxMenuItem
93
91
JCheckBoxMenuItem showInfoIndicatorCheckBoxMenuItem
94
92
JCheckBoxMenuItem syncDetailTabCheckBoxMenuItem
95
- JTextField testOwnerTextField
96
- JTextField testPackageTextField
97
- JTextField testProcedureTextField
98
- JTextArea testDescriptionTextArea
99
- JTextArea testIdTextArea
100
- JTextField testStartTextField
93
+ RunnerTextField testOwnerTextField
94
+ RunnerTextField testPackageTextField
95
+ RunnerTextField testProcedureTextField
96
+ RunnerTextArea testDescriptionTextArea
97
+ RunnerTextArea testIdTextArea
98
+ RunnerTextField testStartTextField
101
99
FailuresTableModel failuresTableModel
102
100
JTable failuresTable
103
- JTextArea testFailureMessageTextArea
104
- JTextArea testErrorStackTextArea
105
- JTextArea testWarningsTextArea
106
- JTextArea testServerOutputTextArea
101
+ RunnerTextArea testFailureMessageTextArea
102
+ RunnerTextArea testErrorStackTextArea
103
+ RunnerTextArea testWarningsTextArea
104
+ RunnerTextArea testServerOutputTextArea
107
105
JTabbedPane testDetailTabbedPane
108
106
109
107
def Component getGUI () {
@@ -758,7 +756,7 @@ class RunnerPanel implements FocusListener, ActionListener {
758
756
c. weightx = 0
759
757
c. weighty = 0
760
758
testInfoPanel. add(testOwnerLabel, c)
761
- testOwnerTextField = new JTextField
759
+ testOwnerTextField = new RunnerTextField
762
760
testOwnerTextField. editable = false
763
761
c. gridx = 1
764
762
c. gridy = 0
@@ -782,7 +780,7 @@ class RunnerPanel implements FocusListener, ActionListener {
782
780
c. weightx = 0
783
781
c. weighty = 0
784
782
testInfoPanel. add(testPackageLabel, c)
785
- testPackageTextField = new JTextField
783
+ testPackageTextField = new RunnerTextField
786
784
testPackageTextField. editable = false
787
785
c. gridx = 1
788
786
c. gridy = 1
@@ -806,7 +804,7 @@ class RunnerPanel implements FocusListener, ActionListener {
806
804
c. weightx = 0
807
805
c. weighty = 0
808
806
testInfoPanel. add(testProcedureLabel, c)
809
- testProcedureTextField = new JTextField
807
+ testProcedureTextField = new RunnerTextField
810
808
testProcedureTextField. editable = false
811
809
c. gridx = 1
812
810
c. gridy = 2
@@ -830,7 +828,7 @@ class RunnerPanel implements FocusListener, ActionListener {
830
828
c. weightx = 0
831
829
c. weighty = 0
832
830
testInfoPanel. add(testDescriptionLabel, c)
833
- testDescriptionTextArea = new JTextArea
831
+ testDescriptionTextArea = new RunnerTextArea
834
832
testDescriptionTextArea. editable = false
835
833
testDescriptionTextArea. enabled = true
836
834
testDescriptionTextArea. lineWrap = true
@@ -858,7 +856,7 @@ class RunnerPanel implements FocusListener, ActionListener {
858
856
c. weightx = 0
859
857
c. weighty = 0
860
858
testInfoPanel. add(testIdLabel, c)
861
- testIdTextArea = new JTextArea
859
+ testIdTextArea = new RunnerTextArea
862
860
testIdTextArea. editable = false
863
861
testIdTextArea. enabled = true
864
862
testIdTextArea. lineWrap = true
@@ -886,7 +884,7 @@ class RunnerPanel implements FocusListener, ActionListener {
886
884
c. weightx = 0
887
885
c. weighty = 0
888
886
testInfoPanel. add(testStartLabel, c)
889
- testStartTextField = new JTextField
887
+ testStartTextField = new RunnerTextField
890
888
testStartTextField. editable = false
891
889
c. gridx = 1
892
890
c. gridy = 5
@@ -899,7 +897,6 @@ class RunnerPanel implements FocusListener, ActionListener {
899
897
c. weighty = 0
900
898
testInfoPanel. add(testStartTextField, c)
901
899
// - Vertical spring and scrollbar for info panel
902
- val testInfoVerticalSpringLabel = new JLabel
903
900
c. gridx = 0
904
901
c. gridy = 6
905
902
c. gridwidth = 1
@@ -909,7 +906,7 @@ class RunnerPanel implements FocusListener, ActionListener {
909
906
c. fill = GridBagConstraints :: BOTH
910
907
c. weightx = 0
911
908
c. weighty = 1
912
- testInfoPanel. add(testInfoVerticalSpringLabel , c)
909
+ testInfoPanel. add(Box . createVerticalGlue() , c)
913
910
val testPropertiesScrollPane = new JScrollPane (testInfoPanel)
914
911
915
912
// Failures tabbed pane (failed expectations)
@@ -927,7 +924,7 @@ class RunnerPanel implements FocusListener, ActionListener {
927
924
failuresDescription. headerRenderer = failuresTableHeaderRenderer
928
925
val failuresTableScrollPane = new JScrollPane (failuresTable)
929
926
// - failures details
930
- testFailureMessageTextArea = new JTextArea
927
+ testFailureMessageTextArea = new RunnerTextArea
931
928
testFailureMessageTextArea. editable = false
932
929
testFailureMessageTextArea. enabled = true
933
930
testFailureMessageTextArea. lineWrap = true
@@ -951,7 +948,7 @@ class RunnerPanel implements FocusListener, ActionListener {
951
948
// Errors tabbed pane (Error Stack)
952
949
val testErrorStackPanel = new JPanel
953
950
testErrorStackPanel. setLayout(new GridBagLayout ())
954
- testErrorStackTextArea = new JTextArea
951
+ testErrorStackTextArea = new RunnerTextArea
955
952
testErrorStackTextArea. editable = false
956
953
testErrorStackTextArea. enabled = true
957
954
testErrorStackTextArea. lineWrap = true
@@ -962,7 +959,7 @@ class RunnerPanel implements FocusListener, ActionListener {
962
959
c. gridy = 0
963
960
c. gridwidth = 1
964
961
c. gridheight = 1
965
- c. insets = new Insets (10 , 10 , 10 , 10 ) // top, left, bottom, right
962
+ c. insets = new Insets (0 , 0 , 0 , 0 ) // top, left, bottom, right
966
963
c. anchor = GridBagConstraints :: WEST
967
964
c. fill = GridBagConstraints :: BOTH
968
965
c. weightx = 1
@@ -972,7 +969,7 @@ class RunnerPanel implements FocusListener, ActionListener {
972
969
// Warnings tabbed pane
973
970
val testWarningsPanel = new JPanel
974
971
testWarningsPanel. setLayout(new GridBagLayout ())
975
- testWarningsTextArea = new JTextArea
972
+ testWarningsTextArea = new RunnerTextArea
976
973
testWarningsTextArea. editable = false
977
974
testWarningsTextArea. enabled = true
978
975
testWarningsTextArea. lineWrap = true
@@ -983,7 +980,7 @@ class RunnerPanel implements FocusListener, ActionListener {
983
980
c. gridy = 0
984
981
c. gridwidth = 1
985
982
c. gridheight = 1
986
- c. insets = new Insets (10 , 10 , 10 , 10 ) // top, left, bottom, right
983
+ c. insets = new Insets (0 , 0 , 0 , 0 ) // top, left, bottom, right
987
984
c. anchor = GridBagConstraints :: WEST
988
985
c. fill = GridBagConstraints :: BOTH
989
986
c. weightx = 1
@@ -993,7 +990,7 @@ class RunnerPanel implements FocusListener, ActionListener {
993
990
// Info tabbed pane (Server Output)
994
991
val testServerOutputPanel = new JPanel
995
992
testServerOutputPanel. setLayout(new GridBagLayout ())
996
- testServerOutputTextArea = new JTextArea
993
+ testServerOutputTextArea = new RunnerTextArea
997
994
testServerOutputTextArea. editable = false
998
995
testServerOutputTextArea. enabled = true
999
996
testServerOutputTextArea. lineWrap = true
@@ -1004,7 +1001,7 @@ class RunnerPanel implements FocusListener, ActionListener {
1004
1001
c. gridy = 0
1005
1002
c. gridwidth = 1
1006
1003
c. gridheight = 1
1007
- c. insets = new Insets (10 , 10 , 10 , 10 ) // top, left, bottom, right
1004
+ c. insets = new Insets (0 , 0 , 0 , 0 ) // top, left, bottom, right
1008
1005
c. anchor = GridBagConstraints :: WEST
1009
1006
c. fill = GridBagConstraints :: BOTH
1010
1007
c. weightx = 1
@@ -1030,5 +1027,10 @@ class RunnerPanel implements FocusListener, ActionListener {
1030
1027
c. weightx = 1
1031
1028
c. weighty = 1
1032
1029
basePanel. add(horizontalSplitPane, c)
1030
+
1031
+ // fix missing borders (e.g. on windows look and feel)
1032
+ val referenceBorder = testOwnerTextField. border
1033
+ testDescriptionTextArea. border = referenceBorder
1034
+ testIdTextArea. border = referenceBorder
1033
1035
}
1034
1036
}
0 commit comments