Print this page
4719 update gate build environment to [open]jdk7 4742 update manifests for javadoc7 4743 Fix deprecated /usr/j2se usage in slp and remove from filesystem(5) manpage 4744 remove traces of /var/sadm/system/admin/default_java Reviewed by: Dan McDonald <danmcd@omniti.com> Reviewed by: Richard Lowe <richlowe@richlowe.net>

Split Close
Expand all
Collapse all
          --- old/usr/src/cmd/krb5/kadmin/gui/dchanger/EncListDialog.java
          +++ new/usr/src/cmd/krb5/kadmin/gui/dchanger/EncListDialog.java
   1    1  /*
   2    2   * Copyright 2005 Sun Microsystems, Inc.  All rights reserved.
   3    3   * Use is subject to license terms.
   4      - *
   5      - * ident        "%Z%%M% %I%     %E% SMI"
   6    4   */
   7    5  
   8    6  import java.awt.*;
   9    7  import java.awt.event.*;
  10    8  import java.text.*;
  11    9  import java.util.*;
  12   10  
  13   11  /*
  14   12   * This class creates a dialog box that helps the user select encryption types
  15   13   * with some mouse clicks.  The dialog box need only be created
↓ open down ↓ 26 lines elided ↑ open up ↑
  42   40  
  43   41          private static Toolkit toolkit = Toolkit.getDefaultToolkit();
  44   42  
  45   43          private Kadmin kadmin;
  46   44          private Checkbox cb[];
  47   45          private Integer grp_num[];
  48   46          private String encList = "";
  49   47  
  50   48          // For I18N
  51   49          private static ResourceBundle rb =
  52      -            ResourceBundle.getBundle("GuiResource" /* NOI18N */); 
       50 +            ResourceBundle.getBundle("GuiResource" /* NOI18N */);
  53   51          private static ResourceBundle hrb =
  54      -            ResourceBundle.getBundle("HelpData" /* NOI18N */); 
       52 +            ResourceBundle.getBundle("HelpData" /* NOI18N */);
  55   53  
  56   54          /*
  57   55           * Constructor that lays out the components and sets the different
  58      -         * event handlers. 
       56 +         * event handlers.
  59   57           */
  60   58          public EncListDialog(Frame parent, Color background, Color foreground,
  61   59              Kadmin session) {
  62   60                  super(parent, getString("SEAM Encryption Type List Helper"),
  63   61                      true);
  64   62  
  65   63                  this.parent = parent;
  66   64  
  67   65                  this.kadmin = session;
  68   66  
↓ open down ↓ 78 lines elided ↑ open up ↑
 147  145                  ok.addActionListener(bl);
 148  146                  clear.addActionListener(bl);
 149  147                  cancel.addActionListener(bl);
 150  148                  help.addActionListener(bl);
 151  149          }
 152  150  
 153  151          /*
 154  152           * Closes (hides) the dialog box when the user is done
 155  153           * @param save true if the box is being dismissed by clicking on
 156  154           * "ok" and the user wants to retain the modified value, false
 157      -         * otherwise. 
      155 +         * otherwise.
 158  156           */
 159  157          private void encListDialogClose(boolean save) {
 160  158                  this.save = save;
 161  159                  setVisible(false);
 162  160          }
 163  161  
 164  162          /*
 165  163           * Checks if the user requested that the value in this
 166  164           * EncListDialog be used e.g., by clicking on "Ok" instead of
 167  165           * "Cancel."
↓ open down ↓ 20 lines elided ↑ open up ↑
 188  186                                  if (cb[j].getLabel().compareTo(e_list[i])
 189  187                                      == 0) {
 190  188                                          cb[j].setState(true);
 191  189                                          break;
 192  190                                  }
 193  191                          }
 194  192                  }
 195  193          }
 196  194  
 197  195          // ***********************************************
 198      -        //       I N N E R    C L A S S E S   F O L L O W
      196 +        //       I N N E R    C L A S S E S   F O L L O W
 199  197          // ***********************************************
 200  198  
 201  199          /*
 202  200           * Listener for an annoying work around in deselection of a check box
 203  201           * in case the user doesn't want any items in a grouped list.
 204  202           */
 205  203          private class CBListener implements ItemListener {
 206  204  
 207  205                  public void itemStateChanged(ItemEvent e) {
 208  206                          Checkbox c = (Checkbox) e.getItemSelectable();
↓ open down ↓ 40 lines elided ↑ open up ↑
 249  247                          if (e.getSource() == ok) {
 250  248                                  EncListDialog.this.encListDialogClose(true);
 251  249                          } else if (e.getSource() == cancel) {
 252  250                                  EncListDialog.this.encListDialogClose(false);
 253  251                          } else if (e.getSource() == clear) {
 254  252                                  for (int i = 0; i < cb.length; i++) {
 255  253                                          cb[i].setState(false);
 256  254                                  }
 257  255                          } else if (e.getSource() == help) {
 258  256                                  if (hd != null)
 259      -                                        hd.show();
      257 +                                        hd.setVisible(true);
 260  258                                  else {
 261  259                                          hd = new HelpDialog(
 262  260                                              EncListDialog.this.parent,
 263      -                                            getString(
      261 +                                            getString(
 264  262                                              "Help for Encryption Type Dialog"),
 265      -                                            false);
      263 +                                            false);
 266  264                                          hd.setVisible(true);
 267  265                                          hd.setText(getString(hrb,
 268      -                                             "EncryptionTypeDialogHelp"));
      266 +                                            "EncryptionTypeDialogHelp"));
 269  267                                  }
 270  268                          }
 271  269                  } // actionPerformed
 272  270          }
 273  271  
 274  272          /*
 275  273           * The string representation of the dialog box.
 276  274           * @return a String which contians the encryption type list
 277  275           */
 278  276          public String toString() {
↓ open down ↓ 28 lines elided ↑ open up ↑
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX