* @param selectedOrderCost
*/
public void openCostView(WindowInterface window, OrderCost selectedOrderCost) {
OrderCostViewHandler orderCostViewHandler = new OrderCostViewHandler(
login, managerRepository);
OrderCostView orderCostView = new OrderCostView(orderCostViewHandler,
selectedOrderCost);
WindowInterface dialog = new JDialogAdapter(Util.getDialog(window,
"Kostnad", true));
dialog.setName("OrderCostView");
dialog.add(orderCostView.buildPanel(dialog));
dialog.pack();
Util.locateOnScreenCenter(dialog);
dialog.setVisible(true);
OrderCost orderCost = orderCostView.getOrderCost();
if (orderCost != null) {
if (selectedOrderCost == null) {
addCost(orderCost);
} else {