Package javax.swing.text

Examples of javax.swing.text.MaskFormatter


     * @throws UsageException if the mask is invalid
     */
    public static JFormattedTextField createFormattedTextField(
        ValueModel valueModel,
        String mask) {
        MaskFormatter formatter = null;
        try {
            formatter = new MaskFormatter(mask);   
        } catch (ParseException e) {
            throw new UsageException("Invalid mask '" + mask + "'.");
        }
        JFormattedTextField textField = new JFormattedTextField(formatter);
        Bindings.bind(textField, valueModel);
View Full Code Here


     * @throws UsageException if the mask is invalid
     */
    public static JFormattedTextField createFormattedTextField(
        ValueModel valueModel,
        String mask) {
        MaskFormatter formatter = null;
        try {
            formatter = new MaskFormatter(mask);   
        } catch (ParseException e) {
            throw new UsageException("Invalid mask '" + mask + "'.");
        }
        JFormattedTextField textField = new JFormattedTextField(formatter);
        Bindings.bind(textField, valueModel);
View Full Code Here

     * @throws UsageException if the mask is invalid
     */
    public static JFormattedTextField createFormattedTextField(
        ValueModel valueModel,
        String mask) {
        MaskFormatter formatter = null;
        try {
            formatter = new MaskFormatter(mask);   
        } catch (ParseException e) {
            throw new UsageException("Invalid mask '" + mask + "'.");
        }
        JFormattedTextField textField = new JFormattedTextField(formatter);
        Bindings.bind(textField, valueModel);
View Full Code Here

     */
    public DataField getqq_aPhone() {
        if (qq_aPhone == null) {
            // Mask type: MK_TEMPLATE
            try {
                MaskFormatter mf = new MaskFormatter("(##) #### ####");
                mf.setPlaceholderCharacter('_');
                mf.setValueContainsLiteralCharacters(false);
                qq_aPhone = DataFieldFactory.newDataField("aPhone", 17, mf);
            } catch (ParseException e) {
                qq_aPhone = DataFieldFactory.newDataField("aPhone", 17);
                Logger.getLogger("task.part.logmgr").error("Invalid mask specified for field: qq_aPhone, a default field will be generated", e);
            }
View Full Code Here

     */
    public DataField getqq_CustomerGrid_PhoneNumber() {
        if (qq_CustomerGrid_PhoneNumber == null) {
            // Mask type: MK_TEMPLATE
            try {
                MaskFormatter mf = new MaskFormatter("(###) ###-####");
                mf.setPlaceholderCharacter('_');
                mf.setValueContainsLiteralCharacters(false);
                qq_CustomerGrid_PhoneNumber = DataFieldFactory.newDataField("PhoneNumber", 22, mf);
            } catch (ParseException e) {
                qq_CustomerGrid_PhoneNumber = DataFieldFactory.newDataField("PhoneNumber", 22);
                Logger.getLogger("task.part.logmgr").error("Invalid mask specified for field: qq_CustomerGrid_PhoneNumber, a default field will be generated", e);
            }
View Full Code Here

        });

        jTFDtEntrada.setEnabled(false);
        jTFDtEntrada.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        try{
            jTFDtEntrada.setFormatterFactory(new DefaultFormatterFactory(new MaskFormatter("##/##/####")));
            SimpleDateFormat formatador = new SimpleDateFormat("ddMMyyyy");
            jTFDtEntrada.setText(formatador.format(new Date()));
        }
        catch(java.text.ParseException ex) {
            ex.printStackTrace();
View Full Code Here

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setTitle("Faturamento");

        jTDtV2.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        try{
            jTDtV2.setFormatterFactory(new DefaultFormatterFactory(new MaskFormatter("##/##/####")));
            SimpleDateFormat formatador = new SimpleDateFormat("ddMMyyyy");
            jTDtV2.setText(formatador.format(new Date()));
        }
        catch(java.text.ParseException ex) {
            ex.printStackTrace();
        }

        jLabel1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel1.setText("Dia:");

        jLabel2.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel2.setText("à dia:");

        jTable1.setRowHeight(18);
        jScrollPane1.setViewportView(jTable1);

        jLabel3.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        jLabel3.setText("Escolha os dias a serem exibidos:");

        exibePesquisa.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        exibePesquisa.setText("Exibir");
        exibePesquisa.addActionListener(new java.awt.event.ActionListener() {
            public void actionPerformed(java.awt.event.ActionEvent evt) {
                exibePesquisaActionPerformed(evt);
            }
        });

        jTDtV1.setFont(new java.awt.Font("Tahoma", 0, 12)); // NOI18N
        try{
            jTDtV1.setFormatterFactory(new DefaultFormatterFactory(new MaskFormatter("##/##/####")));
            jTDtV1.setText("01062011");
        }
        catch(java.text.ParseException ex) {ex.printStackTrace();
        }
View Full Code Here

    JButtonMusteriEkle.setIcon(PSAUtil
        .getImageIconViaRelativePath("picture/kullaniciEkle.png"));
    JButtonMusteriEkle.setText("MÜŞTERİ EKLE");
    JButtonMusteriEkle.setFont(new Font("Tahoma", Font.BOLD, 15));

    MaskFormatter mf = null;
    try {
      mf = new MaskFormatter("(###) ### ## ##");
      mf.setPlaceholderCharacter('_');
    } catch (ParseException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
View Full Code Here

    JButtonPersonelGuncelle.setIcon(PSAUtil
        .getImageIconViaRelativePath("picture/kullaniciEkle.png"));
    JButtonPersonelGuncelle.setText("PERSONEL BİLGİLERİ GÜNCELLE");
    JButtonPersonelGuncelle.setFont(new Font("Tahoma", Font.BOLD, 15));

    MaskFormatter mf = null;
    try {
      mf = new MaskFormatter("(###) ### ## ##");
      mf.setPlaceholderCharacter('_');
    } catch (ParseException e) {
      e.printStackTrace();
    }

    cTextFieldPersonelTelNo = new CTextField(mf);
View Full Code Here

    JButtonPersonelEkle.setIcon(PSAUtil
        .getImageIconViaRelativePath("picture/kullaniciEkle.png"));
    JButtonPersonelEkle.setText("PERSONEL EKLE");
    JButtonPersonelEkle.setFont(new Font("Tahoma", Font.BOLD, 15));

    MaskFormatter mf = null;
    try {
      mf = new MaskFormatter("(###) ### ## ##");
      mf.setPlaceholderCharacter('_');
    } catch (ParseException e) {
      e.printStackTrace();
    }

    cTextFieldPersonelTelNo = new CTextField(mf);
View Full Code Here

TOP

Related Classes of javax.swing.text.MaskFormatter

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.