Examples of SelectionInList


Examples of DisplayProject.binding.list.SelectionInList

        // Unfortunately, we need to tie the list selection and the model together, so that we can
        // get and set the element list from the model
//        ListElementValueModelConverter elementConverter = this.getElementConverter(selectedItemProperty, newList);
        //SelectionInList selection = new SelectionInList(newList,elementConverter);

        SelectionInList selection = this.getSelectionInList(selectedItemProperty, newList);
        list.setModel(new ScrollListModel(selection, list, pIsSingleSelect));
        if (pIsSingleSelect) {
            list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
            list.setSelectionModel( new SingleListSelectionAdapter(
                            selection.getSelectionIndexHolder()));
            // Force a selection if we're in single selection mode...
            if (list.getSelectedIndex() == -1) {
                list.setSelectedIndex(0);
            }
        }
        else {
            list.setSelectionMode(ListSelectionModel.MULTIPLE_INTERVAL_SELECTION);
            list.setSelectionModel(new ToggleListSelectionModel());
            list.addListSelectionListener(new SelectionCounterAdapter(list, selection.getSelectionIndexHolder()));
        }

        //Bindings.bind(list,getSelectionInList(selectedItemProperty,elements));
    }
View Full Code Here

Examples of DisplayProject.binding.list.SelectionInList

    @SuppressWarnings("unchecked")
  public void bindComponent(MenuList list, String selectedItemProperty, Array_Of_ListElement<ListElement> elements)
    {
      Array_Of_ListElement<ListElement> newList = (Array_Of_ListElement<ListElement>)elements.clone();
      // TF:08/11/2009:We need to be able to force the list to have a valid value (unless it's a null type)
        SelectionInList selection = this.getSelectionInList(selectedItemProperty, newList, true);
        list.setModel(new MenuList.Model(selection, list));
        list.setSelectionMode(ListSelectionModel.SINGLE_SELECTION);
        list.setSelectionModel( new SingleListSelectionAdapter(
                selection.getSelectionIndexHolder()));
        // Force a selection if we're in single selection mode...
        // TF:08/11/2009:DET-127:We only want to do this on non-nullable types, so invoke a method to do it.
        list.initialiseSelectedElement();
    }
View Full Code Here

Examples of DisplayProject.binding.list.SelectionInList

        Array_Of_ListElement<ListElement> newList = (Array_Of_ListElement<ListElement>)elements.clone();

        // Unfortunately, we need to tie the list selection and the model together, so that we can
        // get and set the element list from the model
//        ListElementValueModelConverter elementConverter = this.getElementConverter(selectedItemProperty, newList);
        SelectionInList selection = this.getSelectionInList(selectedItemProperty, newList);
        list.setModel(new RadioListModel(selection, list));
        list.setSelectionModel( new SingleListSelectionAdapter(
                        selection.getSelectionIndexHolder()));


        //Bindings.bind(list,getSelectionInList(selectedItemProperty,elements));
    }
View Full Code Here

Examples of DisplayProject.binding.list.SelectionInList

        ValueModel selectedItem = getPropertyValueModel(selectedItemProperty);
        PropertyDescriptor descriptor = model.getPropertyDescriptor(selectedItemProperty);
        ValueHolder aHolder = new ValueHolder(elements, false);
        ListElementValueModelConverter elementConverter = new ListElementValueModelConverter(selectedItem, aHolder, descriptor.getPropertyType());
        elementConverter.setForceValidValue(pForceValidValue);
        SelectionInList selectionInList = new SelectionInList(aHolder, elementConverter);
        return selectionInList;
    }
View Full Code Here

Examples of DisplayProject.binding.list.SelectionInList

        // Unfortunately, we need to tie the list selection and the model together, so that we can
        // get and set the element list from the model


        SelectionInList selection = this.getSelectionInList(selectedItemProperty, newList);

        list.setElementList(newList);

        list.setSelectionModel( new SingleListSelectionAdapter(selection.getSelectionIndexHolder()));

        if (list.getSelectedIndex() == -1) {
            list.setSelectedIndex(0);
        }
View Full Code Here

Examples of com.jgoodies.binding.list.SelectionInList

      objectList.clear();
      objectList.addAll(tmpList);
    }
    // liste blir initiert i initPresentationModel
    attributeList = new ArrayListModel();
    attributeSelection = new SelectionInList((ListModel) attributeList);
    attributeSelection.addPropertyChangeListener(
        SelectionInList.PROPERTYNAME_SELECTION_INDEX,
        new SelectionListener());

    metricList = ApplicationParamUtil.findParamListByType("Betegnelse");
View Full Code Here

Examples of com.jgoodies.binding.list.SelectionInList

        managerRepository.getArticleTypeManager().findByName(
            "Takstoler"), managerRepository,
        deviationViewHandlerFactory, setProductionUnitActionFactory);
    showTakstolInfoActionFactory = aShowTakstolInfoActionFactory;
    productionUnitList = new ArrayListModel();
    productionUnitSelectionList = new SelectionInList(
        (ListModel) productionUnitList);
    initProductionUnitList();
  }
View Full Code Here

Examples of com.jgoodies.binding.list.SelectionInList

    deviationViewHandlerFactory = aDeviationViewHandlerFactory;
    managerRepository = aManagerRepository;
    login = aLogin;
    statusCheckers = Util.getStatusCheckersTransport(managerRepository);
    transportableList = new ArrayListModel();
    transportableSelectionList = new SelectionInList(
        (ListModel) transportableList);
    orderViewHandler = aOrderViewHandlerFactory.create(true);

    setUpMenus();
View Full Code Here

Examples of com.jgoodies.binding.list.SelectionInList

    orderComments = new ArrayListModel();
    customerList = new ArrayListModel();

    orderPanelList = new ArrayListModel();

    orderPanelSelectionList = new SelectionInList(
        (ListModel) orderPanelList);

    numberOf = new NumberOf(objectList.getSize(), objectList.getSize());

    productAreaList = new ArrayList<ProductArea>();
View Full Code Here

Examples of com.jgoodies.binding.list.SelectionInList

        && attribute.getAttributeChoices() != null) {
      choiceList = new ArrayListModel(attribute.getAttributeChoices());
    } else {
      choiceList = new ArrayListModel();
    }
    choiceSelectionList = new SelectionInList((ListModel) choiceList);

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