Package com.jgoodies.binding.list

Examples of com.jgoodies.binding.list.ArrayListModel


   *
   * @param aPresentationModel
   */
  @SuppressWarnings("unchecked")
  public void initPresentationModel(PresentationModel aPresentationModel) {
    ArrayListModel bufferedAttributes = (ArrayListModel) aPresentationModel
        .getBufferedValue(ConstructionTypeModel.PROPERTY_CONSTRUCTION_TYPE_ATTRIBUTES);

    attributeList.clear();
    if (bufferedAttributes != null) {
      attributeList.addAll(cloneAttributeList(bufferedAttributes));
View Full Code Here


            .getArticleAttribute(newAttributes.get(0),
                attributeValue, dialogOrder);
        if (masterDialog && useAsUniversal.equalsIgnoreCase("Ja")) {
          universalAttributes.add(constructionTypeAttribute);
        }
        ArrayListModel bufferedAttributes = (ArrayListModel) presentationModel
            .getBufferedValue(ConstructionTypeModel.PROPERTY_CONSTRUCTION_TYPE_ATTRIBUTES);
        attributeList.add(constructionTypeAttribute);
        bufferedAttributes.add(constructionTypeAttribute);
        presentationModel
            .setBufferedValue(
                ConstructionTypeModel.PROPERTY_CONSTRUCTION_TYPE_ATTRIBUTES,
                bufferedAttributes);
      }
View Full Code Here

        universalArticles.add(constructionTypeArticleMain);
      }

      BufferedValueModel bufferedArticles = presentationModel
          .getBufferedModel(ConstructionTypeModel.PROPERTY_CONSTRUCTION_TYPE_ARTICLES);
      bufferedArticles.setValue(new ArrayListModel(constructionType
          .getConstructionTypeArticles()));

    }
  }
View Full Code Here

        if (masterDialog && useAsUniversal.equalsIgnoreCase("Ja")) {
          universalChangedArticleAttributes.add(attribute);
        }
        ConstructionType constructiontype = (ConstructionType) ((ConstructionTreeNode) constructionTreeTableModel
            .getRoot()).getObject();
        bufferedArticles.setValue(new ArrayListModel(constructiontype
            .getConstructionTypeArticles()));
      }
    } else if (selectedNode != null) {
      DecimalFormat decimalFormat = new DecimalFormat();
      decimalFormat.setDecimalSeparatorAlwaysShown(false);
      decimalFormat.setParseIntegerOnly(true);
      BufferedValueModel bufferedArticles = presentationModel
          .getBufferedModel(ConstructionTypeModel.PROPERTY_CONSTRUCTION_TYPE_ARTICLES);

      ConstructionTypeArticle article = (ConstructionTypeArticle) selectedNode
          .getObject();

      String numberOfValue = null;

      if (article.getNumberOfItems() != null) {
        numberOfValue = decimalFormat
            .format(article.getNumberOfItems());
      }

      numberOfValue = JOptionPane.showInputDialog(window.getComponent(),
          "Gi antall", numberOfValue);

      String orderValue = JOptionPane.showInputDialog(window
          .getComponent(), "Rekkef�lge", article.getDialogOrder());

      if (numberOfValue != null && numberOfValue.length() != 0) {
        article.setNumberOfItems(Integer.valueOf(numberOfValue.replace(
            ',', '.')));

      }
      if (orderValue != null) {
        if (orderValue.length() != 0) {
          article.setDialogOrder(Integer.valueOf(orderValue));
        } else {
          article.setDialogOrder(null);
        }
      }
      if (masterDialog && useAsUniversal.equalsIgnoreCase("Ja")) {
        universalChangedArticles.add(article);
      }

      ConstructionType constructiontype = (ConstructionType) ((ConstructionTreeNode) constructionTreeTableModel
          .getRoot()).getObject();
      bufferedArticles.setValue(new ArrayListModel(constructiontype
          .getConstructionTypeArticles()));
    }
  }
View Full Code Here

      }
      constructionTreeTableModel.fireChanged();

      BufferedValueModel bufferedArticles = presentationModel
          .getBufferedModel(ConstructionTypeModel.PROPERTY_CONSTRUCTION_TYPE_ARTICLES);
      bufferedArticles.setValue(new ArrayListModel(constructionType
          .getConstructionTypeArticles()));

      Set<ConstructionTypeAttribute> attributes = ConstructionTypeModel
          .copyConstructionTypeAttributes(currentConstructionType,
              master.getConstructionTypeAttributes());
View Full Code Here

    managerRepository = aManagerRepository;
    addDefaultCosts = doAddDefaultCosts;
    tableEditable = isTableEditable;
    addInternalCost = doAddInternalCost;
    presentationModel = aPresentationModel;
    costsList = new ArrayListModel();
    costSelectionList = new SelectionInList((ListModel) costsList);
  }
View Full Code Here

          article.setConstructionType(null);

          presentationModel
              .setBufferedValue(
                  ConstructionTypeModel.PROPERTY_CONSTRUCTION_TYPE_ARTICLES,
                  new ArrayListModel(
                      ConstructionTypeModel
                          .clonedConstructionTypeArticles(constructionType
                              .getConstructionTypeArticles())));

          constructionTreeTableModel.fireChanged();
View Full Code Here

    private void generatePacklistReport(final Set<OrderLine> orderLineSet,
            final WindowInterface window) throws ProTransException {
        if (orderLineSet != null) {
            lazyLoadOrderLines(orderLineSet);
            ArrayListModel orderLines = new ArrayListModel(postShipment
                    .getOrderLines());

            ReportViewer reportViewer = new ReportViewer("Pakkliste");
            reportViewer.generateProtransReportAndShow(new PacklistTableModel(
                    orderLines, orderLines.size(),postShipment), "Pakkliste",
                    ReportEnum.PACKLIST, null, window);
        }
    }
View Full Code Here

    super(aHeading, aOverviewManager, aUserType, true);
    viewHandlerExt = this;
    ApplicationUserManager applicationUserManager = (ApplicationUserManager) ModelUtil
        .getBean("applicationUserManager");
    userNameList = applicationUserManager.findAllNamesNotGroup();
    listCollies = new ArrayListModel();
    listTakstolArticles = new ArrayListModel();
    listColliesSelectionList = new SelectionInList((ListModel) listCollies);
    listTakstolArticleSelectionList = new SelectionInList(
        (ListModel) listTakstolArticles);
    emptySelectionListenerColli = new EmptySelectionListener(
        listColliesSelectionList);
View Full Code Here

  public void initColli(Colli aColli) {
    ((ColliManager) overviewManager).lazyLoad(aColli,
        new LazyLoadEnum[][] { { LazyLoadEnum.ORDER_LINES,
            LazyLoadEnum.NONE } });
    presentationModel = new PresentationModel(new ColliModel(aColli));
    orderLineList = new ArrayListModel((List<OrderLine>) presentationModel
        .getValue(ColliModel.PROPERTY_ORDER_LINES));
    orderLineSelectionList = new SelectionInList((ListModel) orderLineList);
    objectList.add(aColli);
  }
View Full Code Here

TOP

Related Classes of com.jgoodies.binding.list.ArrayListModel

Copyright © 2018 www.massapicom. 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.