MCPcopy Create free account
hub / github.com/PCGen/pcgen / initComponents

Method initComponents

code/src/java/pcgen/gui2/InfoGuidePane.java:82–119  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

80 }
81
82 private void initComponents()
83 {
84 /*
85 * The layout here is kind of wonky and forces us into a fixed size.
86 * As we convert to JavaFX strongly consider replacing fixed constants with layout that respect their parents.
87 */
88 JPanel mainPanel = new JPanel();
89 mainPanel.setBorder(
90 BorderFactory.createTitledBorder(null, "", TitledBorder.CENTER, TitledBorder.DEFAULT_POSITION, null));
91
92 mainPanel.setLayout(new GridLayout(0, 1));
93 mainPanel.setPreferredSize(new Dimension(650, 650));
94 setOpaque(false);
95
96 JPanel sourcesPanel = new JPanel(new GridLayout(0, 1));
97
98 sourcesPanel.setPreferredSize(new Dimension(650, 250));
99 sourcesPanel.add(new JLabel(LanguageBundle.getString("in_si_intro")));
100 sourcesPanel.add(new JLabel(LanguageBundle.getString("in_si_gamemode")));
101 sourcesPanel.add(gameModeLabel);
102 sourcesPanel.add(new JLabel(LanguageBundle.getString("in_si_sources")));
103 sourcesPanel.add(campaignList);
104
105 var guidePane = createHtmlPane();
106 guidePane.getController().setHtml(LanguageBundle.getFormattedString("in_si_whatnext",
107 Icons.New16.getImageIcon(),
108 Icons.Open16.getImageIcon()));
109
110 mainPanel.add(sourcesPanel);
111 mainPanel.add(guidePane);
112 mainPanel.add(tipPane);
113 refreshDisplayedSources(null);
114
115 setLayout(new FlowLayout());
116 add(mainPanel, BorderLayout.CENTER);
117
118 tipPane.getController().setHtml(LanguageBundle.getFormattedString("in_si_tip", TipOfTheDayHandler.getInstance().getNextTip()));
119 }
120
121 private void initListeners()
122 {

Callers 1

InfoGuidePaneMethod · 0.95

Calls 11

getStringMethod · 0.95
createHtmlPaneMethod · 0.95
getFormattedStringMethod · 0.95
getInstanceMethod · 0.95
setBorderMethod · 0.80
setHtmlMethod · 0.80
getImageIconMethod · 0.80
getNextTipMethod · 0.80
addMethod · 0.65
getControllerMethod · 0.65

Tested by

no test coverage detected