示例#1
0
  public String getParameter(String input) {

    // <Begin_getParameter_String>
    String value = null;
    if (applet != null) {
      value = applet.getParameter(input);
    } else {
      value = (String) com.adventnet.apiutils.Utility.getParameter(input);
    }
    if (value == null) {
      if (input.equals("MS_MODE")) value = "3";
      if (input.equals("RESOURCE_PROPERTIES")) value = "SecurityAdministrationResources";
    }
    return value;

    // <End_getParameter_String>
  }
示例#2
0
  public String getParameter(String input) {

    // <Begin_getParameter_String>
    String value = null;
    if (applet != null) {
      value = applet.getParameter(input);
    } else {
      value = (String) com.adventnet.apiutils.Utility.getParameter(input);
    }
    if (value == null) {
      if (input.equals("HOST")) value = "localhost"; // No Internationalisation
      if (input.equals("PORT")) value = "161"; // No Internationalisation
    }
    return value;

    // <End_getParameter_String>
  }
示例#3
0
  public void init() {

    // <Begin_init>
    if (getParameter("RESOURCE_PROPERTIES") != null) {
      localePropertiesFileName = getParameter("RESOURCE_PROPERTIES");
    }
    resourceBundle =
        com.adventnet.apiutils.Utility.getBundle(
            localePropertiesFileName, getParameter("RESOURCE_LOCALE"), applet);
    if (initialized) return;
    this.setSize(getPreferredSize().width + 495, getPreferredSize().height + 480);
    setTitle(resourceBundle.getString("ViewConfig"));
    Container container = getContentPane();
    container.setLayout(new BorderLayout());
    try {
      initVariables();
      setUpGUI(container);
      setUpProperties();
      setUpConnections();
    } catch (Exception ex) {
      showStatus(resourceBundle.getString("Error in init method"), ex);
    }
    // let us set the initialized variable to true so
    // we dont initialize again even if init is called
    initialized = true;

    // <End_init>
    setTitle(resourceBundle.getString("View Configuration"));
    setIconImage(AuthMain.getBuilderUiIfInstance().getFrameIcon());
    JLabel1.setIcon(AuthMain.getBuilderUiIfInstance().getImage("viewconfig.png"));
    com.adventnet.security.ui.ViewListCellRenderer ViewListCellRenderer1 =
        new com.adventnet.security.ui.ViewListCellRenderer();
    JTable1.setDefaultRenderer(JTable1.getColumnClass(0), ViewListCellRenderer1);

    JLabel2.setIcon(AuthMain.getBuilderUiIfInstance().getImage("addview1.png"));
    JTable1.getCellEditor(0, 0)
        .getTableCellEditorComponent(JTable1, null, true, 0, 0)
        .setEnabled(false);
    DefaultCellEditor te = (DefaultCellEditor) JTable1.getCellEditor(0, 0);
    te.setClickCountToStart(10);
    JTable1.setCellEditor(te);

    JViewport vp = new JViewport();
    JLabel lab = new JLabel(resourceBundle.getString("List of available views"));
    lab.setHorizontalAlignment((int) JLabel.CENTER_ALIGNMENT);
    lab.setForeground(Color.black);
    vp.setView(lab);

    AuthMain.getBuilderUiIfInstance().centerWindow(this);
    setData();

    viewc = this;

    addWindowListener(
        new WindowAdapter() {
          public void windowClosing(WindowEvent we) {
            close();
          }
        });

    /*
    TableColumn col2  = JTable1.getColumnModel().getColumn(1);
    DefaultTableCellRenderer ren = new DefaultTableCellRenderer();
    ren.setIcon(AuthMain.getBuilderUiIfInstance().getImage("task1.png"));
    	col2.setCellRenderer(ren);
     	col2.setMaxWidth(30);
    */

    DefaultListSelectionModel selModel = new DefaultListSelectionModel();
    selModel.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    JTable1.setSelectionModel(selModel);
  }