Package com.gwtext.client.widgets.grid

Examples of com.gwtext.client.widgets.grid.RowSelectionModel


    this.gridPanel.setEnableDragDrop(false);
    this.gridPanel.getView().setAutoFill(true);
    this.gridPanel.getView().setForceFit(true);
    this.gridPanel.setAutoHeight(false);
    this.gridPanel.setHeight(200);
    this.gridPanel.setSelectionModel(new RowSelectionModel(true)); // single
    // select
    this.gridPanel.getSelectionModel().addListener(new IdentityRowSelectionListener());
    this.gridPanel.addGridCellListener(new GridCellListenerAdapter() {

      public void onCellClick( GridPanel grid, int rowIndex, int colIndex, EventObject e ) {
View Full Code Here


    this.toButton.addListener( new ButtonListenerAdapter() {

      @Override
      public void onClick( Button button, EventObject e ) {

        RowSelectionModel sm = contactListPanel.getGridPanel().getSelectionModel();
        if ( sm.getCount() > 0 ) {
          String address = sm.getSelected().getAsString( ContactListFields.INTERNET_ADDRESS.name() );
          if ( address != null && address.length() > 0 ) {
            to.addEmailAddress( address );
          }
        }
      }
    } );
    multiField.addToRow( this.toButton, LABEL_WIDTH + 5 );
    multiField.addToRow( this.to, new ColumnLayoutData( 1.0 ) );
    addressPanel.add( multiField, new AnchorLayoutData( "100%" ) );

    this.cc = new EmailAddressInputField( TextProvider.get().dialog_contactlist_label_cc() );
    multiField = new MultiFieldPanel();
    this.cc.setWidth( "100%" );
    this.cc.setHideLabel( true );
    this.ccButton = new Button( this.cc.getFieldLabel() );
    this.ccButton.setMinWidth( LABEL_WIDTH );
    this.ccButton.addListener( new ButtonListenerAdapter() {

      @Override
      public void onClick( Button button, EventObject e ) {

        RowSelectionModel sm = contactListPanel.getGridPanel().getSelectionModel();
        if ( sm.getCount() > 0 ) {
          String address = sm.getSelected().getAsString( ContactListFields.INTERNET_ADDRESS.name() );
          if ( address != null && address.length() > 0 ) {
            cc.addEmailAddress( address );
          }
        }
      }
    } );
    multiField.addToRow( this.ccButton, LABEL_WIDTH + 5 );
    multiField.addToRow( this.cc, new ColumnLayoutData( 1.0 ) );
    addressPanel.add( multiField, new AnchorLayoutData( "100%" ) );

    this.bcc = new EmailAddressInputField( TextProvider.get().dialog_contactlist_label_bcc() );
    multiField = new MultiFieldPanel();
    this.bcc.setWidth( "100%" );
    this.bcc.setHideLabel( true );
    this.bccButton = new Button( this.bcc.getFieldLabel() );
    this.bccButton.setMinWidth( LABEL_WIDTH );
    this.bccButton.addListener( new ButtonListenerAdapter() {

      @Override
      public void onClick( Button button, EventObject e ) {

        RowSelectionModel sm = contactListPanel.getGridPanel().getSelectionModel();
        if ( sm.getCount() > 0 ) {
          String address = sm.getSelected().getAsString( ContactListFields.INTERNET_ADDRESS.name() );
          if ( address != null && address.length() > 0 ) {
            bcc.addEmailAddress( address );
          }
        }
      }
View Full Code Here

  private class ContactGridRowListener extends GridRowListenerAdapter {

    @Override
    public void onRowDblClick( GridPanel grid, int rowIndex, EventObject e ) {

      RowSelectionModel sm = grid.getSelectionModel();

      if ( sm.getCount() > 0 ) {
        String address = sm.getSelected().getAsString( ContactListFields.INTERNET_ADDRESS.name() );
        if ( address != null && address.length() > 0 ) {
          if ( currentField == TO_FIELD ) {
            to.addEmailAddress( address );
          }
          else if ( currentField == CC_FIELD ) {
View Full Code Here

   * @see
   * com.google.gwt.user.client.rpc.AsyncCallback#onSuccess(java.lang.Object)
   */
  public void onSuccess( Void result ) {

    RowSelectionModel model = getSelectionModel();
    if ( model != null ) {
      Record[] selectedMsgs = model.getSelections();
      if ( selectedMsgs != null && selectedMsgs.length > 0 ) {
        for (int i = 0; i < selectedMsgs.length; i++) {
          selectedMsgs[i].set( this.markActionType.getFlagField().name(), this.markActionType.isMark() );
        }
      }
View Full Code Here

TOP

Related Classes of com.gwtext.client.widgets.grid.RowSelectionModel

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.