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

Method initComponents

code/src/java/pcgen/gui2/CharacterTabs.java:87–110  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

85 }
86
87 private void initComponents()
88 {
89 CharacterManager.getCharacters().addListListener(this);
90 frame.getSelectedCharacterRef().addReferenceListener(this);
91
92 setTabPlacement(SwingConstants.BOTTOM);
93 addChangeListener(this);
94 setSharedComponent(infoTabbedPane);
95 //Initialize popup menu
96 PCGenActionMap actions = frame.getActionMap();
97 popupMenu.add(actions.get(PCGenActionMap.NEW_COMMAND));
98 popupMenu.add(actions.get(PCGenActionMap.CLOSE_COMMAND));
99 popupMenu.add(actions.get(PCGenActionMap.SAVE_COMMAND));
100 popupMenu.add(actions.get(PCGenActionMap.SAVEAS_COMMAND));
101 addMouseListener(new PopupMouseAdapter()
102 {
103 @Override
104 public void showPopup(final MouseEvent e)
105 {
106 popupMenu.setVisible(true);
107 popupMenu.show(e.getComponent(), e.getX(), e.getY() - popupMenu.getHeight());
108 }
109 });
110 }
111
112 private void addCharacter(CharacterFacade character)
113 {

Callers 1

CharacterTabsMethod · 0.95

Calls 8

getCharactersMethod · 0.95
setSharedComponentMethod · 0.80
getActionMapMethod · 0.80
addListListenerMethod · 0.65
addReferenceListenerMethod · 0.65
addMethod · 0.65
getMethod · 0.65

Tested by

no test coverage detected