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

Method ChooserDialog

code/src/java/pcgen/gui2/dialog/ChooserDialog.java:109–135  ·  view source on GitHub ↗

Create a new instance of ChooserDialog for selecting from the data supplied in the chooserFacade. @param frame The window we are opening relative to. @param chooser The definition of what should be displayed.

(Frame frame, ChooserFacade chooser)

Source from the content-addressed store, hash-verified

107 * @param chooser The definition of what should be displayed.
108 */
109 public ChooserDialog(Frame frame, ChooserFacade chooser)
110 {
111 super(frame, true);
112 this.chooser = chooser;
113 if (chooser.isUserInput())
114 {
115 this.availTable = null;
116 this.availInput = new JTextField(20);
117 }
118 else
119 {
120 this.availTable = new JTreeViewTable<>();
121 this.availInput = null;
122 }
123 this.remainingLabel = new JLabel();
124 this.treeViewModel = new GeneralTreeViewModel();
125 this.list = new JListEx();
126 this.listModel = new FacadeListModel<>();
127 this.infoPane = new InfoPane();
128
129 treeViewModel.setDelegate(chooser.getAvailableList());
130 listModel.setListFacade(chooser.getSelectedList());
131 chooser.getRemainingSelections().addReferenceListener(this);
132 overridePrefs();
133 initComponents();
134 pack();
135 }
136
137 @Override
138 public void setVisible(boolean b)

Callers

nothing calls this directly

Calls 9

overridePrefsMethod · 0.95
initComponentsMethod · 0.95
isUserInputMethod · 0.65
getAvailableListMethod · 0.65
getSelectedListMethod · 0.65
addReferenceListenerMethod · 0.65
setDelegateMethod · 0.45
setListFacadeMethod · 0.45

Tested by

no test coverage detected