예제 #1
0
  /**
   * 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.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    LabelOperation = new javax.swing.JLabel();
    UserNameLabel = new javax.swing.JLabel();
    PermisionLabel = new javax.swing.JLabel();
    UserComboBox = new javax.swing.JComboBox();
    PermisionComboBox = new javax.swing.JComboBox();
    ButtonAcept = new javax.swing.JButton();
    ButtonCancel = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle(MainWin.TT("Permissions_Maintenance"));
    setResizable(false);
    addWindowListener(
        new java.awt.event.WindowAdapter() {
          public void windowClosing(java.awt.event.WindowEvent evt) {
            formWindowClosing(evt);
          }
        });

    LabelOperation.setFont(new java.awt.Font("DejaVu Sans", 1, 14));
    LabelOperation.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    LabelOperation.setText("jLabel1");

    UserNameLabel.setFont(MainWin.getFontDialog());
    UserNameLabel.setText("jLabel1");

    PermisionLabel.setFont(MainWin.getFontDialog());
    PermisionLabel.setText("jLabel1");

    UserComboBox.setFont(MainWin.getFontDialog());
    UserComboBox.setModel(getComboModel());

    PermisionComboBox.setFont(MainWin.getFontDialog());
    PermisionComboBox.setModel(
        new javax.swing.DefaultComboBoxModel(
            new String[] {"READ", "CATALOG", "VERSION", "UPDATE", "DELETE"}));

    ButtonAcept.setFont(MainWin.getFontDialog());
    ButtonAcept.setText(MainWin.TT("Ok"));
    ButtonAcept.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            ButtonAceptActionPerformed(evt);
          }
        });

    ButtonCancel.setFont(MainWin.getFontDialog());
    ButtonCancel.setText(MainWin.TT("Cancel"));
    ButtonCancel.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            ButtonCancelActionPerformed(evt);
          }
        });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        UserNameLabel,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        89,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(UserComboBox, 0, 316, Short.MAX_VALUE))
                            .addComponent(
                                LabelOperation,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                417,
                                Short.MAX_VALUE)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        PermisionLabel,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        89,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(PermisionComboBox, 0, 316, Short.MAX_VALUE))
                            .addGroup(
                                javax.swing.GroupLayout.Alignment.TRAILING,
                                layout
                                    .createSequentialGroup()
                                    .addComponent(ButtonAcept)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(ButtonCancel)))
                    .addContainerGap()));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(LabelOperation)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(UserNameLabel)
                            .addComponent(
                                UserComboBox,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(PermisionLabel)
                            .addComponent(
                                PermisionComboBox,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ButtonCancel)
                            .addComponent(ButtonAcept))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    pack();
  } // </editor-fold>//GEN-END:initComponents
예제 #2
0
  /**
   * 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.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
  private void initComponents() {

    LabelOperation = new javax.swing.JLabel();
    SubTypesCheckB = new javax.swing.JCheckBox();
    ParamLabel2 = new javax.swing.JLabel();
    FirstDateTextField = new javax.swing.JTextField();
    ParamLabel3 = new javax.swing.JLabel();
    LastDateTextField = new javax.swing.JTextField();
    GroupLabel = new javax.swing.JLabel();
    GroupComboBox = new javax.swing.JComboBox();
    ParamLabel4 = new javax.swing.JLabel();
    OPDPathTextField = new javax.swing.JTextField();
    ButtonAcept = new javax.swing.JButton();
    ButtonCancel = new javax.swing.JButton();

    setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
    setTitle(MainWin.TT("Programed_Task_Maintenance"));
    setResizable(false);
    addWindowListener(
        new java.awt.event.WindowAdapter() {
          public void windowClosing(java.awt.event.WindowEvent evt) {
            formWindowClosing(evt);
          }
        });

    LabelOperation.setFont(new java.awt.Font("DejaVu Sans", 1, 14)); // NOI18N
    LabelOperation.setHorizontalAlignment(javax.swing.SwingConstants.CENTER);
    LabelOperation.setText(MainWin.TT("Param_Report_Folders"));

    SubTypesCheckB.setFont(MainWin.getFontDialog());
    SubTypesCheckB.setText(MainWin.TT("Subtypes"));
    SubTypesCheckB.setToolTipText(
        MainWin.TT("When_checked_includes_subtypes_of_folders_in_results"));

    ParamLabel2.setFont(MainWin.getFontDialog());
    ParamLabel2.setText(MainWin.TT("From_Number_of_days"));

    FirstDateTextField.setFont(MainWin.getFontDialog());

    ParamLabel3.setFont(MainWin.getFontDialog());
    ParamLabel3.setText(MainWin.TT("To_Number_of_days"));

    LastDateTextField.setFont(MainWin.getFontDialog());

    GroupLabel.setFont(MainWin.getFontDialog());
    GroupLabel.setText(MainWin.TT("Group"));

    GroupComboBox.setFont(MainWin.getFontDialog());
    GroupComboBox.setModel(GetGroups());

    ParamLabel4.setFont(MainWin.getFontDialog());
    ParamLabel4.setText(MainWin.TT("Parent_Folder"));

    OPDPathTextField.setFont(MainWin.getFontDialog());

    ButtonAcept.setFont(MainWin.getFontDialog());
    ButtonAcept.setText(MainWin.TT("Ok"));
    ButtonAcept.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            ButtonAceptActionPerformed(evt);
          }
        });

    ButtonCancel.setFont(MainWin.getFontDialog());
    ButtonCancel.setText(MainWin.TT("Cancel"));
    ButtonCancel.addActionListener(
        new java.awt.event.ActionListener() {
          public void actionPerformed(java.awt.event.ActionEvent evt) {
            ButtonCancelActionPerformed(evt);
          }
        });

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addGap(12, 12, 12)
                    .addComponent(
                        LabelOperation,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        javax.swing.GroupLayout.DEFAULT_SIZE,
                        Short.MAX_VALUE)
                    .addGap(12, 12, 12))
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(ButtonAcept)
                                    .addPreferredGap(
                                        javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(ButtonCancel))
                            .addGroup(
                                layout
                                    .createParallelGroup(
                                        javax.swing.GroupLayout.Alignment.TRAILING, false)
                                    .addGroup(
                                        javax.swing.GroupLayout.Alignment.LEADING,
                                        layout
                                            .createSequentialGroup()
                                            .addComponent(
                                                ParamLabel4,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                152,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(
                                                javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(OPDPathTextField))
                                    .addGroup(
                                        javax.swing.GroupLayout.Alignment.LEADING,
                                        layout
                                            .createSequentialGroup()
                                            .addGroup(
                                                layout
                                                    .createParallelGroup(
                                                        javax.swing.GroupLayout.Alignment.LEADING)
                                                    .addComponent(SubTypesCheckB)
                                                    .addComponent(
                                                        ParamLabel2,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                                        152,
                                                        javax.swing.GroupLayout.PREFERRED_SIZE))
                                            .addPreferredGap(
                                                javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(
                                                FirstDateTextField,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                85,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addGap(32, 32, 32)
                                            .addComponent(
                                                ParamLabel3,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                152,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(
                                                javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(
                                                LastDateTextField,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                85,
                                                javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addGroup(
                                        javax.swing.GroupLayout.Alignment.LEADING,
                                        layout
                                            .createSequentialGroup()
                                            .addComponent(
                                                GroupLabel,
                                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                                152,
                                                javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addPreferredGap(
                                                javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                            .addComponent(
                                                GroupComboBox,
                                                0,
                                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                                Short.MAX_VALUE))))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                javax.swing.GroupLayout.Alignment.TRAILING,
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addComponent(LabelOperation)
                    .addGap(18, 18, 18)
                    .addComponent(SubTypesCheckB)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ParamLabel2)
                            .addComponent(
                                FirstDateTextField,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(ParamLabel3)
                            .addComponent(
                                LastDateTextField,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(GroupLabel)
                            .addComponent(
                                GroupComboBox,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(
                        javax.swing.LayoutStyle.ComponentPlacement.RELATED, 14, Short.MAX_VALUE)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ParamLabel4)
                            .addComponent(
                                OPDPathTextField,
                                javax.swing.GroupLayout.PREFERRED_SIZE,
                                javax.swing.GroupLayout.DEFAULT_SIZE,
                                javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(18, 18, 18)
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(ButtonCancel)
                            .addComponent(ButtonAcept))
                    .addGap(24, 24, 24)));

    pack();
  } // </editor-fold>//GEN-END:initComponents