Package com.commander4j.gui

Examples of com.commander4j.gui.JList4j


          jScrollPane1 = new JScrollPane();
          jDesktopPane1.add(jScrollPane1);
          jScrollPane1.setBounds(10, 10, 358, 476);
          {
            ListModel jList1Model = new DefaultComboBoxModel(new String[] { "Item One", "Item Two" });
            jListSelectLists = new JList4j();
            jScrollPane1.setViewportView(jListSelectLists);
            jListSelectLists.addMouseListener(new MouseAdapter() {
              public void mouseClicked(MouseEvent evt) {
                if (evt.getClickCount() == 2)
                {
View Full Code Here


          jScrollPane1 = new JScrollPane();
          jDesktopPane1.add(jScrollPane1);
          jScrollPane1.setBounds(10, 10, 376, 476);
          {
            ListModel jList1Model = new DefaultComboBoxModel(new String[] { "Item One", "Item Two" });
            jListCustomers = new JList4j();
            jScrollPane1.setViewportView(jListCustomers);
            jListCustomers.addMouseListener(new MouseAdapter() {
              public void mouseClicked(MouseEvent evt) {
                if (evt.getClickCount() == 2)
                {
View Full Code Here

          jScrollPane1 = new JScrollPane();
          jDesktopPane1.add(jScrollPane1);
          jScrollPane1.setBounds(10, 10, 287, 476);
          {
            ListModel jList1Model = new DefaultComboBoxModel(new String[] { "Item One", "Item Two" });
            jListUoms = new JList4j();
            jScrollPane1.setViewportView(jListUoms);
            jListUoms.addMouseListener(new MouseAdapter() {
              public void mouseClicked(MouseEvent evt) {
                if (evt.getClickCount() == 2)
                {
View Full Code Here

      jScrollPaneFrom = new JScrollPane();
      desktopPane.add(jScrollPaneFrom);
      jScrollPaneFrom.setBounds(14, 37, 258, 395);

      ListModel jListHostsModelFrom = new DefaultComboBoxModel(new String[] { "Item One", "Item Two" });
      jListHostFrom = new JList4j();
      jScrollPaneFrom.setViewportView(jListHostFrom);
      jListHostFrom.setModel(jListHostsModelFrom);
      jListHostFrom.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
      jListHostFrom.addListSelectionListener(new ListSelectionListener()
      {
        public void valueChanged(ListSelectionEvent evt)
        {
          getHostDataFrom();
        }
      });

      jScrollPaneTo = new JScrollPane();
      desktopPane.add(jScrollPaneTo);
      jScrollPaneTo.setBounds(310, 37, 248, 395);

      ListModel jListHostsModelTo = new DefaultComboBoxModel(new String[] { "Item One", "Item Two" });
      jListHostTo = new JList4j();
      jScrollPaneTo.setViewportView(jListHostTo);
      jListHostTo.setModel(jListHostsModelTo);
      jListHostTo.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
      jListHostTo.addListSelectionListener(new ListSelectionListener()
      {
View Full Code Here

    jLabel10.setBounds(353, 113, 77, 21);

    JScrollPane scrollPaneDictionary = new JScrollPane();
    scrollPaneDictionary.setBounds(559, 32, 440, 154);

    listDictionary = new JList4j();

    ComboBoxModel model = new DefaultComboBoxModel(dict.getTestCheckListList());
    listDictionary.setModel(model);
    listDictionary.setCellRenderer(new MultiItemCheckListRenderer());
    listDictionary.addMouseListener(new MouseAdapter()
    {
      public void mouseClicked(MouseEvent event)
      {
        JList4j list = (JList4j) event.getSource();

        // Get index of item clicked

        int index = list.locationToIndex(event.getPoint());
        JCheckListItem item = (JCheckListItem) list.getModel().getElementAt(index);

        // Toggle selected state

        item.setSelected(!item.isSelected());

        // Repaint cell

        list.repaint(list.getCellBounds(index, index));
      }
    });

    scrollPaneDictionary.setViewportView(listDictionary);
View Full Code Here

          jScrollPane1 = new JScrollPane();
          jScrollPane1.setBounds(5, 3, 302, 235);
          jDesktopPane1.add(jScrollPane1);
          {
            ListModel jListHostsModel = new DefaultComboBoxModel(new String[] { "Item One", "Item Two" });
            jListHosts = new JList4j();
            jScrollPane1.setViewportView(jListHosts);
            jListHosts.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            jListHosts.addMouseListener(new MouseAdapter() {
              public void mouseClicked(MouseEvent evt) {
                if (evt.getClickCount() == 2)
View Full Code Here

          jScrollPanePrinters = new JScrollPane();
          jDesktopPane1.add(jScrollPanePrinters);
          jScrollPanePrinters.setBounds(3, 3, 620, 231);
          {
            ListModel jList1Model = new DefaultComboBoxModel(new String[] { "Item One", "Item Two" });
            jListPrinters = new JList4j();
            jScrollPanePrinters.setViewportView(jListPrinters);
            jListPrinters.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            jListPrinters.addMouseListener(new MouseAdapter() {
              public void mouseClicked(MouseEvent evt) {
                if (evt.getClickCount() == 2)
View Full Code Here

          jDesktopPane1.add(jScrollPane1);
          jScrollPane1.setBounds(10, 10, 353, 476);
          {
            ListModel jList1Model = new DefaultComboBoxModel(new String[]
            { "Item One", "Item Two" });
            jListDictionary = new JList4j();
            jScrollPane1.setViewportView(jListDictionary);
            jListDictionary.addMouseListener(new MouseAdapter()
            {
              public void mouseClicked(MouseEvent evt)
              {
View Full Code Here

          jScrollPaneUnassigned.setBounds(221, 30, 161, 315);
          jScrollPaneUnassigned.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
          jScrollPaneUnassigned.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
          {
            ListModel jListUnassignedModel = new DefaultComboBoxModel(new String[] { "Item One", "Item Two" });
            jListUnassigned = new JList4j();
            jScrollPaneUnassigned.setViewportView(jListUnassigned);
            jListUnassigned.setModel(jListUnassignedModel);
            jListUnassigned.setCellRenderer(Common.renderer_list_unassigned);
            jListUnassigned.setBackground(Common.color_list_unassigned);
          }
        }
        {
          jScrollPaneAssigned = new JScrollPane();
          jDesktopPane1.add(jScrollPaneAssigned);
          jScrollPaneAssigned.setBounds(10, 30, 161, 315);
          jScrollPaneAssigned.setFocusable(false);
          jScrollPaneAssigned.setHorizontalScrollBarPolicy(JScrollPane.HORIZONTAL_SCROLLBAR_NEVER);
          jScrollPaneAssigned.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
          {
            ListModel jListAssignedModel = new DefaultComboBoxModel(new String[] { "Item One", "Item Two" });
            jListAssigned = new JList4j();
            jListAssigned.setSize(157, 315);
            jScrollPaneAssigned.setViewportView(jListAssigned);
            jListAssigned.setModel(jListAssignedModel);
            jListAssigned.setForeground(Common.color_listFontStandard);
            jListAssigned.setCellRenderer(Common.renderer_list_assigned);
View Full Code Here

   
    JScrollPane scrollPaneInspection = new JScrollPane();
    scrollPaneInspection.setBounds(16, 24, 655, 132);
    panelInspection.add(scrollPaneInspection);
   
      listInspection = new JList4j();
      listInspection.addMouseListener(new MouseAdapter() {
        @Override
        public void mouseClicked(MouseEvent arg0) {
        if (arg0.getClickCount() == 2)
        {
          editInspectionRecord();
        }
        }
      });
      listInspection.addListSelectionListener(new ListSelectionListener() {
        public void valueChanged(ListSelectionEvent arg0) {
          String selectedItem = "";
          if (listInspection.getSelectedIndex() >=0)
          {
            selectedItem =   ((JDBQMInspection) listInspection.getSelectedValue()).getInspectionID();
          }
          populateActivityList(selectedItem,"");
        }
      });
    //listInspection.setLocation(0, 58);
    scrollPaneInspection.setViewportView(listInspection);
   
    JButton4j btnAdd1 = new JButton4j(lang.get("btn_Add"));
    btnAdd1.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        addInspectionRecord();
      }
    });
    btnAdd1.setIcon(Common.icon_add);
    btnAdd1.setBounds(683, 24, 117, 28);
    btnAdd1.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_QM_INSPECTION"));
    panelInspection.add(btnAdd1);
   
    JButton4j btnDelete1 = new JButton4j(lang.get("btn_Delete"));
    btnDelete1.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        deleteInspectionRecord();
      }
    });
    btnDelete1.setBounds(683, 80, 117, 28);
    btnDelete1.setIcon(Common.icon_delete);
    btnDelete1.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_QM_INSPECTION"));
    panelInspection.add(btnDelete1);
   
    JButton4j btnEdit1 = new JButton4j(lang.get("btn_Edit"));
    btnEdit1.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        editInspectionRecord();
      }
    });
    btnEdit1.setIcon(Common.icon_edit);
    btnEdit1.setBounds(683, 52, 117, 28);
    btnEdit1.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_QM_INSPECTION"));
    panelInspection.add(btnEdit1);
   
    JPanel panelActivity = new JPanel();
    panelActivity.setBackground(Color.WHITE);
    panelActivity.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null), lang.get("lbl_Activity"), TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
    panelActivity.setBounds(6, 245, 810, 184);
    panelActivity.setFont(Common.font_title);
    desktopPane.add(panelActivity);
    panelActivity.setLayout(null);
   
    JScrollPane scrollPaneActivity = new JScrollPane();
    scrollPaneActivity.setBounds(16, 24, 655, 143);
    panelActivity.add(scrollPaneActivity);
   
    listActivity = new JList4j();
    listActivity.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseClicked(MouseEvent e) {
        if (e.getClickCount() == 2)
        {
          editActivityRecord();
        }
      }
    });
    listActivity.addListSelectionListener(new ListSelectionListener() {
      public void valueChanged(ListSelectionEvent e) {
          String selectedItemInsp = "";
          String selectedItemAct = "";
          if (listActivity.getSelectedIndex() >=0)
          {
            selectedItemInsp =   ((JDBQMActivity) listActivity.getSelectedValue()).getInspectionID();
            selectedItemAct =   ((JDBQMActivity) listActivity.getSelectedValue()).getActivityID();
          }
          populateTestList(selectedItemInsp,selectedItemAct,"");
      }
    });
    scrollPaneActivity.setViewportView(listActivity);
   
    JButton4j btnDelete2 = new JButton4j(lang.get("btn_Delete"));
    btnDelete2.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        deleteActivityRecord();
      }
    });
    btnDelete2.setBounds(683, 80, 117, 28);
    btnDelete2.setIcon(Common.icon_delete);
    btnDelete2.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_QM_ACTIVITY"));
    panelActivity.add(btnDelete2);
   
    JButton4j btnEdit2 = new JButton4j(lang.get("btn_Edit"));
    btnEdit2.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent arg0) {
        editActivityRecord();
      }
    });
    btnEdit2.setIcon(Common.icon_edit);
    btnEdit2.setBounds(683, 52, 117, 28);
    btnEdit2.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_QM_ACTIVITY"));
    panelActivity.add(btnEdit2);
   
    JButton4j btnAdd2 = new JButton4j(lang.get("btn_Add"));
    btnAdd2.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        addActivityRecord();
      }
    });
    btnAdd2.setEnabled(Common.userList.getUser(Common.sessionID).isModuleAllowed("FRM_QM_ACTIVITY"));
    btnAdd2.setBounds(683, 24, 117, 28);
    btnAdd2.setIcon(Common.icon_add);
    panelActivity.add(btnAdd2);
   
    JPanel panelTests = new JPanel();
    panelTests.setBackground(Color.WHITE);
    panelTests.setBorder(new TitledBorder(new EtchedBorder(EtchedBorder.LOWERED, null, null), lang.get("lbl_Test"), TitledBorder.LEADING, TitledBorder.TOP, null, new Color(0, 0, 0)));
    panelTests.setBounds(6, 426, 810, 238);
    panelTests.setFont(Common.font_title);
    desktopPane.add(panelTests);
    panelTests.setLayout(null);
   
    JScrollPane scrollPaneTests = new JScrollPane();
    scrollPaneTests.setBounds(16, 23, 659, 197);
    panelTests.add(scrollPaneTests);
   
    listTest = new JList4j();
    listTest.addMouseListener(new MouseAdapter() {
      @Override
      public void mouseClicked(MouseEvent e) {
        if (e.getClickCount() == 2)
        {
View Full Code Here

TOP

Related Classes of com.commander4j.gui.JList4j

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.