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)
| 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) |
nothing calls this directly
no test coverage detected