| | |
| | |
|
| | | import javax.swing.BoxLayout;
|
| | | import javax.swing.ButtonGroup;
|
| | | import javax.swing.DefaultComboBoxModel;
|
| | | import javax.swing.DefaultListCellRenderer;
|
| | | import javax.swing.ImageIcon;
|
| | | import javax.swing.JButton;
|
| | |
| | |
|
| | | private JComboBox federationStrategy;
|
| | |
|
| | | private JComboBox ownerField;
|
| | | private JPalette<String> ownersPalette;
|
| | |
|
| | | private JComboBox headRefField;
|
| | |
|
| | |
| | | private JTextField gcThreshold;
|
| | |
|
| | | private JComboBox maxActivityCommits;
|
| | |
|
| | | |
| | | private RegistrantPermissionsPanel usersPalette;
|
| | |
|
| | | private JPalette<String> setsPalette;
|
| | |
| | | gcThreshold = new JTextField(8);
|
| | | gcThreshold.setText(anRepository.gcThreshold);
|
| | |
|
| | | ownerField = new JComboBox();
|
| | | ownersPalette = new JPalette<String>(true);
|
| | |
|
| | | useTickets = new JCheckBox(Translation.get("gb.useTicketsDescription"),
|
| | | anRepository.useTickets);
|
| | |
| | |
|
| | | usersPalette = new RegistrantPermissionsPanel(RegistrantType.USER);
|
| | |
|
| | | JPanel northFieldsPanel = new JPanel(new GridLayout(0, 1, 0, 5));
|
| | | northFieldsPanel.add(newFieldPanel(Translation.get("gb.owner"), ownerField));
|
| | | JPanel northFieldsPanel = new JPanel(new BorderLayout(0, 5));
|
| | | northFieldsPanel.add(newFieldPanel(Translation.get("gb.owners"), ownersPalette), BorderLayout.NORTH);
|
| | | northFieldsPanel.add(newFieldPanel(Translation.get("gb.accessRestriction"),
|
| | | accessRestriction), BorderLayout.NORTH);
|
| | | accessRestriction), BorderLayout.CENTER);
|
| | |
|
| | | JPanel northAccessPanel = new JPanel(new BorderLayout(5, 5));
|
| | | northAccessPanel.add(northFieldsPanel, BorderLayout.NORTH);
|
| | |
| | |
|
| | | repository.name = rname;
|
| | | repository.description = descriptionField.getText();
|
| | | repository.owner = ownerField.getSelectedItem() == null ? null
|
| | | : ownerField.getSelectedItem().toString();
|
| | | repository.owners.clear();
|
| | | repository.owners.addAll(ownersPalette.getSelections());
|
| | | repository.HEAD = headRefField.getSelectedItem() == null ? null
|
| | | : headRefField.getSelectedItem().toString();
|
| | | repository.gcPeriod = (Integer) gcPeriod.getSelectedItem();
|
| | |
| | | this.allowNamed.setSelected(!authenticated);
|
| | | }
|
| | |
|
| | | public void setUsers(String owner, List<String> all, List<RegistrantAccessPermission> permissions) {
|
| | | ownerField.setModel(new DefaultComboBoxModel(all.toArray()));
|
| | | if (!StringUtils.isEmpty(owner)) {
|
| | | ownerField.setSelectedItem(owner);
|
| | | }
|
| | | public void setUsers(List<String> owners, List<String> all, List<RegistrantAccessPermission> permissions) {
|
| | | ownersPalette.setObjects(all, owners);
|
| | | usersPalette.setObjects(all, permissions);
|
| | | }
|
| | |
|