Package javax.swing.text

Examples of javax.swing.text.MaskFormatter$CharCharacter


    ((DateFormat) timeFormat).setLenient(false);

    try
    {
      MaskFormatter dateMask1 = new MaskFormatter("##:##:##");
      dateMask1.install(textField4jStartTime);
      MaskFormatter dateMask2 = new MaskFormatter("##:##:##");
      dateMask2.install(textField4jStartTime);
    } catch (ParseException ex)
    {

    }
View Full Code Here


  public static ResourceBundle bundle = ResourceBundle
      .getBundle("config");
  private final static Logger logger = Logger.getLogger(ViewUtil.class);

  public static MaskFormatter getDateMask() {
    MaskFormatter formatter = null;
    try {
      formatter = new MaskFormatter(bundle.getString("date.hijri.pattren"));
    } catch (ParseException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    }
    formatter.setPlaceholderCharacter('_');
    return formatter;
  }
View Full Code Here

  @BeforeClass
  public void setup() {
        formatter = null;
    try {
      formatter = new MaskFormatter("###/##:##:##");
      formatter.setPlaceholderCharacter('0');
    } catch (ParseException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

        years[i] = new Integer(calendar.get(Calendar.YEAR) - i);
      }
      yearBox = new JComboBox(years);
      yearBox.setEditable(true);
     
          MaskFormatter formatter = null;
      try {
        formatter = new MaskFormatter("###/##:##:##");
        formatter.setPlaceholderCharacter('0');
      } catch (ParseException e) {
        logger.error("Parse error in creating time field", e);
      }
     
      timeField = new TimeTextField(formatter, calendar.get(Calendar.YEAR));
View Full Code Here

    if (yearSpanValue != null) yearSpanValue.removeFocusListener(l);
  }

  YearSpanTextField createYearSpanTextField() {
    try {
      yearFormatter = new MaskFormatter("#####") {
        /**
         *
         */
        private static final long serialVersionUID = -6395586629439379363L;

View Full Code Here

      nonTimeSpanValue.setValue(NONTIME_AXIS_SPAN_INIT_VALUE);
      return nonTimeSpanValue;
    }
   
    JTextField getTimeSpanTextFieldFormat() {
      MaskFormatter formatter = null;
      try {
        formatter = new MaskFormatter("###/##:##:##");
        formatter.setPlaceholderCharacter('0');
      } catch (ParseException e) {
        logger.error("Error in creating a mask formatter", e);
      }
          return new TimeSpanTextField(formatter);
    }
View Full Code Here

  @BeforeClass
  public void setup() {
        formatter = null;
    try {
      formatter = new MaskFormatter("###/##:##:##");
      formatter.setPlaceholderCharacter('0');
    } catch (ParseException e) {
      e.printStackTrace();
    }
  }
View Full Code Here

    banco = new JTextField(bundle.getString("cheque.banco"));
    agencia = new JTextField(bundle.getString("cheque.agencia"));
    conta = new JTextField(bundle.getString("cheque.conta"));

    try {
      cpf = new JFormattedTextField(new MaskFormatter("###.###.###-##"));
    } catch (ParseException e) {
      ErrorSystem.addException(e, bundle);
    }

    oK = new JButton("Ok");
View Full Code Here

    numero = new JTextField(bundle.getString("cartao.numero"));
    codSeguranca = new JTextField(bundle.getString("cartao.codSeguranca"));
    bandeira = new JComboBox(Bandeira.values());

    try {
      cpf = new JFormattedTextField(new MaskFormatter("###.###.###-##"));
      validade = new JFormattedTextField(new MaskFormatter("##/####"));
    } catch (ParseException e) {
      ErrorSystem.addException(e, bundle);
    }

    oK = new JButton("Ok");
View Full Code Here

    partida = null;
    chegada = null;
    status = new JComboBox();

    try {
      partida = new JFormattedTextField(new MaskFormatter("##/##/#### ##:##"));
      chegada = new JFormattedTextField(new MaskFormatter("##/##/#### ##:##"));
    } catch (ParseException e1) {
      JOptionPane.showMessageDialog(null, e1.getMessage());
    }

    Status[] values = Status.values();
View Full Code Here

TOP

Related Classes of javax.swing.text.MaskFormatter$CharCharacter

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.