⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 permisldapconnectionsetup.java

📁 一个完整的XACML工程,学习XACML技术的好例子!
💻 JAVA
字号:
/*
* Copyright (c) 2000-2005, University of Salford
* All rights reserved.
*
* Redistribution and use in source and binary forms, with or without 
* modification, are permitted provided that the following conditions are met:
*
* Redistributions of source code must retain the above copyright notice, this 
* list of conditions and the following disclaimer.
* 
* Redistributions in binary form must reproduce the above copyright notice, 
* this list of conditions and the following disclaimer in the documentation 
* and/or other materials provided with the distribution. 
*
* Neither the name of the University of Salford nor the names of its 
* contributors may be used to endorse or promote products derived from this 
* software without specific prior written permission. 
*
* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" 
* AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 
* ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE 
* LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 
* POSSIBILITY OF SUCH DAMAGE.
*/

/*
 * PermisLDAPConnectionSetup.java
 *
 * Created on 28 May 2004, 13:49
 */

package issrg.editor.gui;

import org.netbeans.lib.awtextra.AbsoluteLayout;
import org.netbeans.lib.awtextra.AbsoluteConstraints;
import java.awt.BorderLayout;
import java.util.ResourceBundle;
import java.awt.Dimension;
import java.awt.BorderLayout;
import java.awt.Color;
import java.awt.Dimension;
import java.awt.Font;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;

import javax.swing.border.TitledBorder;

import javax.swing.JButton;
import javax.swing.JInternalFrame;
import javax.swing.JLabel;
import javax.swing.JPanel;
import javax.swing.JTextArea;
import javax.swing.JTextField;

/**
 *
 * @author  issrg
 */
public class PermisLDAPConnectionSetup extends PermisPolicyPanel {
    private PermisPolicyEditorMenu parent;
    /** Creates a new instance of PermisLDAPConnectionSetup */
    public PermisLDAPConnectionSetup(PermisPolicyEditorMenu parent) {
        this.parent = parent;
    }
    
 public JInternalFrame  createPolicy() {
     
        permisLDAPInternalFrame = new javax.swing.JInternalFrame();
        setupPanel = new javax.swing.JPanel();
        urlTextField = new javax.swing.JTextField();
        usernameTextField = new javax.swing.JTextField();
         userPasswordField = new javax.swing.JPasswordField();
        urlLabel = new javax.swing.JLabel();
        usernameLabel = new javax.swing.JLabel();
        passwordLabel = new javax.swing.JLabel();
        buttonPanel = new javax.swing.JPanel();
        addButton = new javax.swing.JButton();
        cancelButton = new javax.swing.JButton();
        closeButton = new javax.swing.JButton();
        titleLabel = new javax.swing.JLabel();

     
        permisLDAPInternalFrame.setForeground(new java.awt.Color(255, 102, 0));
        permisLDAPInternalFrame.setTitle("LDAP Connnection Parameters");
        permisLDAPInternalFrame.setVisible(true);
        setupPanel.setLayout(new org.netbeans.lib.awtextra.AbsoluteLayout());

        setupPanel.add(urlTextField, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 20, 280, 30));
        usernameTextField.setMaximumSize(new java.awt.Dimension(4, 8));
        usernameTextField.setMinimumSize(new java.awt.Dimension(4, 8));
        usernameTextField.setPreferredSize(new java.awt.Dimension(4, 8));
        setupPanel.add(usernameTextField, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 60, 130, 30));

       userPasswordField.setMaximumSize(new java.awt.Dimension(4, 8));
        userPasswordField.setMinimumSize(new java.awt.Dimension(4, 8));
        userPasswordField.setPreferredSize(new java.awt.Dimension(4, 8));
        setupPanel.add(userPasswordField, new org.netbeans.lib.awtextra.AbsoluteConstraints(100, 100, 130, 30));

        urlLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        urlLabel.setText("URL");
        setupPanel.add(urlLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(11, 16, 80, 30));

        usernameLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        usernameLabel.setText("Username");
        setupPanel.add(usernameLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(11, 60, 80, 30));

        passwordLabel.setHorizontalAlignment(javax.swing.SwingConstants.RIGHT);
        passwordLabel.setText("Password");
        setupPanel.add(passwordLabel, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 100, 80, 30));

        addButton.setMnemonic('A');
        addButton.setText("Add");
        addButton.setToolTipText("Add fields to LDAP connection file");
        addButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                addButtonActionPerformed(evt);
            }
        });

        buttonPanel.add(addButton);

        cancelButton.setMnemonic('c');
        cancelButton.setText("Clear");
        cancelButton.setToolTipText("Clear the text boxes");
        cancelButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                cancelButtonActionPerformed(evt);
            }
        });

        buttonPanel.add(cancelButton);

        closeButton.setMnemonic('S');
        closeButton.setText("Close");
        closeButton.setToolTipText("Close this form");
        closeButton.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                closeButtonActionPerformed(evt);
            }
        });

        buttonPanel.add(closeButton);

        setupPanel.add(buttonPanel, new org.netbeans.lib.awtextra.AbsoluteConstraints(10, 160, 390, -1));

        permisLDAPInternalFrame.getContentPane().add(setupPanel, java.awt.BorderLayout.CENTER);

        titleLabel.setForeground(new java.awt.Color(255, 51, 51));
        titleLabel.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
        titleLabel.setText("Connection Paramters");
        permisLDAPInternalFrame.getContentPane().add(titleLabel, java.awt.BorderLayout.NORTH);
 
         add(permisLDAPInternalFrame, BorderLayout.CENTER);
        permisLDAPInternalFrame.show();
        setSize(530, 679);
        permisLDAPInternalFrame.setBounds(150, 50, 410, 245);
        add(permisLDAPInternalFrame);
        setBackground(new Color(153, 153, 204));
        setLocation(150, 45);
        return  permisLDAPInternalFrame;
       
    }

    private void closeButtonActionPerformed(java.awt.event.ActionEvent evt) {
       permisLDAPInternalFrame.setVisible(false);
    }

    private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {
        // Add your handling code here:
    }

    private void addButtonActionPerformed(java.awt.event.ActionEvent evt) {
        // Add your handling code here:
    }
    
      public void performRefresh()
    {
       
    }

    
    // Variables declaration - do not modify
    private javax.swing.JButton addButton;
    private javax.swing.JPanel buttonPanel;
    private javax.swing.JButton cancelButton;
    private javax.swing.JButton closeButton;
    private javax.swing.JLabel passwordLabel;
     private javax.swing.JPasswordField userPasswordField;
    private javax.swing.JInternalFrame permisLDAPInternalFrame;
    private javax.swing.JPanel setupPanel;
    private javax.swing.JLabel titleLabel;
    private javax.swing.JLabel urlLabel;
    private javax.swing.JTextField urlTextField;
    private javax.swing.JLabel usernameLabel;
    private javax.swing.JTextField usernameTextField;
    // End of variables declaration
    
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -