Examples of XulListbox


Examples of org.pentaho.ui.xul.containers.XulListbox

      return newSelectedRows;
    }

    public void doMoveToGroups()
    {
      final XulListbox availableList = (XulListbox) getDocument().getElementById(AVAILABLE_COLUMNS_LIST_ID);
      final int[] selectedIndices = availableList.getSelectedIndices();
      final List<FieldWrapper> groups = getGroupFields();
      final DataSchema schema = getEditorModel().getDataSchema().getDataSchema();
      for (final int i : selectedIndices)
      {
        final SourceFieldDefinition group = getSelectableFields().get(i);
View Full Code Here

Examples of org.pentaho.ui.xul.containers.XulListbox

      setGroupFields(groups);
    }

    public void doMoveToDetails()
    {
      final XulListbox availableList = (XulListbox) getDocument().getElementById(AVAILABLE_COLUMNS_LIST_ID);
      final int[] selectedIndices = availableList.getSelectedIndices();
      final List<FieldWrapper> details = getDetailFields();
      final DataSchema schema = getEditorModel().getDataSchema().getDataSchema();
      for (final int i : selectedIndices)
      {
        final SourceFieldDefinition field = getSelectableFields().get(i);
View Full Code Here

Examples of org.pentaho.ui.xul.containers.XulListbox

    }

    public void doMoveUpSelectedGroupItems()
    {
      final List<FieldWrapper> groups = getGroupFields();
      final XulListbox groupList = (XulListbox) getDocument().getElementById(GROUP_FIELDS_LIST_ID);
      final int[] selectedIndices = groupList.getSelectedIndices();
      Arrays.sort(selectedIndices);
      for (final int selectedRow : selectedIndices)
      {
        final FieldWrapper group = groups.remove(selectedRow);
        groups.add(selectedRow - 1, group);
      }
      setGroupFields(groups);

      // update the selection to move with the items
      groupList.setSelectedIndices(getNewSelections(selectedIndices, DIRECTION.UP));
    }
View Full Code Here

Examples of org.pentaho.ui.xul.containers.XulListbox

    }

    public void doMoveDownSelectedGroupItems()
    {
      final List<FieldWrapper> groups = getGroupFields();
      final XulListbox groupList = (XulListbox) getDocument().getElementById(GROUP_FIELDS_LIST_ID);
      final int[] selectedIndices = groupList.getSelectedIndices();
      Arrays.sort(selectedIndices);
      reverseArray(selectedIndices);
      for (final int selectedRow : selectedIndices)
      {
        final FieldWrapper group = groups.remove(selectedRow);
        groups.add(selectedRow + 1, group);
      }
      setGroupFields(groups);

      // update the selection to move with the items
      groupList.setSelectedIndices(getNewSelections(selectedIndices, DIRECTION.DOWN));
    }
View Full Code Here

Examples of org.pentaho.ui.xul.containers.XulListbox

    }

    public void doRemoveSelectedGroupItems()
    {
      final List<FieldWrapper> groups = getGroupFields();
      final XulListbox groupList = (XulListbox) getDocument().getElementById(GROUP_FIELDS_LIST_ID);
      for (int i = groupList.getSelectedIndices().length - 1; i >= 0; i--)
      { // Count from the end back
        groups.remove(groupList.getSelectedIndices()[i]);
      }
      setGroupFields(groups);
      groupList.setSelectedIndices(EMPTY_SELECTION); // Clear any selections
    }
View Full Code Here

Examples of org.pentaho.ui.xul.containers.XulListbox

    }

    public void doMoveUpSelectedDetailItems()
    {
      final List<FieldWrapper> details = getDetailFields();
      final XulListbox detailList = (XulListbox) getDocument().getElementById(DETAIL_FIELDS_LIST_ID);
      final int[] selectedIndices = detailList.getSelectedIndices();
      Arrays.sort(selectedIndices);
      for (final int selectedRow : selectedIndices)
      {
        final FieldWrapper detail = details.remove(selectedRow);
        details.add(selectedRow - 1, detail);
      }
      setDetailFields(details);

      // update the selection to move with the items
      detailList.setSelectedIndices(getNewSelections(selectedIndices, DIRECTION.UP));
    }
View Full Code Here

Examples of org.pentaho.ui.xul.containers.XulListbox

    }

    public void doMoveDownSelectedDetailItems()
    {
      final List<FieldWrapper> details = getDetailFields();
      final XulListbox detailList = (XulListbox) getDocument().getElementById(DETAIL_FIELDS_LIST_ID);
      final int[] selectedIndices = detailList.getSelectedIndices();
      Arrays.sort(selectedIndices);
      reverseArray(selectedIndices);
      for (final int selectedRow : selectedIndices)
      {
        final FieldWrapper detail = details.remove(selectedRow);
        details.add(selectedRow + 1, detail);
      }
      setDetailFields(details);

      // update the selection to move with the items
      detailList.setSelectedIndices(getNewSelections(selectedIndices, DIRECTION.DOWN));
    }
View Full Code Here

Examples of org.pentaho.ui.xul.containers.XulListbox

    }

    public void doRemoveSelectedDetailItems()
    {
      final List<FieldWrapper> details = getDetailFields();
      final XulListbox detailList = (XulListbox) getDocument().getElementById(DETAIL_FIELDS_LIST_ID);
      for (int i = detailList.getSelectedIndices().length - 1; i >= 0; i--)
      { // Count from the end back
        details.remove(detailList.getSelectedIndices()[i]);
      }
      setDetailFields(details);
      detailList.setSelectedIndices(EMPTY_SELECTION); // Clear any selections
    }
View Full Code Here

Examples of org.pentaho.ui.xul.containers.XulListbox

  {
    super.stepActivating();
    this.setFinishable(true); // there is nothing we can do in this step to keep
    this.setPreviewable(true); // from previewing or finishing.
   
    final XulListbox groupList = (XulListbox) getDocument().getElementById(FORMAT_GROUPS_LIST_ID);
    final XulListbox detailList = (XulListbox) getDocument().getElementById(FORMAT_DETAILS_LIST_ID);
    try
    {
      groupBinding.fireSourceChanged();
      detailBinding.fireSourceChanged();
      detailExpressionsBinding.fireSourceChanged();
      //      groupExpressionsBinding.fireSourceChanged();
     
      if (groupList.getRowCount() > 0) {
        groupList.setSelectedIndex(0);
      } else {
        detailList.setSelectedIndex(0);
      }
    }
    catch (Exception e)
    {
      getDesignTimeContext().error(e);
View Full Code Here

Examples of org.pentaho.ui.xul.containers.XulListbox

  public boolean stepDeactivating()
  {
    super.stepDeactivating();
    resetFieldAndGroupBindings();

    XulListbox list = (XulListbox) getDocument().getElementById(FORMAT_DETAILS_LIST_ID);
    list.setSelectedIndices(new int[0]);
    list = (XulListbox) getDocument().getElementById(FORMAT_GROUPS_LIST_ID);
    list.setSelectedIndices(new int[0]);

    return true;
  }
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.