Package com.commander4j.db

Examples of com.commander4j.db.JDBGroup


    setLocation((screen.width - window.width) / 2, (screen.height - window.height) / 2);

  }

  private void resetLists() {
    JDBGroup tempGroup = new JDBGroup(Common.selectedHostID, Common.sessionID);
    tempGroup.setGroupId(lGroupId);

    assignedGroupList.clear();
    assignedGroupList = tempGroup.getModulesAssigned();
    populateAssignedList();

    unAssignedGroupList.clear();
    unAssignedGroupList = tempGroup.getModulesUnAssigned();
    populateUnAssignedList();

    jButtonUndo.setEnabled(false);
    jButtonSave.setEnabled(false);
  }
View Full Code Here


          jButtonSave.setText(lang.get("btn_Save"));
          jButtonSave.setBounds(224, 399, 112, 32);
          jButtonSave.setMnemonic(lang.getMnemonicChar());
          jButtonSave.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              JDBGroup group = new JDBGroup(Common.selectedHostID, Common.sessionID);
              group.setGroupId(lGroupId);
              for (int j = 0; j < unAssignedGroupList.size(); j++)
              {
                group.removeModule(unAssignedGroupList.get(j).toString());
              }
              for (int j = 0; j < assignedGroupList.size(); j++)
              {
                group.addModule(assignedGroupList.get(j).toString());
              }
              jButtonUndo.setEnabled(false);
              jButtonSave.setEnabled(false);
            }
          });
View Full Code Here

  }

  private void populateList(String defaultitem) {
    DefaultComboBoxModel defComboBoxMod = new DefaultComboBoxModel();

    JDBGroup tempGroup = new JDBGroup(Common.selectedHostID, Common.sessionID);
    LinkedList<String> tempGroupList = tempGroup.getGroupIds();
    int sel = -1;
    for (int j = 0; j < tempGroupList.size(); j++)
    {
      defComboBoxMod.addElement(tempGroupList.get(j));
      if (tempGroupList.get(j).toString().equals(defaultitem))
View Full Code Here

    setLocation((screen.width - window.width) / 2, (screen.height - window.height) / 2);

  }

  private void resetLists() {
    JDBGroup tempGroup = new JDBGroup(Common.selectedHostID, Common.sessionID);
    tempGroup.setGroupId(lGroupId);

    assignedGroupList.clear();
    assignedGroupList = tempGroup.getModulesAssigned();
    populateAssignedList();

    unAssignedGroupList.clear();
    unAssignedGroupList = tempGroup.getModulesUnAssigned();
    populateUnAssignedList();

    jButtonUndo.setEnabled(false);
    jButtonSave.setEnabled(false);
  }
View Full Code Here

          jButtonSave.setText(lang.get("btn_Save"));
          jButtonSave.setBounds(224, 399, 112, 28);
          jButtonSave.setMnemonic(lang.getMnemonicChar());
          jButtonSave.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
              JDBGroup group = new JDBGroup(Common.selectedHostID, Common.sessionID);
              group.setGroupId(lGroupId);
              for (int j = 0; j < unAssignedGroupList.size(); j++)
              {
                group.removeModule(unAssignedGroupList.get(j).toString());
              }
              for (int j = 0; j < assignedGroupList.size(); j++)
              {
                group.addModule(assignedGroupList.get(j).toString());
              }
              jButtonUndo.setEnabled(false);
              jButtonSave.setEnabled(false);
            }
          });
View Full Code Here

  private JScrollPane jScrollPane1;
  private String lGroupId;
  private JDBLanguage lang = new JDBLanguage(Common.selectedHostID, Common.sessionID);

  private void addRecord() {
    JDBGroup grp = new JDBGroup(Common.selectedHostID, Common.sessionID);

    lGroupId = JOptionPane.showInputDialog(Common.mainForm, "Enter new group id");
    if (lGroupId != null)
    {
      if (lGroupId.equals("") == false)
      {
        lGroupId = lGroupId.toUpperCase();
        if (grp.create(lGroupId, "") == false)
        {
          JUtility.errorBeep();
          JOptionPane.showMessageDialog(Common.mainForm, grp.getErrorMessage(), "Error", JOptionPane.ERROR_MESSAGE);
        }
        else
        {

          JLaunchMenu.runForm("FRM_ADMIN_GROUP_EDIT", lGroupId);
View Full Code Here

    {
      lGroupId = (String) jListGroups.getSelectedValue();
      int n = JOptionPane.showConfirmDialog(Common.mainForm, "Delete Group " + lGroupId + " ?", "Confirm", JOptionPane.YES_NO_OPTION);
      if (n == 0)
      {
        JDBGroup qroup = new JDBGroup(Common.selectedHostID, Common.sessionID);
        qroup.setGroupId(lGroupId);
        qroup.delete();
        populateList("");
      }
    }
  }
View Full Code Here

      if (lgroup_id_to != null)
      {
        if (lgroup_id_to.equals("") == false)
        {
          lgroup_id_to = lgroup_id_to.toUpperCase();
          JDBGroup group = new JDBGroup(Common.selectedHostID, Common.sessionID);
          group.setGroupId(lgroup_id_from);
          if (group.renameTo(lgroup_id_to) == false)
          {
            JUtility.errorBeep();
            JOptionPane.showMessageDialog(Common.mainForm, group.getErrorMessage(), "Error", JOptionPane.ERROR_MESSAGE);
          }
          populateList(lgroup_id_to);
        }
      }
    }
View Full Code Here

  private JScrollPane jScrollPane1;
  private String lGroupId;
  private JDBLanguage lang = new JDBLanguage(Common.selectedHostID, Common.sessionID);

  private void addRecord() {
    JDBGroup grp = new JDBGroup(Common.selectedHostID, Common.sessionID);

    lGroupId = JOptionPane.showInputDialog(Common.mainForm, lang.get("dlg_Group_Create"));
    if (lGroupId != null)
    {
      if (lGroupId.equals("") == false)
      {
        lGroupId = lGroupId.toUpperCase();
        if (grp.create(lGroupId, "") == false)
        {
          JUtility.errorBeep();
          JOptionPane.showMessageDialog(Common.mainForm, grp.getErrorMessage(), lang.get("err_Error"), JOptionPane.ERROR_MESSAGE);
        }
        else
        {

          JLaunchMenu.runForm("FRM_ADMIN_GROUP_EDIT", lGroupId);
View Full Code Here

    {
      lGroupId = (String) jListGroups.getSelectedValue();
      int n = JOptionPane.showConfirmDialog(Common.mainForm, lang.get("dlg_Group_Delete")+" " + lGroupId + " ?", lang.get("dlg_Confirm"), JOptionPane.YES_NO_OPTION, 0, Common.icon_confirm);
      if (n == 0)
      {
        JDBGroup qroup = new JDBGroup(Common.selectedHostID, Common.sessionID);
        qroup.setGroupId(lGroupId);
        qroup.delete();
        populateList("");
      }
    }
  }
View Full Code Here

TOP

Related Classes of com.commander4j.db.JDBGroup

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.