This component allows the user to manage a character's skills.
| 88 | * This component allows the user to manage a character's skills. |
| 89 | */ |
| 90 | @SuppressWarnings("serial") |
| 91 | public class SkillInfoTab extends FlippingSplitPane implements CharacterInfoTab, TodoHandler |
| 92 | { |
| 93 | |
| 94 | private final FilteredTreeViewTable<CharacterFacade, Skill> skillTable; |
| 95 | private final JTable skillpointTable; |
| 96 | private final InfoPane infoPane; |
| 97 | private final TabTitle tabTitle; |
| 98 | private final FilterButton<CharacterFacade, Skill> cFilterButton; |
| 99 | private final FilterButton<CharacterFacade, Skill> trainedFilterButton; |
| 100 | |
| 101 | private final JComboBox<SkillFilter> skillFilterBox; |
| 102 | private final JFXPanelFromResource<SimpleHtmlPanelController> htmlPane; |
| 103 | SkillInfoTab() |
| 104 | { |
| 105 | super(); |
| 106 | this.skillTable = new FilteredTreeViewTable<>(); |
| 107 | this.skillpointTable = new JTable(); |
| 108 | this.infoPane = new InfoPane(); |
| 109 | this.cFilterButton = new FilterButton<>("SkillQualified"); |
| 110 | this.trainedFilterButton = new FilterButton<>("SkillTrained"); |
| 111 | this.tabTitle = new TabTitle(Tab.SKILLS); |
| 112 | this.htmlPane = new JFXPanelFromResource<>( |
| 113 | SimpleHtmlPanelController.class, |
| 114 | "SimpleHtmlPanel.fxml" |
| 115 | ); |
| 116 | this.skillFilterBox = new JComboBox<>(); |
| 117 | initComponents(); |
| 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 |
nothing calls this directly
no outgoing calls
no test coverage detected