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

Method initComponents

code/src/java/pcgen/gui2/tabs/SkillInfoTab.java:120–174  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

118 }
119
120 private void initComponents()
121 {
122 setOrientation(VERTICAL_SPLIT);
123 setResizeWeight(0.70);
124
125 skillTable.setDefaultRenderer(Integer.class, new TableCellUtilities.AlignRenderer(SwingConstants.CENTER));
126 skillTable.setDefaultRenderer(String.class, new TableCellUtilities.AlignRenderer(SwingConstants.CENTER));
127 skillTable.setRowHeight(26);
128 FilterBar<CharacterFacade, Skill> filterBar = new FilterBar<>();
129 filterBar.addDisplayableFilter(new SearchFilterPanel());
130
131 cFilterButton.setText(LanguageBundle.getString("in_classString")); //$NON-NLS-1$
132 cFilterButton.setEnabled(false);
133 filterBar.addDisplayableFilter(cFilterButton);
134
135 trainedFilterButton.setText(LanguageBundle.getString("in_trained")); //$NON-NLS-1$
136 trainedFilterButton.setEnabled(false);
137 filterBar.addDisplayableFilter(trainedFilterButton);
138 JPanel availPanel = FilterUtilities.configureFilteredTreeViewPane(skillTable, filterBar);
139 availPanel.setPreferredSize(new Dimension(650, 300));
140 JScrollPane tableScrollPane;
141 JPanel tablePanel = new JPanel(new GridBagLayout());
142 GridBagConstraints constraints = new GridBagConstraints();
143
144 constraints.gridwidth = java.awt.GridBagConstraints.REMAINDER;
145 constraints.fill = java.awt.GridBagConstraints.BOTH;
146 constraints.weightx = 1.0;
147
148 constraints.ipady = 0;
149 constraints.weighty = 1.0;
150
151 SkillPointTableModel.initializeTable(skillpointTable);
152 tableScrollPane = new JScrollPane(skillpointTable);
153 tablePanel.add(tableScrollPane, constraints);
154
155 skillFilterBox.setRenderer(new DefaultListCellRenderer());
156
157 JScrollPane selScrollPane = new JScrollPane(htmlPane);
158 JPanel skillPanel = new JPanel(new BorderLayout());
159 skillPanel.add(skillFilterBox, BorderLayout.NORTH);
160 skillPanel.add(selScrollPane, BorderLayout.CENTER);
161 selScrollPane.setPreferredSize(new Dimension(530, 300));
162
163 FlippingSplitPane topPane =
164 new FlippingSplitPane(JSplitPane.HORIZONTAL_SPLIT, true, availPanel, skillPanel);
165 setTopComponent(topPane);
166
167 FlippingSplitPane bottomPane = new FlippingSplitPane(JSplitPane.HORIZONTAL_SPLIT);
168 bottomPane.setLeftComponent(tablePanel);
169 tablePanel.setPreferredSize(new Dimension(650, 100));
170 bottomPane.setRightComponent(infoPane);
171 infoPane.setPreferredSize(new Dimension(530, 100));
172 setBottomComponent(bottomPane);
173
174 }
175
176 @Override
177 public ModelMap createModels(final CharacterFacade character)

Callers 1

SkillInfoTabMethod · 0.95

Calls 8

addDisplayableFilterMethod · 0.95
getStringMethod · 0.95
initializeTableMethod · 0.95
setOrientationMethod · 0.80
addMethod · 0.65
setRowHeightMethod · 0.45
setTextMethod · 0.45

Tested by

no test coverage detected