Examples of CellSelectionEvent


Examples of org.eclipse.nebula.widgets.nattable.selection.event.CellSelectionEvent

                NO_CTRL));

        assertEquals(1, listener.getEventsCount());
        assertTrue(listener.containsInstanceOf(CellSelectionEvent.class));

        CellSelectionEvent event = (CellSelectionEvent) listener
                .getReceivedEvents().get(0);
        assertEquals(1, event.getColumnPosition());
        assertEquals(5, event.getRowPosition());
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.event.CellSelectionEvent

        nattable.addLayerListener(new ILayerListener() {

            // Default selection behavior selects cells by default.
            public void handleLayerEvent(ILayerEvent event) {
                if (event instanceof CellSelectionEvent) {
                    CellSelectionEvent cellEvent = (CellSelectionEvent) event;
                    log("Selected cell: ["
                            + cellEvent.getRowPosition()
                            + ", "
                            + cellEvent.getColumnPosition()
                            + "], "
                            + nattable.getDataValueByPosition(
                                    cellEvent.getColumnPosition(),
                                    cellEvent.getRowPosition()));
                }
            }
        });

        // Events are fired whenever selection occurs. These can be use to
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.event.CellSelectionEvent

    public void fireCellSelectionEvent(int columnPosition, int rowPosition,
            boolean forcingEntireCellIntoViewport, boolean withShiftMask,
            boolean withControlMask) {

        final CellSelectionEvent selectionEvent = new CellSelectionEvent(this,
                columnPosition, rowPosition, withShiftMask, withControlMask);
        fireLayerEvent(selectionEvent);
    }
View Full Code Here

Examples of org.eclipse.nebula.widgets.nattable.selection.event.CellSelectionEvent

            // Default selection behavior selects cells by default.
            @Override
            public void handleLayerEvent(ILayerEvent event) {
                if (event instanceof CellSelectionEvent) {
                    CellSelectionEvent cellEvent = (CellSelectionEvent) event;
                    log("Selected cell: ["
                            + cellEvent.getRowPosition()
                            + ", "
                            + cellEvent.getColumnPosition()
                            + "], "
                            + natTable.getDataValueByPosition(
                                    cellEvent.getColumnPosition(),
                                    cellEvent.getRowPosition()));
                } else if (event instanceof ColumnSelectionEvent) {
                    ColumnSelectionEvent columnEvent = (ColumnSelectionEvent) event;
                    log("Selected Column: "
                            + columnEvent.getColumnPositionRanges());
                } else if (event instanceof RowSelectionEvent) {
View Full Code Here

Examples of org.zkoss.zss.ui.event.CellSelectionEvent

    int bottom = Integer.parseInt(data[5]);
   
    SpreadsheetInCtrl ctrl = ((SpreadsheetInCtrl)((Spreadsheet)comp).getExtraCtrl());
    ctrl.setSelectionRect(left,top,right,bottom);   
   
    Events.postEvent(new CellSelectionEvent(org.zkoss.zss.ui.event.Events.ON_CELL_SELECTION, comp, sheet,action,left,top,right,bottom));
  }
View Full Code Here

Examples of org.zkoss.zss.ui.event.CellSelectionEvent

    int bottom = action == CellSelectionEvent.SELECT_COLUMN ? maxrow : (Integer) data.get("bottom");
   
    SpreadsheetInCtrl ctrl = ((SpreadsheetInCtrl)((Spreadsheet)comp).getExtraCtrl());
    ctrl.setSelectionRect(left, top, right, bottom)
   
    Events.postEvent(new CellSelectionEvent(org.zkoss.zss.ui.event.Events.ON_CELL_SELECTION, comp, sheet,action,left,top,right,bottom));
  }
View Full Code Here

Examples of org.zkoss.zss.ui.event.CellSelectionEvent

      updateCell(sheet, left, top, right, bottom);
      final int lastrow = sheet.getLastRowNum();
      if (bottom > lastrow) {
        bottom = lastrow;
      }
      org.zkoss.zk.ui.event.Events.postEvent(new CellSelectionEvent(Events.ON_CELL_CHANGE, Spreadsheet.this, sheet, CellSelectionEvent.SELECT_CELLS, left, top, right,  bottom));
    }
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.