use of org.activityinfo.ui.client.analysis.model.DimensionModel in project activityinfo by bedatadriven.
the class DimensionPane method onDimensionsDropped.
private void onDimensionsDropped(int insertIndex, List<EffectiveDimension> dropped) {
List<DimensionModel> dims = new ArrayList<>();
for (EffectiveDimension effectiveDimension : dropped) {
dims.add(ImmutableDimensionModel.builder().from(effectiveDimension.getModel()).axis(this.axis).build());
}
String afterDimId = null;
EffectiveDimension afterItem = listStore.get(insertIndex);
if (afterItem != null) {
afterDimId = afterItem.getId();
}
viewModel.updateModel(viewModel.getWorkingModel().reorderDimensions(afterDimId, dims));
}
use of org.activityinfo.ui.client.analysis.model.DimensionModel in project activityinfo by bedatadriven.
the class NewDimensionDialog method onOkClicked.
private void onOkClicked(SelectEvent event) {
DimensionModel selectedItem = tree.getSelectionModel().getSelectedItem().dimensionModel();
if (selectedItem != null) {
SelectionEvent.fire(this, selectedItem);
dialog.hide();
}
}
Aggregations