| | |
| | | import java.awt.Insets;
|
| | | import java.awt.event.ActionEvent;
|
| | | import java.awt.event.ActionListener;
|
| | | import java.awt.event.KeyEvent;
|
| | | import java.text.MessageFormat;
|
| | | import java.util.ArrayList;
|
| | | import java.util.Arrays;
|
| | |
| | | import javax.swing.JOptionPane;
|
| | | import javax.swing.JPanel;
|
| | | import javax.swing.JPasswordField;
|
| | | import javax.swing.JRootPane;
|
| | | import javax.swing.JTextField;
|
| | | import javax.swing.KeyStroke;
|
| | |
|
| | | import com.gitblit.Constants.AccessRestrictionType;
|
| | | import com.gitblit.IStoredSettings;
|
| | |
| | | setModal(true);
|
| | | setTitle(Translation.get("gb.edit") + ": " + anUser.username);
|
| | | setIconImage(new ImageIcon(getClass().getResource("/gitblt-favicon.png")).getImage());
|
| | | }
|
| | | |
| | | @Override
|
| | | protected JRootPane createRootPane() {
|
| | | KeyStroke stroke = KeyStroke.getKeyStroke(KeyEvent.VK_ESCAPE, 0);
|
| | | JRootPane rootPane = new JRootPane();
|
| | | rootPane.registerKeyboardAction(new ActionListener() {
|
| | | public void actionPerformed(ActionEvent actionEvent) {
|
| | | setVisible(false);
|
| | | }
|
| | | }, stroke, JComponent.WHEN_IN_FOCUSED_WINDOW);
|
| | | return rootPane;
|
| | | }
|
| | |
|
| | | private void initialize(UserModel anUser) {
|
| | |
| | | getContentPane().setLayout(new BorderLayout(5, 5));
|
| | | getContentPane().add(centerPanel, BorderLayout.CENTER);
|
| | | pack();
|
| | | setLocationRelativeTo(null);
|
| | | }
|
| | |
|
| | | private JPanel newFieldPanel(String label, JComponent comp) {
|