Examples of JFixedSizeFilter


Examples of com.commander4j.util.JFixedSizeFilter

      jPanelProcessOrder.setLayout(null);
      jPanelProcessOrder.setBackground(Common.color_app_window);
      jTextFieldProcessOrder = new JTextField4j();
      jPanelProcessOrder.add(jTextFieldProcessOrder);
      AbstractDocument doc = (AbstractDocument) jTextFieldProcessOrder.getDocument();
      doc.setDocumentFilter(new JFixedSizeFilter(JDBProcessOrder.field_process_order));
      jTextFieldProcessOrder.setBounds(161, 21, 119, 21);
      jTextFieldProcessOrder.addKeyListener(new KeyAdapter()
      {
        public void keyReleased(KeyEvent evt)
        {
          processOrderChanged(jTextFieldProcessOrder.getText());
        }
      });

      jLabelProcessOrder = new JLabel4j_std();
      jPanelProcessOrder.add(jLabelProcessOrder);
      jLabelProcessOrder.setText(lang.get("lbl_Process_Order"));
      jLabelProcessOrder.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelProcessOrder.setBounds(12, 21, 142, 21);
      jTextFieldProcessOrderDescription = new JTextField4j();
      jPanelProcessOrder.add(jTextFieldProcessOrderDescription);
      jTextFieldProcessOrderDescription.setBounds(449, 21, 287, 21);
      jTextFieldProcessOrderDescription.setEditable(false);
      jTextFieldProcessOrderDescription.setEnabled(false);
      jLabelOrderDescription = new JLabel4j_std();
      jPanelProcessOrder.add(jLabelOrderDescription);
      jLabelOrderDescription.setText(lang.get("lbl_Description"));
      jLabelOrderDescription.setHorizontalAlignment(SwingConstants.TRAILING);
      jLabelOrderDescription.setBounds(306, 21, 136, 21);
      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()
      {
View Full Code Here

Examples of com.commander4j.util.JFixedSizeFilter

          jTextFieldUOM.setEnabled(false);
        }
        {
          jTextFieldEAN = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldEAN.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBMaterialUom.field_ean));
          jDesktopPane1.add(jTextFieldEAN);
          jTextFieldEAN.setPreferredSize(new java.awt.Dimension(40, 20));
          jTextFieldEAN.setFocusCycleRoot(true);
          jTextFieldEAN.setBounds(165, 59, 175, 21);
          jTextFieldEAN.addKeyListener(new KeyAdapter()
          {
            public void keyTyped(KeyEvent evt)
            {

              jButtonUpdate.setEnabled(true);
            }
          });
        }
        {
          jTextFieldVariant = new JTextField4j();
          AbstractDocument doc = (AbstractDocument) jTextFieldVariant.getDocument();
          doc.setDocumentFilter(new JFixedSizeFilter(JDBMaterialUom.field_variant));
          jDesktopPane1.add(jTextFieldVariant);
          jTextFieldVariant.setPreferredSize(new java.awt.Dimension(40, 20));
          jTextFieldVariant.setFocusCycleRoot(true);
          jTextFieldVariant.setBounds(165, 83, 34, 21);
          jTextFieldVariant.addKeyListener(new KeyAdapter()
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.