Package no.ugland.utransprod.gui.model

Examples of no.ugland.utransprod.gui.model.ConstructionTypeModel


    ProductArea productArea = productAreaManager
        .findByName("Garasje villa");
    constructionType = new ConstructionType();
    constructionType.setName("test");
    constructionType.setProductArea(productArea);
    viewHandler.saveObject(new ConstructionTypeModel(constructionType),
        null);
    assertEquals(1, viewHandler.getObjectSelectionListSize());
  }
View Full Code Here


  private JComboBox comboBoxSketch;
  private JComboBox comboBoxProductArea;

  public EditConstructionTypeView(ConstructionTypeViewHandler handler,
      ConstructionType constructionType, boolean searchDialog) {
    super(searchDialog, new ConstructionTypeModel(constructionType),
        handler);
    if (constructionType.getConstructionTypeId() == null) {
      newObject = true;
    }
  }
View Full Code Here

   * @param window
   * @param presentationModel
   */
  public void openAttributeView(WindowInterface window,
      PresentationModel presentationModel) {
    ConstructionTypeModel constructionTypeModel = (ConstructionTypeModel) presentationModel
        .getBean();

    AttributeViewHandler attributeViewHandler = new AttributeViewHandler(
        login, managerRepository);
    AttributeView attributeView = new AttributeView(attributeViewHandler,
        true);
    WindowInterface dialog = new JDialogAdapter(new JDialog(
        ProTransMain.PRO_TRANS_MAIN, "Attributt", true));
    dialog.setName("AttributeView");
    dialog.add(attributeView.buildPanel(dialog));
    dialog.pack();
    Util.locateOnScreenCenter(dialog);
    dialog.setVisible(true);

    List<Attribute> newAttributes = attributeView.getSelectedObjects();
    if (newAttributes != null && newAttributes.size() == 1) {
      String useAsUniversal = "";
      if (masterDialog) {
        useAsUniversal = (String) JOptionPane.showInputDialog(window
            .getComponent(),
            "Skal attributt gjelde alle gjeldende garasjetyper",
            "Skal gjelde alle gjelende grasjetype",
            JOptionPane.PLAIN_MESSAGE, null, new Object[] { "Ja",
                "Nei" }, null);
      }

      Attribute att = newAttributes.get(0);
      Object[] selectionValues = null;

      List<String> choices = att.getChoices();
      if (choices != null && choices.size() != 0) {
        selectionValues = choices.toArray();
      } else if (att.getYesNo() != null && att.getYesNo() > 0) {
        selectionValues = new Object[] { "Ja", "Nei" };
      }
      String attributeValue = (String) JOptionPane.showInputDialog(window
          .getComponent(), "Gi attributt verdi", "Attributt",
          JOptionPane.PLAIN_MESSAGE, null, selectionValues, null);

      String orderValue = (String) JOptionPane.showInputDialog(window
          .getComponent(), "Rekkef�lge", "Attributt",
          JOptionPane.PLAIN_MESSAGE, null, null, null);
      Integer dialogOrder = null;

      if (orderValue != null && orderValue.length() != 0) {
        dialogOrder = Integer.valueOf(orderValue);
      }
      if (attributeValue == null || attributeValue.length() == 0) {
        Util.showErrorDialog(window.getComponent(), "Feil",
            "Attributt m� ha verdi");
      } else {
        ConstructionTypeAttribute constructionTypeAttribute = constructionTypeModel
            .getArticleAttribute(newAttributes.get(0),
                attributeValue, dialogOrder);
        if (masterDialog && useAsUniversal.equalsIgnoreCase("Ja")) {
          universalAttributes.add(constructionTypeAttribute);
        }
View Full Code Here

    ConstructionType master = ((ConstructionTypeManager) overviewManager)
        .findMaster(constructionType.getProductArea());

    if (master != null) {

      ConstructionTypeModel constructionTypeModel = (ConstructionTypeModel) presentationModel
          .getBean();
      ConstructionType currentConstructionType = constructionTypeModel
          .getObject();

      ((ConstructionTypeManager) overviewManager).lazyLoadTree(master);
      Set<ConstructionTypeArticle> articles = ConstructionTypeModel
          .copyConstructionTypeArticles(currentConstructionType,
View Full Code Here

TOP

Related Classes of no.ugland.utransprod.gui.model.ConstructionTypeModel

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.