Examples of CheckboxCell


Examples of com.cedarsolutions.client.gwt.custom.table.CheckboxCell

    /** Selection column, which holds the selection checkbox. */
    public class SelectionColumn extends Column<T, Boolean> {
        protected SwitchableSelectionModel<T> selectionModel;

        public SelectionColumn(SwitchableSelectionModel<T> selectionModel) {
            super(new CheckboxCell(true, false));
            this.setSortable(false);
            this.selectionModel = selectionModel;
        }
View Full Code Here

Examples of com.cedarsolutions.client.gwt.custom.table.CheckboxCell

        protected boolean selected = false;
        protected DataTable<T> table;
        protected SwitchableSelectionModel<T> selectionModel;

        public SelectionHeader(DataTable<T> table, SwitchableSelectionModel<T> selectionModel) {
            super(new CheckboxCell(true, false));
            this.table = table;
            this.selectionModel = selectionModel;
            this.refreshCheckboxState();
        }
View Full Code Here

Examples of com.cedarsolutions.client.gwt.custom.table.CheckboxCell

        public SelectionType getSelectionType() {
            return this.selectionModel.getSelectionType();
        }

        private void refreshCheckboxState() {
            CheckboxCell cell = (CheckboxCell) this.getCell();
            cell.setEnabled(this.selectionModel.getSelectionType() == SelectionType.MULTI);
        }
View Full Code Here

Examples of com.cedarsolutions.client.gwt.custom.table.CheckboxCell

// Added new tests to verify the new disabled functionality.
public class CheckboxCellClientTest extends EditableCellTestBase<Boolean, Boolean> {

  public void testConstructor() {
    {
      CheckboxCell cell = new CheckboxCell(true, false);
      assertTrue(cell.dependsOnSelection());
      assertFalse(cell.handlesSelection());
    }

    {
      CheckboxCell cell = new CheckboxCell(false, true);
      assertFalse(cell.dependsOnSelection());
      assertTrue(cell.handlesSelection());
    }
  }
View Full Code Here

Examples of com.cedarsolutions.client.gwt.custom.table.CheckboxCell

        Boolean.FALSE, false);
  }

  // Added for CedarCommon
  public void testRenderViewDataDisabledChecked() {
    CheckboxCell cell = createCell();
    cell.setEnabled(false);
    Boolean value = Boolean.TRUE;
    cell.setViewData(DEFAULT_KEY, createCellViewData());
    SafeHtmlBuilder sb = new SafeHtmlBuilder();
    Context context = new Context(0, 0, DEFAULT_KEY);
    cell.render(context, value, sb);
    String expectedInnerHtmlViewData = getExpectedInnerHtmlViewDisabled();
    String asString = sb.toSafeHtml().asString();
    assertEquals(expectedInnerHtmlViewData, asString);
  }
View Full Code Here

Examples of com.cedarsolutions.client.gwt.custom.table.CheckboxCell

    assertEquals(expectedInnerHtmlViewData, asString);
  }

  // Added for CedarCommon
  public void testRenderViewDataDisabledUnchecked() {
    CheckboxCell cell = createCell();
    cell.setEnabled(false);
    Boolean value = Boolean.FALSE;
    cell.setViewData(DEFAULT_KEY, createCellViewData());
    SafeHtmlBuilder sb = new SafeHtmlBuilder();
    Context context = new Context(0, 0, DEFAULT_KEY);
    cell.render(context, value, sb);
    String expectedInnerHtmlViewData = getExpectedInnerHtmlViewDisabled();
    String asString = sb.toSafeHtml().asString();
    assertEquals(expectedInnerHtmlViewData, asString);
  }
View Full Code Here

Examples of com.cedarsolutions.client.gwt.custom.table.CheckboxCell

    assertEquals(expectedInnerHtmlViewData, asString);
  }

  @Override
  protected CheckboxCell createCell() {
    return new CheckboxCell(false, false);
  }
View Full Code Here

Examples of com.google.gwt.cell.client.CheckboxCell

 
   class ActionColumn extends Column<PendingAction, Boolean>
   {
      public ActionColumn()
      {
         super(new CheckboxCell(false, false));
        
         setFieldUpdater(new FieldUpdater<PendingAction,Boolean>() {
            public void update(int index, PendingAction action, Boolean value)
            {
               List<PendingAction> actions = actionsDataProvider_.getList();
View Full Code Here

Examples of com.google.gwt.cell.client.CheckboxCell

   // Private methods ---------------------------------------------------------

   private void createColumns()
   {
      checkColumn_ = new Column<RObjectEntry, Boolean>(
            new CheckboxCell(false, false))
            {
               @Override
               public Boolean getValue(RObjectEntry value)
               {
                  return selection_.isSelected(value);
               }
            };
      addColumn(checkColumn_);
      checkHeader_ = new Header<Boolean>(new CheckboxCell())
      {
         @Override
         public Boolean getValue()
         {
            return selectAll_;
View Full Code Here

Examples of com.google.gwt.cell.client.CheckboxCell

  
   class LoadedColumn extends Column<PackageInfo, Boolean>
   {
      public LoadedColumn()
      {
         super(new CheckboxCell(false, false));
        
         setFieldUpdater(new FieldUpdater<PackageInfo,Boolean>() {
            @Override
            public void update(int index, PackageInfo packageInfo, Boolean value)
            {
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.