Examples of XulListbox


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

  public void createDataFactory()
  {
    final XulDialog datasourceType = (XulDialog) getDocument().getElementById(DATASOURCE_TYPE_DIALOG_ID);
    datasourceType.setVisible(true);
    final XulListbox box = (XulListbox) getDocument().getElementById(DATASOURCE_SELECTIONS_BOX_ID);
    final XulEditorDataFactoryMetaData myEditData = (XulEditorDataFactoryMetaData) box.getSelectedItem();
    if (myEditData != null)
    {
      editOrCreateDataFactory(myEditData.getMetadata());
    }
    box.setSelectedIndices(new int[0])// clear the selection for next time.
  }
View Full Code Here

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

  {
    super.createPresentationComponent(mainWizardContainer);

    mainWizardContainer.loadOverlay(DATASOURCE_AND_QUERY_STEP_OVERLAY);
    mainWizardContainer.addEventHandler(new DatasourceAndQueryStepHandler());
    final XulListbox box = (XulListbox) getDocument().getElementById(DATASOURCE_SELECTIONS_BOX_ID);
    box.removeItems();
    for (final XulEditorDataFactoryMetaData dfMeta : dataFactoryMetas)
    {
      box.addItem(dfMeta);
    }
    box.addPropertyChangeListener(new SelectedIndexUpdateHandler());
  }
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

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

  public void createDataFactory()
  {
    final XulDialog datasourceType = (XulDialog) getDocument().getElementById(DATASOURCE_TYPE_DIALOG_ID);
    datasourceType.setVisible(true);
    final XulListbox box = (XulListbox) getDocument().getElementById(DATASOURCE_SELECTIONS_BOX_ID);
    final XulEditorDataFactoryMetaData myEditData = (XulEditorDataFactoryMetaData) box.getSelectedItem();
    if (myEditData != null)
    {
      editOrCreateDataFactory(myEditData.getMetadata());
    }
    box.setSelectedIndices(new int[0])// clear the selection for next time.
  }
View Full Code Here

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

  {
    super.createPresentationComponent(mainWizardContainer);

    mainWizardContainer.loadOverlay(DATASOURCE_AND_QUERY_STEP_OVERLAY);
    mainWizardContainer.addEventHandler(new DatasourceAndQueryStepHandler());
    final XulListbox box = (XulListbox) getDocument().getElementById(DATASOURCE_SELECTIONS_BOX_ID);
    box.removeItems();
    for (final XulEditorDataFactoryMetaData dfMeta : dataFactoryMetas)
    {
      box.addItem(dfMeta);
    }
    box.addPropertyChangeListener(new SelectedIndexUpdateHandler());
  }
View Full Code Here

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
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.