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

Class CharacterSheetInfoTab

code/src/java/pcgen/gui2/tabs/CharacterSheetInfoTab.java:68–517  ·  view source on GitHub ↗

The Class CharacterSheetInfoTab is a placeholder for the character sheet tab.

Source from the content-addressed store, hash-verified

66 * character sheet tab.
67 */
68public class CharacterSheetInfoTab extends FlippingSplitPane implements CharacterInfoTab, DisplayAwareTab
69{
70 private final TabTitle tabTitle = new TabTitle(Tab.CHARACTERSHEET);
71 private final CharacterSheetPanel csheet;
72 private final ComboBox<File> sheetBox;
73 private final JTable equipSetTable;
74 private final JTable tempBonusTable;
75 private final JTable tempBonusRowTable;
76 private final JTable equipSetRowTable;
77
78
79 /**
80 * Create a new instance of CharacterSheetInfoTab
81 */
82 @SuppressWarnings("serial")
83 public CharacterSheetInfoTab()
84 {
85 this.csheet = new CharacterSheetPanel();
86 this.sheetBox = new ComboBox<>();
87 this.equipSetTable = TableUtils.createDefaultTable();
88 this.equipSetRowTable = TableUtils.createDefaultTable();
89 this.tempBonusTable = TableUtils.createDefaultTable();
90 this.tempBonusRowTable = TableUtils.createDefaultTable();
91 setOneTouchExpandable(true);
92
93 JPanel panel = new JPanel(new BorderLayout());
94 Box box = Box.createHorizontalBox();
95 box.add(new JLabel(LanguageBundle.getString("in_character_sheet_label"))); //$NON-NLS-1$
96
97 // todo: make this into a proper component
98 sheetBox.setConverter(new StringConverter<>()
99 {
100 @Override
101 public String toString(final File file)
102 {
103 if (file == null)
104 {
105 return "";
106 }
107 return file.getName();
108 }
109
110 @Override
111 public File fromString(final String input)
112 {
113 if (input == null)
114 {
115 return null;
116 }
117 return new File(input);
118 }
119 });
120
121 box.add(GuiUtility.wrapParentAsJFXPanel(sheetBox));
122 panel.add(box, BorderLayout.NORTH);
123 FlippingSplitPane subPane = new FlippingSplitPane();
124 subPane.setOrientation(VERTICAL_SPLIT);
125 equipSetTable.getTableHeader().setReorderingAllowed(false);

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected