Package com.commander4j.gui

Examples of com.commander4j.gui.JList4j


    query.clear();
    query.addText(JUtility.substSchemaName(schemaName, "select * from {schema}APP_PALLET where 1=2"));
    query.bindParams();
    listStatement = query.getPreparedStatement();

    list_despatch = new JList4j();
    list_despatch.addListSelectionListener(new ListSelectionListener()
    {
      public void valueChanged(ListSelectionEvent e)
      {
        if (list_despatch.getModel().getSize() > 0)
        {
          if (list_despatch.getSelectedIndex() >= 0)
          {
            JDBDespatch d = (JDBDespatch) list_despatch.getSelectedValue();
            currentdespatchno = d.getDespatchNo();

            if (currentdespatchno.equals(previousdespatchno) == false)
            {
              previousdespatchno = currentdespatchno;
              textFieldDespatchLocationFrom.setText(d.getLocationIDFrom());
              textFieldDespatchLocationTo.setText(d.getLocationIDTo());
              textFieldDespatchStatus.setText(d.getStatus());

              if (d.getStatus().equals("Confirmed"))
              {
                deleteButton.setEnabled(false);
                jButtonLookupLocationTo.setEnabled(false);
                jButtonLookupLocationFrom.setEnabled(false);
                buttonSetUserID.setEnabled(false);
                jButtonLookupLoadNo.setEnabled(false);
                jButtonLookupTrailer.setEnabled(false);
                jButtonLookupHaulier.setEnabled(false);
                buttonUnAssign.setEnabled(false);
                buttonAssign.setEnabled(false);
                newButton.setEnabled(false);
              }
              else
              {
                deleteButton.setEnabled(true);
                jButtonLookupLocationFrom.setEnabled(true);
                buttonSetUserID.setEnabled(true);
                jButtonLookupLocationTo.setEnabled(true);
                jButtonLookupLoadNo.setEnabled(true);
                jButtonLookupTrailer.setEnabled(true);
                jButtonLookupHaulier.setEnabled(true);
                buttonUnAssign.setEnabled(true);
                buttonAssign.setEnabled(true);
                newButton.setEnabled(true);
              }

              try
              {
                jTextFieldDespatchDate.setText(d.getDespatchDate().toString().substring(0, 19));
              }
              catch (Exception ee)
              {
                jTextFieldDespatchDate.setText("N/A");
              }

              textFieldHaulier.setText(d.getHaulier());
              textFieldTrailer.setText(d.getTrailer());
              textFieldLoadNo.setText(d.getLoadNo());
              textFieldUserID.setText(d.getUserID());

              textFieldNoOfPallets.setText(Integer.toString(d.getTotalPallets()));
              setConfirmButtonStatus();
              setFindButtonStatus(d.getLocationIDFrom());

              populateAssignedList(d.getDespatchNo(), "");
              clearUnAssignedList();
            }
          }
          else
          {
            blankDespatchFields();
          }
        }
        else
        {
          jButtonLookupLocationFrom.setEnabled(false);
          buttonSetUserID.setEnabled(false);
          jButtonLookupLocationTo.setEnabled(false);
          jButtonLookupTrailer.setEnabled(false);
          jButtonLookupHaulier.setEnabled(false);
          buttonUnAssign.setEnabled(false);
          buttonAssign.setEnabled(false);
          populateAssignedList("", "");
        }
      }
    });
    list_despatch.setCellRenderer(Common.renderer_list);
    list_despatch.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
    scrollPane.setViewportView(list_despatch);

    final JScrollPane scrollPane_1 = new JScrollPane();
    scrollPane_1.setBounds(510, 30, 150, 345);
    desktopPane.add(scrollPane_1);

    list_unassigned = new JList4j();
    list_unassigned.setLocation(0, -3);
    list_unassigned.setCellRenderer(Common.renderer_list_unassigned);
    list_unassigned.setBackground(Common.color_list_unassigned);
    scrollPane_1.setViewportView(list_unassigned);

    final JScrollPane scrollPane_2 = new JScrollPane();
    scrollPane_2.setBounds(310, 30, 150, 345);
    desktopPane.add(scrollPane_2);

    list_assigned = new JList4j();
    list_assigned.setCellRenderer(Common.renderer_list_assigned);
    list_assigned.setBackground(Common.color_list_assigned);
    scrollPane_2.setViewportView(list_assigned);

    comboBoxPalletStatus = new JComboBox();
View Full Code Here


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

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

            }
          });
          {
            ListModel jList1Model = new DefaultComboBoxModel();

            jListData = new JList4j();
            jScrollPane1.setViewportView(jListData);
            jListData.setModel(jList1Model);
            jListData.setCellRenderer(Common.renderer_list);
            jListData.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            jListData.setFont(Common.font_list);
View Full Code Here

        jDesktopPane1.setBackground(Color.WHITE);
        getContentPane().add(jDesktopPane1, BorderLayout.CENTER);
        {
          scrollPane = new JScrollPane();
          scrollPane.setBounds(53, 447, 163, 84);
          palletStatusList = new JList4j(Common.palletStatus);
          palletStatusList.setToolTipText("Highlight multiple records by holding down the CTRL key at the same time as clicking.");
          palletStatusList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
          scrollPane.setViewportView(palletStatusList);
          jDesktopPane1.add(scrollPane);
          ListSelectionListener listSelectionListener = new ListSelectionListener() {
            public void valueChanged(ListSelectionEvent listSelectionEvent) {
              jButtonSave.setEnabled(true);
            }
          };
          palletStatusList.addListSelectionListener(listSelectionListener);
        }
        {
          scrollPane = new JScrollPane();
          scrollPane.setBounds(243, 447, 163, 84);
          batchStatusList = new JList4j(Common.batchStatus);
          batchStatusList.setToolTipText("Highlight multiple records by holding down the CTRL key at the same time as clicking.");
          batchStatusList.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
          scrollPane.setViewportView(batchStatusList);
          jDesktopPane1.add(scrollPane);
          ListSelectionListener listSelectionListener = new ListSelectionListener() {
View Full Code Here

          jDesktopPane1.add(jScrollPaneLines);
          jScrollPaneLines.setBounds(10, 25, 180, 345);
          jScrollPaneLines.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
          {
            ListModel jListLinesModel = new DefaultComboBoxModel(new String[] { "" });
            jListLines = new JList4j();
            jScrollPaneLines.setViewportView(jListLines);
            jListLines.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            jListLines.setFont(Common.font_list);
            jListLines.addListSelectionListener(new ListSelectionListener() {
              public void valueChanged(ListSelectionEvent evt) {
                int sel = jListLines.getSelectedIndex();
                if (sel > -1)
                {
                  JDBListData item = (JDBListData) jListLines.getModel().getElementAt(sel);
                  populateUnAssignedList(item);
                  populateAssignedList(item);
                  setButtonState();
                }

              }
            });
            jListLines.setModel(jListLinesModel);
          }
        }
        {
          jScrollPaneUnAssigned = new JScrollPane();
          jDesktopPane1.add(jScrollPaneUnAssigned);
          jScrollPaneUnAssigned.setBounds(427, 25, 180, 345);
          jScrollPaneUnAssigned.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
          {
            ListModel jListUnAssignedModel = new DefaultComboBoxModel(new String[] { "" });
            jListUnAssigned = new JList4j();
            jScrollPaneUnAssigned.setViewportView(jListUnAssigned);
            jListUnAssigned.setModel(jListUnAssignedModel);
            jListUnAssigned.setFont(Common.font_list);
            jListUnAssigned.setCellRenderer(Common.renderer_list_assigned);
            jListUnAssigned.setBackground(Common.color_list_unassigned);
          }
        }
        {
          jScrollPaneAssigned = new JScrollPane();
          jDesktopPane1.add(jScrollPaneAssigned);
          jScrollPaneAssigned.setBounds(202, 25, 180, 345);
          jScrollPaneAssigned.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
          {
            ListModel jListAssignedModel = new DefaultComboBoxModel(new String[] { "" });
            jListAssigned = new JList4j();
            jScrollPaneAssigned.setViewportView(jListAssigned);
            jListAssigned.setModel(jListAssignedModel);
            jListAssigned.setFont(Common.font_list);
            jListAssigned.setCellRenderer(Common.renderer_list_assigned);
            jListAssigned.setBackground(Common.color_list_assigned);
View Full Code Here

          jDesktopPane1.add(jScrollPane1);
          jScrollPane1.setBounds(10, 10, 161, 441);
          jScrollPane1.setBorder(BorderFactory.createEtchedBorder(BevelBorder.LOWERED));
          {
            ListModel jList1Model = new DefaultComboBoxModel(new String[] { "Item One", "Item Two" });
            jListGroups = new JList4j();
            jScrollPane1.setViewportView(jListGroups);
            jListGroups.addMouseListener(new MouseAdapter() {
              public void mouseClicked(MouseEvent evt) {
                if (evt.getClickCount() == 2)
                {
View Full Code Here

          desktopPane.add(jScrollPane1);
          jScrollPane1.setBounds(14, 37, 258, 395);
          {
            ListModel jListHostsModel = new DefaultComboBoxModel(new String[]
            { "Item One", "Item Two" });
            jListHosts = new JList4j();
            jScrollPane1.setViewportView(jListHosts);
            jListHosts.setModel(jListHostsModel);
            jListHosts.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            jListHosts.addListSelectionListener(new ListSelectionListener()
            {
View Full Code Here

          jScrollPane1 = new JScrollPane();
          jDesktopPane1.add(jScrollPane1);
          jScrollPane1.setBounds(0, 0, 798, 238);
          {
            ListModel jListErrorsModel = new DefaultComboBoxModel(new String[] { "Item One", "Item Two" });
            jListErrors = new JList4j();
            jScrollPane1.setViewportView(jListErrors);
            jListErrors.setModel(jListErrorsModel);
          }
        }
        {
View Full Code Here

    JScrollPane scrollPane = new JScrollPane();
    scrollPane.setBounds(30, 215, 515, 206);
    desktopPane.add(scrollPane);

    listActivities = new JList4j();
    listActivities.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);

    listActivities.addListSelectionListener(new ListSelectionListener()
    {
      public void valueChanged(ListSelectionEvent arg0)
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.