Search in sources :

Example 6 with GuidedDecisionTableView

use of org.drools.workbench.screens.guided.dtable.client.widget.table.GuidedDecisionTableView in project drools-wb by kiegroup.

the class ColumnHeaderPopOverHandler method onNodeMouseMove.

@Override
public void onNodeMouseMove(final NodeMouseMoveEvent event) {
    columnPopOverPresenter.hide();
    for (GuidedDecisionTableView.Presenter dtPresenter : modellerPresenter.getAvailableDecisionTables()) {
        final GuidedDecisionTableView dtView = dtPresenter.getView();
        if (!dtView.isVisible()) {
            continue;
        }
        final Point2D ap = CoordinateUtilities.convertDOMToGridCoordinate(dtView, new Point2D(event.getX(), event.getY()));
        if (!isMouseOverTableHeader(dtView, ap.getY())) {
            continue;
        }
        final Integer uiColumnIndex = getUiColumn(dtView, ap.getX());
        if (uiColumnIndex == null) {
            continue;
        }
        columnPopOverPresenter.show(modellerPresenter.getView(), dtPresenter, uiColumnIndex);
    }
}
Also used : Point2D(com.ait.lienzo.client.core.types.Point2D) GuidedDecisionTableView(org.drools.workbench.screens.guided.dtable.client.widget.table.GuidedDecisionTableView)

Example 7 with GuidedDecisionTableView

use of org.drools.workbench.screens.guided.dtable.client.widget.table.GuidedDecisionTableView in project drools-wb by kiegroup.

the class DeleteCell method clearCells.

@Override
protected void clearCells(final GridWidget gridWidget) {
    final GridData gridModel = gridWidget.getModel();
    final GridData.SelectedCell origin = gridModel.getSelectedCellsOrigin();
    if (origin == null) {
        return;
    }
    if (!(gridWidget instanceof GuidedDecisionTableView)) {
        return;
    }
    final GuidedDecisionTableView view = (GuidedDecisionTableView) gridWidget;
    final GuidedDecisionTableView.Presenter dtPresenter = view.getPresenter();
    dtPresenter.onDeleteSelectedCells();
}
Also used : GridData(org.uberfire.ext.wires.core.grids.client.model.GridData) GuidedDecisionTableView(org.drools.workbench.screens.guided.dtable.client.widget.table.GuidedDecisionTableView)

Example 8 with GuidedDecisionTableView

use of org.drools.workbench.screens.guided.dtable.client.widget.table.GuidedDecisionTableView in project drools-wb by kiegroup.

the class SelectionCopy method perform.

@Override
public boolean perform(final GridWidget gridWidget, final boolean isShiftKeyDown, final boolean isControlKeyDown) {
    final GridData gridModel = gridWidget.getModel();
    final GridData.SelectedCell origin = gridModel.getSelectedCellsOrigin();
    if (origin == null) {
        return false;
    }
    if (!(gridWidget instanceof GuidedDecisionTableView)) {
        return false;
    }
    final GuidedDecisionTableView view = (GuidedDecisionTableView) gridWidget;
    final GuidedDecisionTableView.Presenter dtPresenter = view.getPresenter();
    dtPresenter.onCopy();
    return false;
}
Also used : GridData(org.uberfire.ext.wires.core.grids.client.model.GridData) GuidedDecisionTableView(org.drools.workbench.screens.guided.dtable.client.widget.table.GuidedDecisionTableView)

Aggregations

GuidedDecisionTableView (org.drools.workbench.screens.guided.dtable.client.widget.table.GuidedDecisionTableView)8 GridData (org.uberfire.ext.wires.core.grids.client.model.GridData)5 Point2D (com.ait.lienzo.client.core.types.Point2D)1 RemoteCallback (org.jboss.errai.common.client.api.RemoteCallback)1 ObservablePath (org.uberfire.backend.vfs.ObservablePath)1 HasBusyIndicatorDefaultErrorCallback (org.uberfire.ext.widgets.common.client.callbacks.HasBusyIndicatorDefaultErrorCallback)1