Package org.eclipse.nebula.widgets.nattable.tickupdate

Examples of org.eclipse.nebula.widgets.nattable.tickupdate.ITickUpdateHandler


            cellEditor.activateCell(parentShell, originalCanonicalValue,
                    EditModeEnum.DIALOG, new DialogEditHandler(), cell,
                    configRegistry);
            result = (ICellEditDialog) cellEditor;
        } else {
            ITickUpdateHandler tickUpdateHandler = configRegistry
                    .getConfigAttribute(
                            TickUpdateConfigAttributes.UPDATE_HANDLER,
                            DisplayMode.EDIT, cell.getConfigLabels()
                                    .getLabels());
            if (tickUpdateHandler != null
                    && tickUpdateHandler.isApplicableFor(cell.getDataValue())) {
                // if a tick update handler is applicable, return the
                // TickUpdateCellEditDialog
                result = new TickUpdateCellEditDialog(parentShell,
                        originalCanonicalValue, cell, cellEditor,
                        configRegistry, tickUpdateHandler);
View Full Code Here


     *            The cell on which the command should be processed
     * @return The processed value after the command was executed on the current
     *         cell value
     */
    private Object getNewCellValue(TickUpdateCommand command, ILayerCell cell) {
        ITickUpdateHandler tickUpdateHandler = command.getConfigRegistry()
                .getConfigAttribute(TickUpdateConfigAttributes.UPDATE_HANDLER,
                        DisplayMode.EDIT, cell.getConfigLabels().getLabels());

        Object dataValue = cell.getDataValue();

        if (tickUpdateHandler != null
                && tickUpdateHandler.isApplicableFor(dataValue)) {
            if (command.isIncrement()) {
                return tickUpdateHandler.getIncrementedValue(dataValue);
            } else {
                return tickUpdateHandler.getDecrementedValue(dataValue);
            }
        } else {
            return dataValue;
        }
    }
View Full Code Here

TOP

Related Classes of org.eclipse.nebula.widgets.nattable.tickupdate.ITickUpdateHandler

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.