📄 projectmanagementtab.java
字号:
gbc.gridx = 1; gbc.gridy = 1; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.weightx = 1; gbc.insets = new Insets(4, 4, 4, 4); getContentPane().add(password, gbc); JLabel lab3 = new JLabel("Confirm password:"); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new java.awt.Insets(4, 4, 4, 4); getContentPane().add(lab3, gbc); confirm = new JPasswordField(""); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.weightx = 1; gbc.insets = new Insets(4, 4, 4, 4); getContentPane().add(confirm, gbc); break; case CHANGEPASSWORD: setTitle("Change Password"); lab1 = new JLabel("Old Password:"); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new java.awt.Insets(4, 4, 4, 4); getContentPane().add(lab1, gbc); oldPassword = new JPasswordField(""); oldPassword.setColumns(20); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 0; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.weightx = 1; gbc.insets = new Insets(4, 4, 4, 4); getContentPane().add(oldPassword, gbc); lab2 = new JLabel("New Password:"); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new java.awt.Insets(4, 4, 4, 4); getContentPane().add(lab2, gbc); password = new JPasswordField(""); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 1; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.weightx = 1; gbc.insets = new Insets(4, 4, 4, 4); getContentPane().add(password, gbc); lab3 = new JLabel("Confirm new password:"); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new java.awt.Insets(4, 4, 4, 4); getContentPane().add(lab3, gbc); confirm = new JPasswordField(""); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.weightx = 1; gbc.insets = new Insets(4, 4, 4, 4); getContentPane().add(confirm, gbc); break; case LOGINUSER: setTitle("Login"); lab1 = new JLabel("User name:"); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new java.awt.Insets(4, 4, 4, 4); getContentPane().add(lab1, gbc); lab2 = new JLabel(userName); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new Insets(4, 4, 4, 4); getContentPane().add(lab2, gbc); lab3 = new JLabel("Password:"); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new java.awt.Insets(4, 4, 4, 4); getContentPane().add(lab3, gbc); password = new JPasswordField(""); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 1; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.weightx = 1; gbc.insets = new Insets(4, 4, 4, 4); getContentPane().add(password, gbc); break; case DELETEUSER: setTitle("Delete User"); lab1 = new JLabel("Click OK to delete user: \"" + userName + "\""); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.gridwidth = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new java.awt.Insets(4, 4, 4, 4); getContentPane().add(lab1, gbc); break; case AUTHORIZE: setTitle("Authorize"); lab3 = new JLabel("Administrator password:"); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new java.awt.Insets(4, 4, 4, 4); getContentPane().add(lab3, gbc); password = new JPasswordField(""); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 0; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.weightx = 1; gbc.insets = new Insets(4, 4, 4, 4); getContentPane().add(password, gbc); break; case RENAMEAUTHPASS: setTitle("Change Authorization Password"); lab1 = new JLabel("Old Authorization Password:"); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 0; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new java.awt.Insets(4, 4, 4, 4); getContentPane().add(lab1, gbc); oldPassword = new JPasswordField(""); oldPassword.setColumns(20); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 0; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.weightx = 1; gbc.insets = new Insets(4, 4, 4, 4); getContentPane().add(oldPassword, gbc); lab2 = new JLabel("New Authorization Password:"); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 1; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new java.awt.Insets(4, 4, 4, 4); getContentPane().add(lab2, gbc); password = new JPasswordField(""); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 1; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.weightx = 1; gbc.insets = new Insets(4, 4, 4, 4); getContentPane().add(password, gbc); lab3 = new JLabel("Confirm new password:"); gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 2; gbc.anchor = GridBagConstraints.WEST; gbc.insets = new java.awt.Insets(4, 4, 4, 4); getContentPane().add(lab3, gbc); confirm = new JPasswordField(""); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 2; gbc.anchor = GridBagConstraints.CENTER; gbc.fill = GridBagConstraints.HORIZONTAL; gbc.weightx = 1; gbc.insets = new Insets(4, 4, 4, 4); getContentPane().add(confirm, gbc); break; } // control buttons JButton cancel = new JButton("Cancel"); GridBagConstraints gbc = new GridBagConstraints(); gbc.gridx = 0; gbc.gridy = 3; gbc.insets = new java.awt.Insets(4, 4, 4, 4); getContentPane().add(cancel, gbc); cancel.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { exit(false); } }); JButton ok = new JButton("OK"); gbc = new GridBagConstraints(); gbc.gridx = 1; gbc.gridy = 3; gbc.insets = new java.awt.Insets(4, 4, 4, 4); getContentPane().add(ok, gbc); ok.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent evt) { exit(true); } }); getRootPane().setDefaultButton(ok); pack(); } } private void reloadUsers() { userModel.clear(); for(Iterator<String> it = Users.getUsers(); it.hasNext(); ) { String userName = it.next(); userModel.addElement(userName); } } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; projectManagement = new javax.swing.JPanel(); repositoryPanel = new javax.swing.JPanel(); jLabel1 = new javax.swing.JLabel(); jLabel4 = new javax.swing.JLabel(); jLabel6 = new javax.swing.JLabel(); jLabel7 = new javax.swing.JLabel(); browseButton = new javax.swing.JButton(); repositoryTextArea = new javax.swing.JTextArea(); midWarning = new javax.swing.JLabel(); usersPanelMidSecurity = new javax.swing.JPanel(); currentUserLabel = new javax.swing.JLabel(); userListPane = new javax.swing.JScrollPane(); jLabel5 = new javax.swing.JLabel(); jPanel1 = new javax.swing.JPanel(); deleteButton = new javax.swing.JButton(); addButton = new javax.swing.JButton(); authorizeButton = new javax.swing.JButton(); jSeparator1 = new javax.swing.JSeparator(); loginButton = new javax.swing.JButton(); passwordButton = new javax.swing.JButton(); usersPanelLowSecurity = new javax.swing.JPanel(); jLabel3 = new javax.swing.JLabel(); userName = new javax.swing.JTextField(); getContentPane().setLayout(new java.awt.GridBagLayout()); setTitle("Project Management"); setName(""); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { closeDialog(evt); } }); projectManagement.setLayout(new java.awt.GridBagLayout()); repositoryPanel.setLayout(new java.awt.GridBagLayout()); repositoryPanel.setBorder(new javax.swing.border.TitledBorder("Repository")); jLabel1.setText("The repository contains the latest version of your circuit,"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.gridwidth = 2; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(4, 4, 1, 4); repositoryPanel.add(jLabel1, gridBagConstraints); jLabel4.setText("Currently:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 3; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4); repositoryPanel.add(jLabel4, gridBagConstraints); jLabel6.setText("a history of changes to each cell, and the user database."); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.gridwidth = 2; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(1, 4, 1, 4); repositoryPanel.add(jLabel6, gridBagConstraints); jLabel7.setText("It must be a directory that everyone can access (on a network)."); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.gridwidth = 2; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(1, 4, 4, 4); repositoryPanel.add(jLabel7, gridBagConstraints); browseButton.setText("Browse"); browseButton.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { browseButtonActionPerformed(evt); } }); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 4; gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4); repositoryPanel.add(browseButton, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 3; gridBagConstraints.gridheight = 2;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -