Last active
March 20, 2020 07:55
-
-
Save tychobrailleur/91f17cee849f533526bc3c0d821d16a5 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/main/java/module/matches/MatchReportPanel.java b/src/main/java/module/matches/MatchReportPanel.java | |
index 154277a..2a4d708 100644 | |
--- a/src/main/java/module/matches/MatchReportPanel.java | |
+++ b/src/main/java/module/matches/MatchReportPanel.java | |
@@ -9,19 +9,12 @@ import core.model.match.MatchEvent; | |
import core.model.match.MatchKurzInfo; | |
import core.model.match.Matchdetails; | |
-import java.awt.Color; | |
-import java.awt.Component; | |
-import java.awt.Dimension; | |
-import java.awt.Font; | |
-import java.awt.GridBagConstraints; | |
-import java.awt.GridBagLayout; | |
-import java.awt.Insets; | |
+import javax.swing.*; | |
+import javax.swing.border.*; | |
+import java.awt.*; | |
import java.util.ArrayList; | |
import java.util.List; | |
-import javax.swing.*; | |
-import javax.swing.border.CompoundBorder; | |
- | |
/** | |
* Zeigt die Stärken eines Matches an. | |
*/ | |
@@ -234,8 +227,9 @@ public class MatchReportPanel extends LazyImagePanel { | |
layout.setConstraints(playerlabel, constraints); | |
panel.add(playerlabel); | |
- matchEventPlayer = new JLabel("<html>"+highlight.getEventText()+"</html>"); | |
+ matchEventPlayer = new JLabel("<html><div style='width: 320px'>"+highlight.getEventText()+"</div></html>"); | |
matchEventPlayer.setVerticalAlignment(JLabel.CENTER); | |
+ | |
highlightLabels.add(matchEventPlayer); | |
constraints.anchor = GridBagConstraints.LINE_START; | |
constraints.fill = GridBagConstraints.HORIZONTAL; | |
@@ -281,7 +275,6 @@ public class MatchReportPanel extends LazyImagePanel { | |
String subtitle = HOVerwaltung.instance().getLanguageString("penalites") + " (" + homePenalitiesScored + "-" + guestPenalitiesScored + ")"; | |
penaltyContestresults.setText(subtitle); | |
} | |
- | |
} | |
} | |
@@ -292,6 +285,11 @@ public class MatchReportPanel extends LazyImagePanel { | |
setBackground(ThemeManager.getColor(HOColorName.PANEL_BG)); | |
+ setLayout(new BorderLayout()); | |
+ | |
+ JPanel wrappingPanel = new JPanel(); | |
+ wrappingPanel.setLayout(new BorderLayout()); | |
+ | |
GridBagLayout mainlayout = new GridBagLayout(); | |
GridBagConstraints mainconstraints = new GridBagConstraints(); | |
mainconstraints.anchor = GridBagConstraints.NORTH; | |
@@ -299,8 +297,6 @@ public class MatchReportPanel extends LazyImagePanel { | |
mainconstraints.weightx = 1.0; | |
mainconstraints.insets = new Insets(4, 6, 4, 6); | |
- setLayout(mainlayout); | |
- | |
layout = new GridBagLayout(); | |
panel = new JPanel(layout); | |
panel.setBorder(new CompoundBorder( | |
@@ -337,7 +333,9 @@ public class MatchReportPanel extends LazyImagePanel { | |
mainconstraints.gridy = 0; | |
mainlayout.setConstraints(panel, mainconstraints); | |
- add(panel); | |
+ wrappingPanel.add(new JScrollPane(panel)); | |
+ | |
+ add(wrappingPanel); | |
// pane = new JScrollPane(panel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, | |
// ScrollPaneConstants.HORIZONTAL_SCROLLBAR_NEVER); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment