Examples of JDateControl


Examples of com.commander4j.util.JDateControl

      textField4j_WorkstationID.setEnabled(false);
      textField4j_WorkstationID.setBounds(448, 227, 208, 21);
      textField4j_WorkstationID.setText(labdat.getWorkstationID());
      jDesktopPane1.add(textField4j_WorkstationID);

      JDateControl dateControl_DateofManufacture = new JDateControl();
      dateControl_DateofManufacture.setFont(new Font("Arial", Font.PLAIN, 11));
      dateControl_DateofManufacture.setEnabled(false);
      dateControl_DateofManufacture.setBounds(154, 98, 128, 25);
      dateControl_DateofManufacture.setDate(labdat.getDateofManufacture());
      jDesktopPane1.add(dateControl_DateofManufacture);

      JDateControl dateControl_ExpiryDate = new JDateControl();
      dateControl_ExpiryDate.setFont(new Font("Arial", Font.PLAIN, 11));
      dateControl_ExpiryDate.setEnabled(false);
      dateControl_ExpiryDate.setBounds(448, 98, 128, 25);
      dateControl_ExpiryDate.setDate(labdat.getExpirtDate());
      jDesktopPane1.add(dateControl_ExpiryDate);

      JTextField4j textField4j_Description = new JTextField4j();
      textField4j_Description.setEnabled(false);
      textField4j_Description.setBounds(305, 38, 351, 21);
View Full Code Here

Examples of com.commander4j.util.JDateControl

          jLabel7.setText(lang.get("lbl_Process_Order_Due_Date"));
          jLabel7.setHorizontalAlignment(SwingConstants.TRAILING);
          jLabel7.setBounds(12, 229, 144, 21);
        }
        {
          jSpinnerDueDate = new JDateControl();
          jDesktopPane1.add(jSpinnerDueDate);
          jSpinnerDueDate.setBounds(163, 225, 125, 25);
          jSpinnerDueDate.getEditor().setPreferredSize(new java.awt.Dimension(86, 32));
          jSpinnerDueDate.getEditor().addKeyListener(new KeyAdapter() {
            public void keyPressed(KeyEvent e) {
View Full Code Here

Examples of com.commander4j.util.JDateControl

          lblSampleDate.setBounds(7, 40, 133, 21);
          jDesktopPane1.add(lblSampleDate);
        }
       
        {
          sampleDate = new JDateControl();
          jDesktopPane1.add(sampleDate);
          sampleDate.setBounds(147, 36, 125, 25);
          sampleDate.getEditor().setPreferredSize(new java.awt.Dimension(87, 19));
          sampleDate.getEditor().setSize(87, 21);
        }
View Full Code Here

Examples of com.commander4j.util.JDateControl

      jLabelOrderStatus = new JLabel4j_std();
      jPanelProcessOrder.add(jLabelOrderStatus);
      jLabelOrderStatus.setText(lang.get("lbl_Process_Order_Status"));
      jLabelOrderStatus.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelOrderStatus.setBounds(290, 49, 152, 21);
      jSpinnerDueDate = new JDateControl();
      jPanelProcessOrder.add(jSpinnerDueDate);
      jSpinnerDueDate.setEnabled(false);
      jSpinnerDueDate.setBounds(161, 49, 137, 21);
      jSpinnerDueDate.getEditor().setOpaque(true);
      jSpinnerDueDate.setForeground(new java.awt.Color(238, 238, 238));
      jLabelDueDate = new JLabel4j_std();
      jPanelProcessOrder.add(jLabelDueDate);
      jLabelDueDate.setText(lang.get("lbl_Process_Order_Due_Date"));
      jLabelDueDate.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelDueDate.setBounds(12, 49, 142, 21);
      jTextFieldProcessOrderStatus = new JTextField4j();
      jPanelProcessOrder.add(jTextFieldProcessOrderStatus);
      jTextFieldProcessOrderStatus.setBounds(449, 49, 126, 21);
      jTextFieldProcessOrderStatus.setEditable(false);
      jTextFieldProcessOrderStatus.setEnabled(false);
      jTextFieldRecipe = new JTextField4j();
      jPanelProcessOrder.add(jTextFieldRecipe);
      jTextFieldRecipe.setBounds(161, 77, 139, 21);
      jTextFieldRecipe.setEditable(false);
      jTextFieldRecipe.setEnabled(false);
      jLabelRecipe = new JLabel4j_std();
      jPanelProcessOrder.add(jLabelRecipe);
      jLabelRecipe.setText(lang.get("lbl_Process_Order_Recipe"));
      jLabelRecipe.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelRecipe.setBounds(12, 77, 142, 21);
      jTextFieldLocation = new JTextField4j();
      jPanelProcessOrder.add(jTextFieldLocation);
      jTextFieldLocation.setBounds(449, 77, 126, 21);
      jTextFieldLocation.setEditable(false);
      jTextFieldLocation.setEnabled(false);
      jLabelLocation = new JLabel4j_std();
      jPanelProcessOrder.add(jLabelLocation);
      jLabelLocation.setText(lang.get("lbl_Location_ID"));
      jLabelLocation.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelLocation.setBounds(290, 77, 152, 21);
      jButtonPOLookup = new JButton4j(Common.icon_lookup);
      jPanelProcessOrder.add(jButtonPOLookup);
      jButtonPOLookup.setBounds(280, 21, 20, 20);
      jButtonPOLookup.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt)
        {
          JLaunchLookup.dlgCriteriaDefault = "Ready";
          JLaunchLookup.dlgAutoExec = true;

          if (JLaunchLookup.processOrders())
          {
            String po = JLaunchLookup.dlgResult;
            processOrderChanged(po);
          }
        }
      });
      jPanelMaterial = new JPanel();
      jDesktopPane1.add(jPanelMaterial);
      jPanelMaterial.setBounds(7, 119, 748, 112);
      jPanelMaterial.setBorder(BorderFactory.createTitledBorder(lang.get("lbl_Material")));
      jPanelMaterial.setLayout(null);
      jPanelMaterial.setFont(Common.font_title);
      jPanelMaterial.setBackground(Common.color_app_window);
      jTextFieldMaterial = new JTextField4j();
      jPanelMaterial.add(jTextFieldMaterial);
      jTextFieldMaterial.setBounds(161, 21, 128, 21);
      jTextFieldMaterial.setEditable(false);
      jTextFieldMaterial.setEnabled(false);

      jLabelMaterial = new JLabel4j_std();
      jPanelMaterial.add(jLabelMaterial);
      jLabelMaterial.setText(lang.get("lbl_Material"));
      jLabelMaterial.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelMaterial.setBounds(12, 21, 142, 21);
      jTextFieldMaterialDescription = new JTextField4j();
      jPanelMaterial.add(jTextFieldMaterialDescription);
      jTextFieldMaterialDescription.setBounds(449, 21, 287, 21);
      jTextFieldMaterialDescription.setEditable(false);
      jTextFieldMaterialDescription.setEnabled(false);
      jLabelDescription = new JLabel4j_std();
      jPanelMaterial.add(jLabelDescription);
      jLabelDescription.setText(lang.get("lbl_Description"));
      jLabelDescription.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelDescription.setBounds(291, 21, 151, 21);
      jSpinnerShelfLife = new JSpinner();
      jPanelMaterial.add(jSpinnerShelfLife);
      jSpinnerShelfLife.setModel(shelflifenumbermodel);
      JSpinner.NumberEditor nec = new JSpinner.NumberEditor(jSpinnerShelfLife);
      nec.getTextField().setFont(Common.font_std);
      jSpinnerShelfLife.setEditor(nec);
      jSpinnerShelfLife.setBounds(161, 49, 63, 21);
      jSpinnerShelfLife.setEnabled(false);
      jTextFieldShelfLifeRoundingRule = new JTextField4j();
      jPanelMaterial.add(jTextFieldShelfLifeRoundingRule);
      jTextFieldShelfLifeRoundingRule.setBounds(638, 49, 98, 21);
      jTextFieldShelfLifeRoundingRule.setEditable(false);
      jTextFieldShelfLifeRoundingRule.setEnabled(false);
      jLabelRounding = new JLabel4j_std();
      jPanelMaterial.add(jLabelRounding);
      jLabelRounding.setText(lang.get("lbl_Material_Shelf_Life_Rounding_Rule"));
      jLabelRounding.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelRounding.setBounds(546, 49, 85, 21);
      jTextFieldShelfLifeUOM = new JTextField4j();
      jPanelMaterial.add(jTextFieldShelfLifeUOM);
      jTextFieldShelfLifeUOM.setBounds(449, 49, 91, 21);
      jTextFieldShelfLifeUOM.setEditable(false);
      jTextFieldShelfLifeUOM.setEnabled(false);
      jLabel1ShelfLifeUOM = new JLabel4j_std();
      jPanelMaterial.add(jLabel1ShelfLifeUOM);
      jLabel1ShelfLifeUOM.setText(lang.get("lbl_Material_Shelf_Life_UOM"));
      jLabel1ShelfLifeUOM.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabel1ShelfLifeUOM.setBounds(281, 49, 161, 21);
      jLabelShelfLife = new JLabel4j_std();
      jPanelMaterial.add(jLabelShelfLife);
      jLabelShelfLife.setText(lang.get("lbl_Material_Shelf_Life"));
      jLabelShelfLife.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelShelfLife.setBounds(12, 49, 142, 21);
      jTextFieldLegacyCode = new JTextField4j();
      jPanelMaterial.add(jTextFieldLegacyCode);
      jTextFieldLegacyCode.setBounds(161, 77, 128, 21);
      jTextFieldLegacyCode.setEditable(false);
      jTextFieldLegacyCode.setEnabled(false);
      jLabelLegacyCode = new JLabel4j_std();
      jPanelMaterial.add(jLabelLegacyCode);
      jLabelLegacyCode.setText(lang.get("lbl_Material_Legacy_Code"));
      jLabelLegacyCode.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelLegacyCode.setBounds(12, 77, 142, 21);
      jLabelEAN = new JLabel4j_std();
      jPanelMaterial.add(jLabelEAN);
      jLabelEAN.setText(lang.get("lbl_Material_UOM_EAN"));
      jLabelEAN.setHorizontalAlignment(SwingConstants.RIGHT);
      jLabelEAN.setHorizontalTextPosition(SwingConstants.RIGHT);
      jLabelEAN.setBounds(291, 77, 151, 21);
      jTextFieldEAN = new JTextField4j();
      jPanelMaterial.add(jTextFieldEAN);
      jTextFieldEAN.setBounds(449, 77, 126, 21);
      jTextFieldEAN.setFocusCycleRoot(true);
      jTextFieldEAN.setEditable(false);
      jTextFieldEAN.setEnabled(false);
      jLabelVariant = new JLabel4j_std();
      jPanelMaterial.add(jLabelVariant);
      jLabelVariant.setText(lang.get("lbl_Material_UOM_Variant"));
      jLabelVariant.setHorizontalAlignment(SwingConstants.RIGHT);
      jLabelVariant.setHorizontalTextPosition(SwingConstants.RIGHT);
      jLabelVariant.setBounds(579, 77, 110, 21);
      jTextFieldVariant = new JTextField4j();
      jPanelMaterial.add(jTextFieldVariant);
      jTextFieldVariant.setBounds(701, 77, 35, 21);
      jTextFieldVariant.setFocusCycleRoot(true);
      jTextFieldVariant.setEditable(false);
      jTextFieldVariant.setEnabled(false);
      jPanelPallet = new JPanel();
      jDesktopPane1.add(jPanelPallet);
      jPanelPallet.setBounds(7, 231, 748, 84);
      jPanelPallet.setBorder(BorderFactory.createTitledBorder(null, lang.get("lbl_Pallet"), TitledBorder.LEADING, TitledBorder.TOP));
      jPanelPallet.setLayout(null);
      jPanelPallet.setFont(Common.font_std);
      jPanelPallet.setBackground(Common.color_app_window);
      jLabelQuantity = new JLabel4j_std();
      jPanelPallet.add(jLabelQuantity);
      jLabelQuantity.setText(lang.get("lbl_Pallet_Quantity"));
      jLabelQuantity.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelQuantity.setBounds(323, 21, 119, 21);
      comboBoxPrintQueue = new JComboBox4j<String>();
      comboBoxPrintQueue.setBounds(116, 455, 621, 23);
      jDesktopPane1.add(comboBoxPrintQueue);

      {
        jTextFieldSSCC = new JTextField4j();
        jPanelPallet.add(jTextFieldSSCC);
        AbstractDocument doc = (AbstractDocument) jTextFieldSSCC.getDocument();
        doc.setDocumentFilter(new JFixedSizeFilter(JDBPallet.field_sscc));
        jTextFieldSSCC.setBounds(161, 18, 128, 21);
        jTextFieldSSCC.setEnabled(false);
        jTextFieldSSCC.addKeyListener(new KeyAdapter() {
          public void keyReleased(KeyEvent evt)
          {
            checkSSCC();
          }
        });
      }

      jSpinnerProductionDate = new JDateControl();
      jPanelPallet.add(jSpinnerProductionDate);
      jSpinnerProductionDate.setFont(new java.awt.Font("Dialog", 0, 12));
      jSpinnerProductionDate.setBounds(161, 45, 136, 21);
      jSpinnerProductionDate.getEditor().addKeyListener(new KeyAdapter() {
        public void keyPressed(KeyEvent e)
        {
          calcBBEBatch();
        }
      });
      jSpinnerProductionDate.addChangeListener(new ChangeListener() {
        public void stateChanged(final ChangeEvent e)
        {
          calcBBEBatch();
        }
      });

      try
      {
        jSpinnerProductionDate.setDate(JUtility.getSQLDate());
        jSpinnerProductionDate.setEnabled(false);
      } catch (Exception e)
      {
      }

      jLabelProductionDate = new JLabel4j_std();
      jPanelPallet.add(jLabelProductionDate);
      jLabelProductionDate.setText(lang.get("lbl_Pallet_DOM"));
      jLabelProductionDate.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelProductionDate.setBounds(12, 46, 122, 21);
      jFormattedTextFieldProdQuantity = new JQuantityInput(new BigDecimal("0"));
      jFormattedTextFieldProdQuantity.addPropertyChangeListener(new PropertyChangeListener() {
        public void propertyChange(PropertyChangeEvent arg0)
        {
          Color background = Color.WHITE;

          try
          {
            if (jTextFieldProcessOrder.getText().equals("") == false)
            {
              BigDecimal newval = new BigDecimal(jFormattedTextFieldProdQuantity.getValue().toString());
              int res = newval.compareTo(new BigDecimal(0));
              if (res == 0)
              {
                background = Color.YELLOW;
              }
            }
          } catch (Exception e)
          {
            background = Color.YELLOW;
          }
          jFormattedTextFieldProdQuantity.setBackground(background);
        }
      });
      jPanelPallet.add(jFormattedTextFieldProdQuantity);
      jFormattedTextFieldProdQuantity.setFont(Common.font_std);
      jFormattedTextFieldProdQuantity.setBounds(449, 21, 91, 21);
      jFormattedTextFieldProdQuantity.setValue(0);
      jFormattedTextFieldProdQuantity.setEnabled(false);
      jFormattedTextFieldProdQuantity.setHorizontalAlignment(SwingConstants.TRAILING);
      jFormattedTextFieldProdQuantity.addKeyListener(new KeyAdapter() {
        public void keyReleased(KeyEvent evt)
        {
          pallet.setUom(jTextFieldProductionUom.getText());
          pallet.setQuantity(JUtility.stringToBigDecimal(jFormattedTextFieldProdQuantity.getText().toString()));
          jFormattedTextFieldBaseQuantity.setText(pallet.getBaseQuantityAsString());
        }
      });
      jLabelSSCC = new JLabel4j_std();
      jPanelPallet.add(jLabelSSCC);
      jLabelSSCC.setText(lang.get("lbl_Pallet_SSCC"));
      jLabelSSCC.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelSSCC.setBounds(12, 18, 122, 21);
      jTextFieldProductionUom = new JTextField4j();
      jPanelPallet.add(jTextFieldProductionUom);
      jTextFieldProductionUom.setBounds(666, 21, 70, 21);
      jTextFieldProductionUom.setEditable(false);
      jTextFieldProductionUom.setEnabled(false);
      jLabelProductionEAN = new JLabel4j_std();
      jPanelPallet.add(jLabelProductionEAN);
      jLabelProductionEAN.setText(lang.get("lbl_Pallet_UOM"));
      jLabelProductionEAN.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelProductionEAN.setBounds(546, 21, 113, 21);
      jLabel2 = new JLabel4j_std();
      jPanelPallet.add(jLabel2);
      jLabel2.setText(lang.get("lbl_Pallet_Base_Quantity"));
      jLabel2.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabel2.setBounds(323, 49, 119, 21);
      jLabel3 = new JLabel4j_std();
      jPanelPallet.add(jLabel3);
      jLabel3.setText(lang.get("lbl_Pallet_Base_UOM"));
      jLabel3.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabel3.setBounds(546, 49, 113, 21);
      jTextFieldBaseUOM = new JTextField4j();
      jPanelPallet.add(jTextFieldBaseUOM);
      jTextFieldBaseUOM.setEditable(false);
      jTextFieldBaseUOM.setEnabled(false);
      jTextFieldBaseUOM.setBounds(666, 49, 70, 21);
      jFormattedTextFieldBaseQuantity = new JQuantityInput(new BigDecimal("0"));
      jPanelPallet.add(jFormattedTextFieldBaseQuantity);
      jFormattedTextFieldBaseQuantity.setFont(Common.font_std);
      jFormattedTextFieldBaseQuantity.setHorizontalAlignment(SwingConstants.TRAILING);
      jFormattedTextFieldBaseQuantity.setText("0.000");
      jFormattedTextFieldBaseQuantity.setEnabled(false);
      jFormattedTextFieldBaseQuantity.setBounds(449, 49, 91, 21);
      jCheckBoxProductionDate = new JCheckBox4j();
      jPanelPallet.add(jCheckBoxProductionDate);
      jCheckBoxProductionDate.setBackground(new java.awt.Color(255, 255, 255));
      jCheckBoxProductionDate.setBounds(139, 45, 21, 21);
      jCheckBoxProductionDate.setEnabled(false);
      jCheckBoxProductionDate.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent evt)
        {
          enableField(jSpinnerProductionDate, jCheckBoxProductionDate.isSelected());
          enableField(calendarButtonjSpinnerProductionDate, jCheckBoxProductionDate.isSelected());
        }
      });
      jCheckBoxAutoSSCC = new JCheckBox4j();
      jCheckBoxAutoSSCC.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e)
        {
          checkSSCC();
        }
      });
      jCheckBoxAutoSSCC.setSelected(true);
      jCheckBoxAutoSSCC.setToolTipText("Auto SSCC");
      jCheckBoxAutoSSCC.setBackground(new Color(255, 255, 255));
      jCheckBoxAutoSSCC.setBounds(139, 18, 21, 21);
      jPanelPallet.add(jCheckBoxAutoSSCC);

      calendarButtonjSpinnerProductionDate = new JCalendarButton(jSpinnerProductionDate);
      calendarButtonjSpinnerProductionDate.setEnabled(false);
      calendarButtonjSpinnerProductionDate.setBounds(290, 47, 21, 21);
      jPanelPallet.add(calendarButtonjSpinnerProductionDate);
      jPanelBatch = new JPanel();
      jDesktopPane1.add(jPanelBatch);
      jPanelBatch.setBounds(7, 315, 748, 56);
      jPanelBatch.setLayout(null);
      jPanelBatch.setFont(Common.font_std);
      jPanelBatch.setBorder(BorderFactory.createTitledBorder(lang.get("lbl_Material_Batch")));
      jPanelBatch.setBackground(Common.color_app_window);
      jLabelBatch = new JLabel4j_std();
      jPanelBatch.add(jLabelBatch);
      jLabelBatch.setText(lang.get("lbl_Material_Batch"));
      jLabelBatch.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelBatch.setBounds(320, 21, 96, 21);

      jTextFieldBatch = new JTextField4j();
      jPanelBatch.add(jTextFieldBatch);
      AbstractDocument doc = (AbstractDocument) jTextFieldBatch.getDocument();
      doc.setDocumentFilter(new JFixedSizeFilter(JDBMaterialBatch.field_batch_number));
      jTextFieldBatch.setBounds(449, 21, 108, 21);
      jTextFieldBatch.setEnabled(false);

      jSpinnerExpiryDate = new JDateControl();
      jSpinnerExpiryDate.addFocusListener(new FocusAdapter() {
        @Override
        public void focusLost(FocusEvent arg0)
        {
          jSpinnerExpiryDate.setDate(material.getRoundedExpiryDate(jSpinnerExpiryDate.getDate()));
View Full Code Here

Examples of com.commander4j.util.JDateControl

    JLabel4j_std lblStart = new JLabel4j_std(lang.get("web_From"));
    lblStart.setBounds(11, 12, 145, 15);
    panelDateParams.add(lblStart);

    domDateFrom = new JDateControl();
    domDateFrom.setBounds(6, 27, 128, 25);
    panelDateParams.add(domDateFrom);
    domDateFrom.setFont(Common.font_std);

    button_CalendardomDateFrom = new JCalendarButton(domDateFrom);
    button_CalendardomDateFrom.setSize(21, 21);
    button_CalendardomDateFrom.setLocation(510, 314);
    button_CalendardomDateFrom.setBounds(135, 31, 21, 21);
    panelDateParams.add(button_CalendardomDateFrom);

    JLabel4j_std label4jEnd = new JLabel4j_std(lang.get("web_To"));
    label4jEnd.setBounds(11, 67, 149, 15);
    panelDateParams.add(label4jEnd);

    domDateTo = new JDateControl();
    domDateTo.setBounds(6, 82, 128, 25);
    panelDateParams.add(domDateTo);
    domDateTo.setFont(Common.font_std);

    button_CalendardomDateTo = new JCalendarButton(domDateTo);
View Full Code Here

Examples of com.commander4j.util.JDateControl

    textFieldResource.setEditable(false);
    textFieldResource.setColumns(10);
    textFieldResource.setBounds(411, 69, 134, 22);
    desktopPane.add(textFieldResource);

    dueDate = new JDateControl();
    dueDate.setEnabled(false);
    dueDate.setBounds(411, 103, 134, 28);
    dueDate.getEditor().setPreferredSize(new java.awt.Dimension(87, 19));
    dueDate.getEditor().setSize(87, 21);
    desktopPane.add(dueDate);

    JLabel4j_std lblDueDate = new JLabel4j_std(lang.get("lbl_Process_Order_Due_Date"));
    lblDueDate.setHorizontalAlignment(SwingConstants.TRAILING);
    lblDueDate.setBounds(261, 105, 138, 16);
    desktopPane.add(lblDueDate);

    lblUserData1 = new JLabel4j_std(lang.get("lbl_User_Data1"));
    lblUserData1.setHorizontalAlignment(SwingConstants.TRAILING);
    lblUserData1.setBounds(6, 167, 111, 16);
    desktopPane.add(lblUserData1);

    lblUserData2 = new JLabel4j_std(lang.get("lbl_User_Data2"));
    lblUserData2.setHorizontalAlignment(SwingConstants.TRAILING);
    lblUserData2.setBounds(288, 167, 111, 16);
    desktopPane.add(lblUserData2);

    DocumentFilter filter = new UppercaseDocumentFilter();
    textFieldUserData1 = new JTextField4j();
    textFieldUserData1.addKeyListener(new KeyAdapter()
    {

      @Override
      public void keyReleased(KeyEvent e)
      {
        printEnable();
      }
    });

    ((AbstractDocument) textFieldUserData1.getDocument()).setDocumentFilter(filter);
    textFieldUserData1.setColumns(20);
    textFieldUserData1.setBounds(125, 162, 134, 22);
    desktopPane.add(textFieldUserData1);

    textFieldUserData2 = new JTextField4j();
    textFieldUserData2.addKeyListener(new KeyAdapter()
    {
      @Override
      public void keyReleased(KeyEvent e)
      {
        printEnable();
      }
    });

    ((AbstractDocument) textFieldUserData2.getDocument()).setDocumentFilter(filter);
    textFieldUserData2.setColumns(20);
    textFieldUserData2.setBounds(411, 162, 134, 22);
    desktopPane.add(textFieldUserData2);

    lblStatusBar = new JLabel4j_std();
    lblStatusBar.setForeground(Color.RED);
    lblStatusBar.setBackground(Color.GRAY);
    lblStatusBar.setBounds(0, 568, 575, 21);
    desktopPane.add(lblStatusBar);

    sampleDateTime = new JDateControl();
    sampleDateTime.setEnabled(false);
    sampleDateTime.setBounds(417, 8, 128, 25);
    desktopPane.add(sampleDateTime);

    chckbxAutoTime = new JCheckBox("");
View Full Code Here

Examples of com.commander4j.util.JDateControl

      jLabelOrderStatus = new JLabel4j_std();
      jPanelProcessOrder.add(jLabelOrderStatus);
      jLabelOrderStatus.setText(lang.get("lbl_Process_Order_Status"));
      jLabelOrderStatus.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelOrderStatus.setBounds(290, 49, 152, 21);
      jSpinnerDueDate = new JDateControl();
      jPanelProcessOrder.add(jSpinnerDueDate);
      jSpinnerDueDate.setEnabled(false);
      jSpinnerDueDate.setBounds(161, 49, 137, 21);
      jSpinnerDueDate.getEditor().setOpaque(true);
      jSpinnerDueDate.setForeground(new java.awt.Color(238, 238, 238));
      jLabelDueDate = new JLabel4j_std();
      jPanelProcessOrder.add(jLabelDueDate);
      jLabelDueDate.setText(lang.get("lbl_Process_Order_Due_Date"));
      jLabelDueDate.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelDueDate.setBounds(12, 49, 142, 21);
      jTextFieldProcessOrderStatus = new JTextField4j();
      jPanelProcessOrder.add(jTextFieldProcessOrderStatus);
      jTextFieldProcessOrderStatus.setBounds(449, 49, 126, 21);
      jTextFieldProcessOrderStatus.setEditable(false);
      jTextFieldProcessOrderStatus.setEnabled(false);
      jTextFieldRecipe = new JTextField4j();
      jPanelProcessOrder.add(jTextFieldRecipe);
      jTextFieldRecipe.setBounds(161, 77, 139, 21);
      jTextFieldRecipe.setEditable(false);
      jTextFieldRecipe.setEnabled(false);
      jLabelRecipe = new JLabel4j_std();
      jPanelProcessOrder.add(jLabelRecipe);
      jLabelRecipe.setText(lang.get("lbl_Process_Order_Recipe"));
      jLabelRecipe.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelRecipe.setBounds(12, 77, 142, 21);
      jTextFieldLocation = new JTextField4j();
      jPanelProcessOrder.add(jTextFieldLocation);
      jTextFieldLocation.setBounds(449, 77, 126, 21);
      jTextFieldLocation.setEditable(false);
      jTextFieldLocation.setEnabled(false);
      jLabelLocation = new JLabel4j_std();
      jPanelProcessOrder.add(jLabelLocation);
      jLabelLocation.setText(lang.get("lbl_Location_ID"));
      jLabelLocation.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelLocation.setBounds(290, 77, 152, 21);
      jButtonPOLookup = new JButton4j(Common.icon_lookup);
      jPanelProcessOrder.add(jButtonPOLookup);
      jButtonPOLookup.setBounds(280, 21, 20, 20);
      jButtonPOLookup.addActionListener(new ActionListener()
      {
        public void actionPerformed(ActionEvent evt)
        {
          JLaunchLookup.dlgCriteriaDefault = "Ready";
          JLaunchLookup.dlgAutoExec = true;

          if (JLaunchLookup.processOrders())
          {
            String po = JLaunchLookup.dlgResult;
            processOrderChanged(po);
          }
        }
      });

      jPanelMaterial = new JPanel();
      jPanelMaterial.setBackground(Common.color_app_window);
      jDesktopPane1.add(jPanelMaterial);
      jPanelMaterial.setBounds(7, 119, 748, 112);
      jPanelMaterial.setBorder(BorderFactory.createTitledBorder(lang.get("lbl_Material")));
      jPanelMaterial.setLayout(null);
      jPanelMaterial.setFont(Common.font_title);
      jTextFieldMaterial = new JTextField4j();
      jPanelMaterial.add(jTextFieldMaterial);
      jTextFieldMaterial.setBounds(161, 21, 128, 21);
      jTextFieldMaterial.setEditable(false);
      jTextFieldMaterial.setEnabled(false);
      jLabelMaterial = new JLabel4j_std();
      jPanelMaterial.add(jLabelMaterial);
      jLabelMaterial.setText(lang.get("lbl_Material"));
      jLabelMaterial.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelMaterial.setBounds(12, 21, 142, 21);
      jTextFieldMaterialDescription = new JTextField4j();
      jPanelMaterial.add(jTextFieldMaterialDescription);
      jTextFieldMaterialDescription.setBounds(449, 21, 287, 21);
      jTextFieldMaterialDescription.setEditable(false);
      jTextFieldMaterialDescription.setEnabled(false);
      jLabelDescription = new JLabel4j_std();
      jPanelMaterial.add(jLabelDescription);
      jLabelDescription.setText(lang.get("lbl_Description"));
      jLabelDescription.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelDescription.setBounds(291, 21, 151, 21);
      jSpinnerShelfLife = new JSpinner();
      jPanelMaterial.add(jSpinnerShelfLife);
      jSpinnerShelfLife.setModel(shelflifenumbermodel);
      JSpinner.NumberEditor nec = new JSpinner.NumberEditor(jSpinnerShelfLife);
      nec.getTextField().setFont(Common.font_std);
      jSpinnerShelfLife.setEditor(nec);
      jSpinnerShelfLife.setBounds(161, 49, 63, 21);
      jSpinnerShelfLife.setEnabled(false);
      jTextFieldShelfLifeRoundingRule = new JTextField4j();
      jPanelMaterial.add(jTextFieldShelfLifeRoundingRule);
      jTextFieldShelfLifeRoundingRule.setBounds(638, 49, 98, 21);
      jTextFieldShelfLifeRoundingRule.setEditable(false);
      jTextFieldShelfLifeRoundingRule.setEnabled(false);
      jLabelRounding = new JLabel4j_std();
      jPanelMaterial.add(jLabelRounding);
      jLabelRounding.setText(lang.get("lbl_Material_Shelf_Life_Rounding_Rule"));
      jLabelRounding.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelRounding.setBounds(546, 49, 85, 21);
      jTextFieldShelfLifeUOM = new JTextField4j();
      jPanelMaterial.add(jTextFieldShelfLifeUOM);
      jTextFieldShelfLifeUOM.setBounds(449, 49, 91, 21);
      jTextFieldShelfLifeUOM.setEditable(false);
      jTextFieldShelfLifeUOM.setEnabled(false);
      jLabel1ShelfLifeUOM = new JLabel4j_std();
      jPanelMaterial.add(jLabel1ShelfLifeUOM);
      jLabel1ShelfLifeUOM.setText(lang.get("lbl_Material_Shelf_Life_UOM"));
      jLabel1ShelfLifeUOM.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabel1ShelfLifeUOM.setBounds(281, 49, 161, 21);
      jLabelShelfLife = new JLabel4j_std();
      jPanelMaterial.add(jLabelShelfLife);
      jLabelShelfLife.setText(lang.get("lbl_Material_Shelf_Life"));
      jLabelShelfLife.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelShelfLife.setBounds(12, 49, 142, 21);
      jTextFieldLegacyCode = new JTextField4j();
      jPanelMaterial.add(jTextFieldLegacyCode);
      jTextFieldLegacyCode.setBounds(161, 77, 128, 21);
      jTextFieldLegacyCode.setEditable(false);
      jTextFieldLegacyCode.setEnabled(false);
      jLabelLegacyCode = new JLabel4j_std();
      jPanelMaterial.add(jLabelLegacyCode);
      jLabelLegacyCode.setText(lang.get("lbl_Material_Legacy_Code"));
      jLabelLegacyCode.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelLegacyCode.setBounds(12, 77, 142, 21);
      jPanelLabel = new JPanel();
      jDesktopPane1.add(jPanelLabel);
      jPanelLabel.setBounds(7, 231, 748, 136);
      jPanelLabel.setBorder(BorderFactory.createTitledBorder(null, lang.get("btn_Label"), TitledBorder.LEADING, TitledBorder.TOP));
      jPanelLabel.setLayout(null);
      jPanelLabel.setFont(Common.font_std);
      jPanelLabel.setBackground(Common.color_app_window);
      comboBoxPrintQueue = new JComboBox4j<String>();
      comboBoxPrintQueue.setBounds(115, 436, 621, 23);
      jDesktopPane1.add(comboBoxPrintQueue);
      jSpinnerProductionDate = new JDateControl();
      jPanelLabel.add(jSpinnerProductionDate);
      jSpinnerProductionDate.setFont(new java.awt.Font("Dialog", 0, 12));
      jSpinnerProductionDate.setBounds(176, 21, 136, 21);
      jSpinnerProductionDate.getEditor().addKeyListener(new KeyAdapter()
      {
        public void keyPressed(KeyEvent e)
        {
          calcBBEBatch();
        }
      });

      jSpinnerProductionDate.addChangeListener(new ChangeListener()
      {
        public void stateChanged(final ChangeEvent e)
        {
          calcBBEBatch();
        }
      });

      try
      {
        jSpinnerProductionDate.setDate(JUtility.getSQLDate());
        jSpinnerProductionDate.setEnabled(false);
      } catch (Exception e)
      {
      }

      jLabelProductionDate = new JLabel4j_std();
      jPanelLabel.add(jLabelProductionDate);
      jLabelProductionDate.setText(lang.get("lbl_Pallet_DOM"));
      jLabelProductionDate.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelProductionDate.setBounds(46, 21, 108, 21);

      jFormattedTextFieldBaseUOMQuantity = new JQuantityInput(new BigDecimal("0"));
      jFormattedTextFieldBaseUOMQuantity.setEditable(false);
      jPanelLabel.add(jFormattedTextFieldBaseUOMQuantity);
      jFormattedTextFieldBaseUOMQuantity.setFont(Common.font_std);
      jFormattedTextFieldBaseUOMQuantity.setBounds(349, 85, 94, 21);
      jFormattedTextFieldBaseUOMQuantity.setValue(0);
      jFormattedTextFieldBaseUOMQuantity.setEnabled(false);
      jFormattedTextFieldBaseUOMQuantity.setHorizontalAlignment(SwingConstants.TRAILING);

      jFormattedTextFieldRequiredUOMQuantity = new JQuantityInput(new BigDecimal("0"));
      jFormattedTextFieldRequiredUOMQuantity.setEditable(false);
      jFormattedTextFieldRequiredUOMQuantity.addPropertyChangeListener(new PropertyChangeListener()
      {
        public void propertyChange(PropertyChangeEvent arg0)
        {
          Color background = Color.WHITE;

          try
          {
            if (jTextFieldProcessOrder.getText().equals("") == false)
            {
              BigDecimal newval = new BigDecimal(jFormattedTextFieldRequiredUOMQuantity.getValue().toString());
              int res = newval.compareTo(new BigDecimal(0));
              if (res == 0)
              {
                background = Color.YELLOW;
              }
            }
          } catch (Exception e)
          {
            background = Color.YELLOW;
          }
          jFormattedTextFieldRequiredUOMQuantity.setBackground(background);
        }
      });

      jPanelLabel.add(jFormattedTextFieldRequiredUOMQuantity);
      jFormattedTextFieldRequiredUOMQuantity.setFont(Common.font_std);
      jFormattedTextFieldRequiredUOMQuantity.setBounds(349, 52, 94, 21);
      jFormattedTextFieldRequiredUOMQuantity.setValue(0);
      jFormattedTextFieldRequiredUOMQuantity.setEnabled(false);
      jFormattedTextFieldRequiredUOMQuantity.setHorizontalAlignment(SwingConstants.TRAILING);
      jFormattedTextFieldRequiredUOMQuantity.addKeyListener(new KeyAdapter()
      {
        public void keyReleased(KeyEvent evt)
        {
          pallet.setUom(jTextFieldRequiredUom.getText());
          pallet.setQuantity(JUtility.stringToBigDecimal(jFormattedTextFieldRequiredUOMQuantity.getText().toString()));
        }
      });

      jTextFieldRequiredUom = new JTextField4j();
      jTextFieldRequiredUom.setHorizontalAlignment(SwingConstants.CENTER);
      jPanelLabel.add(jTextFieldRequiredUom);
      jTextFieldRequiredUom.setBounds(462, 85, 56, 21);
      jTextFieldRequiredUom.setEditable(false);
      jTextFieldRequiredUom.setEnabled(false);

      jTextFieldBaseUom = new JTextField4j();
      jTextFieldBaseUom.setHorizontalAlignment(SwingConstants.CENTER);
      jPanelLabel.add(jTextFieldBaseUom);
      jTextFieldBaseUom.setBounds(462, 52, 56, 21);
      jTextFieldBaseUom.setEditable(false);
      jTextFieldBaseUom.setEnabled(false);

      jCheckBoxDOMOverride = new JCheckBox4j();
      jPanelLabel.add(jCheckBoxDOMOverride);
      jCheckBoxDOMOverride.setBackground(new java.awt.Color(255, 255, 255));
      jCheckBoxDOMOverride.setBounds(153, 21, 21, 21);
      jCheckBoxDOMOverride.setEnabled(false);
      jCheckBoxDOMOverride.addActionListener(new ActionListener()
      {
        public void actionPerformed(ActionEvent evt)
        {
          enableField(jSpinnerProductionDate, jCheckBoxDOMOverride.isSelected());
          enableField(calendarButtonjSpinnerProductionDate, jCheckBoxDOMOverride.isSelected());
        }
      });

      calendarButtonjSpinnerProductionDate = new JCalendarButton(jSpinnerProductionDate);
      calendarButtonjSpinnerProductionDate.setEnabled(false);
      calendarButtonjSpinnerProductionDate.setBounds(308, 21, 21, 21);
      jPanelLabel.add(calendarButtonjSpinnerProductionDate);
      jLabelBatch = new JLabel4j_std();
      jPanelLabel.add(jLabelBatch);
      jLabelBatch.setText(lang.get("lbl_Material_Batch"));
      jLabelBatch.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelBatch.setBounds(46, 85, 108, 21);
      jTextFieldBatchPrefix = new JTextField4j();
      jPanelLabel.add(jTextFieldBatchPrefix);
      AbstractDocument doc2 = (AbstractDocument) jTextFieldBatchPrefix.getDocument();
      doc2.setDocumentFilter(new JFixedSizeFilter(JDBMaterialBatch.field_batch_number));
      jTextFieldBatchPrefix.setBounds(176, 85, 108, 21);
      jTextFieldBatchPrefix.setEnabled(false);
      jSpinnerExpiryDate = new JDateControl();
      jSpinnerExpiryDate.addFocusListener(new FocusAdapter()
      {
        @Override
        public void focusLost(FocusEvent arg0)
        {
View Full Code Here

Examples of com.commander4j.util.JDateControl

    labelCreated.setText(lang.get("lbl_Created"));
    labelCreated.setHorizontalAlignment(SwingConstants.TRAILING);
    labelCreated.setBounds(476, 35, 126, 21);
    jDesktopPane1.add(labelCreated);
   
    dateControlCreatedFrom = new JDateControl();
    dateControlCreatedFrom.setEnabled(false);
    dateControlCreatedFrom.setBounds(634, 31, 125, 25);
    jDesktopPane1.add(dateControlCreatedFrom);
   
    calendarButtonCreatedFrom = new JCalendarButton(dateControlCreatedFrom);
    calendarButtonCreatedFrom.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
      }
    });
    calendarButtonCreatedFrom.setEnabled(false);
    calendarButtonCreatedFrom.setBounds(763, 35, 21, 21);
    jDesktopPane1.add(calendarButtonCreatedFrom);
   
    checkBoxCreatedFrom = new JCheckBox4j();
    checkBoxCreatedFrom.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        if (checkBoxCreatedFrom.isSelected())
        {
          dateControlCreatedFrom.setEnabled(true);
          calendarButtonCreatedFrom.setEnabled(true);
        }
        else
        {
          dateControlCreatedFrom.setEnabled(false);
          calendarButtonCreatedFrom.setEnabled(false);
        }
      }
    });
    checkBoxCreatedFrom.setBackground(Color.WHITE);
    checkBoxCreatedFrom.setBounds(604, 31, 21, 25);
    jDesktopPane1.add(checkBoxCreatedFrom);
   
    checkBoxCreatedTo = new JCheckBox4j();
    checkBoxCreatedTo.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        if (checkBoxCreatedTo.isSelected())
        {
          dateControlCreatedTo.setEnabled(true);
          calendarButtonCreatedTo.setEnabled(true);
        }
        else
        {
          dateControlCreatedTo.setEnabled(false);
          calendarButtonCreatedTo.setEnabled(false);
        }
      }
    });
    checkBoxCreatedTo.setBackground(Color.WHITE);
    checkBoxCreatedTo.setBounds(784, 31, 21, 25);
    jDesktopPane1.add(checkBoxCreatedTo);
   
    dateControlCreatedTo = new JDateControl();
    dateControlCreatedTo.setEnabled(false);
    dateControlCreatedTo.setBounds(810, 31, 125, 25);
    jDesktopPane1.add(dateControlCreatedTo);
   
    calendarButtonCreatedTo = new JCalendarButton(dateControlCreatedTo);
    calendarButtonCreatedTo.setEnabled(false);
    calendarButtonCreatedTo.setBounds(938, 35, 21, 21);
    jDesktopPane1.add(calendarButtonCreatedTo);
   
    JLabel4j_std labelExpected = new JLabel4j_std();
    labelExpected.setText(lang.get("lbl_Expected"));
    labelExpected.setHorizontalAlignment(SwingConstants.TRAILING);
    labelExpected.setBounds(476, 63, 126, 21);
    jDesktopPane1.add(labelExpected);
   
    checkBoxExpectedFrom = new JCheckBox4j();
    checkBoxExpectedFrom.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        if (checkBoxExpectedFrom.isSelected())
        {
          dateControlExpectedFrom.setEnabled(true);
          calendarButtonExpectedFrom.setEnabled(true);
        }
        else
        {
          dateControlExpectedFrom.setEnabled(false);
          calendarButtonExpectedFrom.setEnabled(false);
        }
      }
    });
    checkBoxExpectedFrom.setBackground(Color.WHITE);
    checkBoxExpectedFrom.setBounds(604, 59, 21, 25);
    jDesktopPane1.add(checkBoxExpectedFrom);
   
    dateControlExpectedFrom = new JDateControl();
    dateControlExpectedFrom.setEnabled(false);
    dateControlExpectedFrom.setBounds(634, 59, 125, 25);
    jDesktopPane1.add(dateControlExpectedFrom);
   
    calendarButtonExpectedFrom = new JCalendarButton(dateControlExpectedFrom);
    calendarButtonExpectedFrom.setEnabled(false);
    calendarButtonExpectedFrom.setBounds(763, 63, 21, 21);
    jDesktopPane1.add(calendarButtonExpectedFrom);
   
    checkBoxExpectedTo = new JCheckBox4j();
    checkBoxExpectedTo.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        if (checkBoxExpectedTo.isSelected())
        {
          dateControlExpectedTo.setEnabled(true);
          calendarButtonExpectedTo.setEnabled(true);
        }
        else
        {
          dateControlExpectedTo.setEnabled(false);
          calendarButtonExpectedTo.setEnabled(false);
        }
      }
    });
    checkBoxExpectedTo.setBackground(Color.WHITE);
    checkBoxExpectedTo.setBounds(784, 59, 21, 25);
    jDesktopPane1.add(checkBoxExpectedTo);
   
    dateControlExpectedTo = new JDateControl();
    dateControlExpectedTo.setEnabled(false);
    dateControlExpectedTo.setBounds(810, 59, 125, 25);
    jDesktopPane1.add(dateControlExpectedTo);
   
    calendarButtonExpectedTo = new JCalendarButton(dateControlExpectedTo);
    calendarButtonExpectedTo.setEnabled(false);
    calendarButtonExpectedTo.setBounds(938, 63, 21, 21);
    jDesktopPane1.add(calendarButtonExpectedTo);
   
    JLabel4j_std labelResolved = new JLabel4j_std();
    labelResolved.setText(lang.get("lbl_Resolved"));
    labelResolved.setHorizontalAlignment(SwingConstants.TRAILING);
    labelResolved.setBounds(480, 90, 122, 21);
    jDesktopPane1.add(labelResolved);
   
    checkBoxResolvedFrom = new JCheckBox4j();
    checkBoxResolvedFrom.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        if (checkBoxResolvedFrom.isSelected())
        {
          dateControlResolvedFrom.setEnabled(true);
          calendarButtonResolvedFrom.setEnabled(true);
        }
        else
        {
          dateControlResolvedFrom.setEnabled(false);
          calendarButtonResolvedFrom.setEnabled(false);
        }
      }
    });
    checkBoxResolvedFrom.setBackground(Color.WHITE);
    checkBoxResolvedFrom.setBounds(604, 86, 21, 25);
    jDesktopPane1.add(checkBoxResolvedFrom);
   
    dateControlResolvedFrom = new JDateControl();
    dateControlResolvedFrom.setEnabled(false);
    dateControlResolvedFrom.setBounds(634, 86, 125, 25);
    jDesktopPane1.add(dateControlResolvedFrom);
   
    checkBoxResolvedTo = new JCheckBox4j();
    checkBoxResolvedTo.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
          if (checkBoxResolvedTo.isSelected())
          {
            dateControlResolvedTo.setEnabled(true);
            calendarButtonResolvedTo.setEnabled(true);
          }
          else
          {
            dateControlResolvedTo.setEnabled(false);
            calendarButtonResolvedTo.setEnabled(false);
          }
      }
    });
    checkBoxResolvedTo.setBackground(Color.WHITE);
    checkBoxResolvedTo.setBounds(784, 86, 21, 25);
    jDesktopPane1.add(checkBoxResolvedTo);
   
    dateControlResolvedTo = new JDateControl();
    dateControlResolvedTo.setEnabled(false);
    dateControlResolvedTo.setBounds(810, 86, 125, 25);
    jDesktopPane1.add(dateControlResolvedTo);
   
    calendarButtonResolvedFrom = new JCalendarButton(dateControlResolvedFrom);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.