@Override protected JComponent buildContent() { JPanel panel = new GradientBackgroundPanel(true); final FormLayout layout = new FormLayout( "max(p;50dlu),2dlu,max(p;90dlu):g(.5), 2dlu," + "max(p;50dlu),2dlu,max(p;90dlu):g(.5)", ""); final DefaultFormBuilder builder = new DefaultFormBuilder(layout, panel); builder.setLineGapSize(Sizes.DLUX4); updateTitleLabel(builder.append("Cliente", getControl("nombre"), 5)); builder.nextLine(); ActionLabel pedidoLabel = new ActionLabel("Pedido [F5]"); // pedidoLabel.addActionListener(EventHandler.create(ActionListener.class, this, // "mostrarPedido")); updateTitleLabel(pedidoLabel); dropComponent = new DropDownComponent( pedidoLabel, new HeaderPanel("Datos Generales", "Detalle del pedido"), true); pedidoLabel.addActionListener(dropComponent); builder.append(dropComponent, getControl("folio")); updateTitleLabel( builder.append("Fecha", getControl("fecha", new SimpleDateFormat("dd/MM/yyyy")))); builder.nextLine(); updateTitleLabel(builder.append("Tipo", getControl("origen"))); updateTitleLabel(builder.append("F.P.", getControl("formaDePago"))); builder.nextLine(); // builder.appendSeparator(); updateTitleLabel(builder.append("Cargos", getControl("comisionTarjetaImporte", moneyFormat))); // updateTitleLabel(builder.append("Flete",getControl("flete",moneyFormat))); updateTitleLabel(builder.append("Total", getControl("total", moneyFormat))); // builder.nextColumn(6); /*builder.append(""); builder.nextColumn(2); updateTitleLabel(builder.append("Total",getControl("total",moneyFormat))); */ builder.getPanel().setOpaque(false); builder.setDefaultDialogBorder(); JPanel content = new JPanel(new BorderLayout()); content.add(builder.getPanel(), BorderLayout.CENTER); content.add(new JSeparator(), BorderLayout.SOUTH); return content; }
ApplicationDetailsDialog(final Root root) { super(root.getCoordinator().getMainFrame(), "Application Details - IceGrid Admin", true); setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE); _mainFrame = root.getCoordinator().getMainFrame(); _name.setEditable(false); _uuid.setEditable(false); _createTime.setEditable(false); _createUser.setEditable(false); _updateTime.setEditable(false); _updateUser.setEditable(false); _revision.setEditable(false); FormLayout layout = new FormLayout("right:pref, 3dlu, pref", ""); DefaultFormBuilder builder = new DefaultFormBuilder(layout); builder.setDefaultDialogBorder(); builder.setRowGroupingEnabled(true); builder.setLineGapSize(LayoutStyle.getCurrent().getLinePad()); builder.append("Name", _name); builder.nextLine(); builder.append("UUID", _uuid); builder.nextLine(); builder.append("Created", _createTime); builder.nextLine(); builder.append("Created by", _createUser); builder.nextLine(); builder.append("Last Update", _updateTime); builder.nextLine(); builder.append("Updated by", _updateUser); builder.nextLine(); builder.append("Revision", _revision); builder.nextLine(); Container contentPane = getContentPane(); contentPane.add(builder.getPanel()); pack(); setResizable(false); }