orderViewHandler.addEditComponent(comboBoxAssemblyTeam);
createAssemblyFields();
checkBoxLock = orderViewHandler.getCheckBoxLock();
BufferedValueModel bufferedValueModel = presentationModel
.getBufferedModel(OrderModel.PROPERTY_CUSTOMER);
createCustomerFields();
createOrderFields(window1);
checkBoxAssembly = BasicComponentFactory.createCheckBox(
presentationModel
.getBufferedModel(OrderModel.PROPERTY_DO_ASSEMBLY),
"Montering");
checkBoxAssembly.setName("Assembly");
orderViewHandler.addEditComponent(checkBoxAssembly);
comboBoxConstructionType = orderViewHandler
.getComboBoxConstructionType(presentationModel);
boolean onlyNewTransport = false;
if (presentationModel.getBufferedValue(OrderModel.PROPERTY_ORDER_ID) == null
&& !search) {
onlyNewTransport = true;
}
comboBoxTransport = new JComboBox(new ComboBoxAdapter(
orderViewHandler.getTransportList(onlyNewTransport),
presentationModel
.getBufferedModel(OrderModel.PROPERTY_TRANSPORT)));
comboBoxTransport.setName("Transport");
orderViewHandler.addEditComponent(comboBoxTransport);
panelAssembly = buildAssemblyPanel();
panelAssembly.setName("AssemblyPanel");
panelAssembly.setVisible(false);
orderDate = new JDateChooser();
orderDate.setName("OrderDate");
orderViewHandler.addEditComponent(orderDate);
collapsiblePaneCost = new JXCollapsiblePane(new BorderLayout());
Action toggleCostAction = collapsiblePaneCost.getActionMap().get(
JXCollapsiblePane.TOGGLE_ACTION);
checkBoxCosts = new JCheckBox(toggleCostAction);
checkBoxCosts.setText("Kostnader");
checkBoxCosts.setSelected(true);
PropertyConnector connOrderDate = new PropertyConnector(orderDate,
"date",
presentationModel
.getBufferedModel(OrderModel.PROPERTY_ORDER_DATE),
"value");
connOrderDate.updateProperty1();
PropertyConnector connAssembly = new PropertyConnector(panelAssembly,
"visible",
presentationModel
.getBufferedModel(OrderModel.PROPERTY_DO_ASSEMBLY),
"value");
connAssembly.updateProperty1();
dateChooserInvoiced = new JDateChooser();
orderViewHandler.addEditComponent(dateChooserInvoiced);
PropertyConnector connInvoiceDate = new PropertyConnector(
dateChooserInvoiced, "date",
presentationModel
.getBufferedModel(OrderModel.PROPERTY_INVOICE_DATE),
"value");
connInvoiceDate.updateProperty1();
dateChooserPacklist = new JDateChooser();
orderViewHandler.addEditComponent(dateChooserPacklist);
PropertyConnector connPacklistDate = new PropertyConnector(
dateChooserPacklist, "date",
presentationModel
.getBufferedModel(OrderModel.PROPERTY_PACKLIST_READY),
"value");
connPacklistDate.updateProperty1();
agreementDate = new JDateChooser();
agreementDate.setName("AgreementDate");
if (!search) {
agreementDate.setEnabled(false);
}
PropertyConnector connAgreementDate = new PropertyConnector(
agreementDate, "date",
presentationModel
.getBufferedModel(OrderModel.PROPERTY_AGREEMENT_DATE),
"value");
connAgreementDate.updateProperty1();
textFieldTelephoneNr = BasicComponentFactory.createTextField(
presentationModel
.getBufferedModel(OrderModel.PROPERTY_TELEPHONE_NR),
!search);
textFieldTelephoneNr.setName("TelephoneNr");
orderViewHandler.addEditComponent(textFieldTelephoneNr);
comboBoxDeliveryWeek = new JComboBox(new ComboBoxAdapter(
Util.getWeeks(),
presentationModel
.getBufferedModel(OrderModel.PROPERTY_DELIVERY_WEEK)));
comboBoxDeliveryWeek.setName("DeliveryWeek");
orderViewHandler.addEditComponent(comboBoxDeliveryWeek);
bufferedValueModel
.addValueChangeListener(new CustomerSelectionHandler());
comboBoxProductArea = orderViewHandler
.getComboBoxProductArea(presentationModel);