Package com.extjs.gxt.ui.client.event

Examples of com.extjs.gxt.ui.client.event.KeyListener


    //inputContainer.setWidth("99%");
   
    input = new TextField<String>();
    input.setWidth("100%");
    input.setEmptyText(JabberApp.getConstants().typeAMessage());
    input.addKeyListener(new KeyListener()
    {
      public void componentKeyPress(ComponentEvent event)
      {
        if(event.getKeyCode() == 13)
          doSend();
View Full Code Here


      }
       
      };
      store.addFilter(filter);
     
      field.addKeyListener(new KeyListener()
      {
        public void componentKeyUp(ComponentEvent event)
        {
          if(field.getRawValue().length()>0)
            store.applyFilters("");
View Full Code Here

    //inputContainer.setWidth("99%");
   
    input = new TextField<String>();
    input.setWidth("100%");
    input.setEmptyText(JabberApp.getConstants().typeAMessage());
    input.addKeyListener(new KeyListener()
    {
      public void componentKeyPress(ComponentEvent event)
      {
        if(event.getKeyCode() == 13)
          doSend();
View Full Code Here

    layoutContainer_0.add(chantierName, new FormData("100%"));

    societe = new CustomTextField<String>();
    societe.setName(FicheStDto.SOCIETE);
    societe.setMaxLength(MAX_LENGTH_1);
    societe.addListener(Events.KeyUp, new KeyListener(){
      @Override
          public void handleEvent(ComponentEvent e) {
               bus.fireEvent(new SocieteEvent(societe.getValue()));
          }
    });
   
    societe.setId("INFORMATION_PANEL_SOCIETE_ID");
    societe.setAllowBlank(false);
    societe.setFieldLabel(messages.societe());
    layoutContainer_0.add(societe, new FormData("100%"));
    lc1.add(layoutContainer_0);
    layoutContainer_0.setWidth("300px");

    LayoutContainer layoutContainer_1 = new LayoutContainer();
    FormLayout fl_layoutContainer_1 = new FormLayout();
    fl_layoutContainer_1.setLabelWidth(90);
    layoutContainer_1.setLayout(fl_layoutContainer_1);

    lot = new CustomTextField<String>();
    lot.setId("INFORMATION_PANEL_LOT_ID");
    lot.setMaxLength(MAX_LENGTH_3);
    lot.setFieldLabel(messages.lot());
    lot.setAllowBlank(false);
    layoutContainer_1.add(lot, new FormData("100%"));

    initLotTypeData();

    lotType.setId("INFORMATION_PANEL_LOT_TYPE_ID");
    layoutContainer_1.add(lotType, new FormData("100%"));
    layoutContainer_1.setWidth("300px");
    lc1.add(layoutContainer_1, new TableData(HorizontalAlignment.CENTER, VerticalAlignment.MIDDLE));

    LayoutContainer layoutContainer_2 = new LayoutContainer();
    FormLayout fl_layoutContainer_2 = new FormLayout();
    fl_layoutContainer_2.setLabelWidth(160);
    layoutContainer_2.setLayout(fl_layoutContainer_2);

    idSiTravaux = new CustomTextField<String>();            
    idSiTravaux.setMaxLength(30);
    idSiTravaux.setAllowBlank(false);
    idSiTravaux.addListener(Events.OnKeyUp, new KeyListener(){
       @Override
           public void handleEvent(ComponentEvent e) {
                bus.fireEvent(new ConducteurEvent(idSiTravaux.getValue()));
           }
    });
   
    idSiTravaux.setId("INFORMATION_PANEL_SITRAVAUX_ID");
    idSiTravaux.setName(FicheStDto.ID_SI_TRAVAUX);
    idSiTravaux.setFieldLabel(messages.foreman());
    layoutContainer_2.add(idSiTravaux, new FormData("100%"));

    objectif = createNumberField(messages.montant());
    objectif.setId("INFORMATION_PANEL_MONTANT_ID");
    objectif.setName(FicheStDto.OBJECTIF);
    layoutContainer_2.add(objectif, new FormData("100%"));
    lc1.add(layoutContainer_2, new TableData(HorizontalAlignment.RIGHT, VerticalAlignment.MIDDLE));
    layoutContainer_2.setWidth("350px");

    LayoutContainer informationFieldSet = new LayoutContainer();
    TableLayout tablelayout2 = new TableLayout(5);
    tablelayout2.setHeight("100%");
    tablelayout2.setWidth("100%");
    informationFieldSet.setLayout(tablelayout2);

    FieldSet conditionFieldSet = new FieldSet();
    conditionFieldSet.setWidth(panel1);
    TableData layoutData = new TableData();
    layoutData.setVerticalAlign(VerticalAlignment.MIDDLE);
    layoutData.setWidth(COLUMNS_WIDTH[0]);
    conditionFieldSet.setLayout(new RowLayout(Orientation.VERTICAL));

    LayoutContainer layoutContainer_4 = new LayoutContainer();
    FormLayout fl_layoutContainer_4 = new FormLayout();
    fl_layoutContainer_4.setLabelWidth(180);
    layoutContainer_4.setLayout(fl_layoutContainer_4);

    initPaymentData();
    layoutContainer_4.add(payment, new FormData(ANCHOR_SPEC_1));

    NumberField rg = createNumberField(messages.rg());
    rg.setName(FicheStDto.RG);
    rg.setMinValue(0);
    rg.setMaxValue(100);
    rg.setId("INFORMATIONAL_PANEL_RG_ID");
    layoutContainer_4.add(rg, new FormData("70%"));

    initDecennaleNecessaireData();
    layoutContainer_4.add(decennaleNecessaire, new FormData(ANCHOR_SPEC_1));

    initDemandeDagrementData();
    layoutContainer_4.add(demandeDagrement, new FormData(ANCHOR_SPEC_1));
    conditionFieldSet.add(layoutContainer_4);

    HTML newLine = new HTML("<br>", true);
    conditionFieldSet.add(newLine);

    LayoutContainer layoutContainer_6 = new LayoutContainer();
    TableLayout tl3 = new TableLayout(3);
    tl3.setWidth("90%");
    layoutContainer_6.setLayout(tl3);

    LayoutContainer layoutContainer_5 = new LayoutContainer();
    FormLayout fl_layoutContainer_5 = new FormLayout();
    fl_layoutContainer_5.setLabelWidth(110);
    layoutContainer_5.setLayout(fl_layoutContainer_5);

    initDgdPresenteData();
    layoutContainer_5.add(dgdPresente, new FormData("65%"));
    dgdPresente.setWidth(50);
    layoutContainer_6.add(layoutContainer_5);

    HTML space4 = new HTML(SPACES_3);
    layoutContainer_6.add(space4);

    LayoutContainer layoutContainer_7 = new LayoutContainer();
    FormLayout fl_layoutContainer_7 = new FormLayout();
    fl_layoutContainer_7.setLabelWidth(50);
    layoutContainer_7.setLayout(fl_layoutContainer_7);
    DateField dgdPresenteDate = new DateField();
    dgdPresenteDate.setId("INFORMATIONAL_PANEL_DGDPRESENTEDATE_ID");
    dgdPresenteDate.setName(FicheStDto.DATEDGDPRESENTE);
    dgdPresenteDate.setWidth(100);
    layoutContainer_7.add(dgdPresenteDate, new FormData("90%"));
    dgdPresenteDate.setFieldLabel(messages.date());
    layoutContainer_6.add(layoutContainer_7);
    conditionFieldSet.add(layoutContainer_6);
    conditionFieldSet.setStyleAttribute("height", HEIGHT_1);
    conditionFieldSet.setHeading(messages.conditions());
    informationFieldSet.add(conditionFieldSet, layoutData);

    HTML space0 = new HTML(SPACES_3);
    TableData tableData2 = new TableData();
    tableData2.setWidth(COLUMNS_WIDTH[1]);
    informationFieldSet.add(space0, tableData2);

    FieldSet prestationsFieldSet = new FieldSet();
    if(RootPanel.get().getOffsetWidth() <= 1900){//Constants.MIN_WIDTH){
      panel3 -= 50;
    }
    prestationsFieldSet.setWidth(panel2);

    prestationsFieldSet.setStyleAttribute("height", HEIGHT_1);
    FormLayout fl_prestationsFieldSet = new FormLayout();
    fl_prestationsFieldSet.setLabelWidth(120);
    prestationsFieldSet.setLayout(fl_prestationsFieldSet);

    NumberField pilotage = addNumberField(
        prestationsFieldSet, messages.pilotage(), FicheStDto.PRESTAPILOTAGE, "INFORMATIONAL_PANEL_PILOTAGE_ID", true);

    NumberField assurances = addNumberField(
        prestationsFieldSet, messages.assurances(), FicheStDto.PRESTAASSURANCES,
        "INFORMATIONAL_PANEL_ASSURANCES_ID", true);

    prorata = addNumberField(
        prestationsFieldSet, messages.prorata(), FicheStDto.PRESTA_PRORATA, "INFORMATIONAL_PANEL_PRORATE_ID", true);
    prorata.addListener(Events.KeyUp, new KeyListener() {
      @Override
      public void handleEvent(ComponentEvent e) {
        bus.fireEvent(new PrestationEvent(6, prorata.getValue().doubleValue()));
      }
    });

    canto = addNumberField(prestationsFieldSet, messages.canto(), FicheStDto.PRESTACANTO, "INFORMATIONAL_PANEL_CANTO_ID", false);
    canto.addListener(Events.KeyUp, new KeyListener() {
      @Override
      public void handleEvent(ComponentEvent e) {
        bus.fireEvent(new PrestationEvent(0, canto.getValue().doubleValue()));
      }
    });

    badge = addNumberField(prestationsFieldSet, messages.badge(), FicheStDto.PRESTABADGE, "INFORMATIONAL_PANEL_BADGE_ID", false);
    badge.addListener(Events.KeyUp, new KeyListener() {
      @Override
      public void handleEvent(ComponentEvent e) {
        bus.fireEvent(new PrestationEvent(1, badge.getValue().doubleValue()));
      }
    });

    grue = addNumberField(prestationsFieldSet, messages.grue(), FicheStDto.PRESTAGRUE, "INFORMATIONAL_PANEL_GRUE_ID", false);
    grue.addListener(Events.KeyUp, new KeyListener() {
      @Override
      public void handleEvent(ComponentEvent e) {
        bus.fireEvent(new PrestationEvent(2, grue.getValue().doubleValue()));
      }
    });

    lift = addNumberField(prestationsFieldSet, messages.lift(), FicheStDto.PRESTALIFT, "INFORMATIONAL_PANEL_LIFT_ID", false);
    lift.addListener(Events.KeyUp, new KeyListener() {
      @Override
      public void handleEvent(ComponentEvent e) {
        bus.fireEvent(new PrestationEvent(3, lift.getValue().doubleValue()));
      }
    });

    benne = addNumberField(prestationsFieldSet, messages.benne(), FicheStDto.PRESTABENNE, "INFORMATIONAL_PANEL_BENNE_ID", false);
    benne.addListener(Events.KeyUp, new KeyListener() {
      @Override
      public void handleEvent(ComponentEvent e) {
        bus.fireEvent(new PrestationEvent(4, benne.getValue().doubleValue()));
      }
    });

    netoyage = addNumberField(
        prestationsFieldSet, messages.nettoyage(), FicheStDto.PRESTANETTOYAGE, "INFORMATIONAL_PANEL_NETOYAGE_ID", false);
    netoyage.addListener(Events.KeyUp, new KeyListener() {
      @Override
      public void handleEvent(ComponentEvent e) {
        bus.fireEvent(new PrestationEvent(5, netoyage.getValue().doubleValue()));
      }
    });
View Full Code Here

  fsNouveauxChantier.setCollapsible(false);
  fsNouveauxChantier.setLayout(new ColumnLayout());
  LabelField lblfldNomDuChantier = new LabelField(messages.nameChantier() + ":");
  fsNouveauxChantier.add(lblfldNomDuChantier);
  txtChantier = new TextField<String>();
  txtChantier.addKeyListener(new KeyListener() {
      @Override
      public void componentKeyUp(ComponentEvent event) {
    if (txtChantier.getValue() != null && !txtChantier.getValue().trim().isEmpty()) {
        btnCreer.setEnabled(true);
    } else {
View Full Code Here

  layoutContainer.add(lblfldNouveauxAdministrateur);
  layoutContainer.add(new Html("&nbsp"));
  txtAdmin = new TextField();

  txtAdmin.addKeyListener(new KeyListener() {

      @Override
      public void componentKeyUp(ComponentEvent event) {
    if (txtAdmin.getValue() != null && !txtAdmin.getValue().trim().isEmpty() && txtAdmin.getValue().toLowerCase().matches("\\b.{0,60}\\\\+.{1,60}")) {
        btnAjouter.setEnabled(true);
View Full Code Here

  com.extjs.gxt.ui.client.widget.layout.ColumnData cd_txtChantier = new com.extjs.gxt.ui.client.widget.layout.ColumnData();
  cd_txtChantier.setWidth(0.85);
  layoutContainer.add(txtChantier, cd_txtChantier);
  txtChantier.setFieldLabel("New TextField");
  txtChantier.setWidth("80%");
  txtChantier.addKeyListener(new KeyListener() {

      @Override
      public void componentKeyUp(ComponentEvent event) {
    if (txtChantier.getValue() != null && !txtChantier.getValue().trim().isEmpty() && txtChantier.getValue().toLowerCase().matches("\\b.{0,60}\\\\+.{1,60}")) {
        btnAdd.setEnabled(true);
View Full Code Here

    setBodyBorder(true);
    setBodyStyle("padding: 8px;background: none");
    setWidth(300);
    setResizable(false);

    KeyListener keyListener = new KeyListener() {
      public void componentKeyUp(ComponentEvent event) {
        validate();
      }

    };
View Full Code Here

    tfUrl.setAllowBlank(false);
    tfUrl.setAutoValidate(true);
    tfUrl.getMessages().setBlankText("Please enter the URL of an existing feed");
    tfUrl.getMessages().setRegexText("The link field must be a URL e.g.\n"+
            "http://www.example.com/rss.html");
    tfUrl.addKeyListener(new KeyListener() {
      public void componentKeyDown(ComponentEvent event) {
        if (event.getKeyCode() == KeyCodes.KEY_ENTER){
          addFeed(tfUrl.getValue());
        }
      }
View Full Code Here

    setWidth(350);
    setResizable(false);
    setClosable(false);
    setCollapsible(false);
   
    KeyListener keyListener = new KeyListener() {
      public void componentKeyPress(ComponentEvent event)
      {
        validate();
        if(event.getKeyCode() == 13&&login.isEnabled())
        {
View Full Code Here

TOP

Related Classes of com.extjs.gxt.ui.client.event.KeyListener

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.