List of usage examples for com.jgoodies.forms.layout Sizes DLUY2
ConstantSize DLUY2
To view the source code for com.jgoodies.forms.layout Sizes DLUY2.
Click Source Link
From source file:com.salas.bb.utils.uif.BBFormBuilder.java
License:Open Source License
/** * Constructs an instance of builder for the given FormLayout and layout container. * * @param layout the <code>FormLayout</code> used to layout the container * @param bundle the <code>ResourceBundle</code> used to lookup i15d strings * @param panel the layout container/*from w w w.ja v a 2 s .c o m*/ */ public BBFormBuilder(FormLayout layout, ResourceBundle bundle, JPanel panel) { builder = new DefaultFormBuilder(layout, bundle, panel); builder.setLineGapSize(Sizes.DLUY2); builder.setParagraphGapSize(Sizes.DLUY7); }
From source file:com.spirit.contabilidad.gui.panel.JPAsiento.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Open Source Project license - unknown spAsiento = new JScrollPane(); panelAsiento = new JPanel(); cbEfectivo = new JCheckBox(); lblTipoAsiento = new JLabel(); lblSubtipoAsiento = new JLabel(); cmbSubtipoAsiento = new JComboBox(); cmbTipoAsiento = new JComboBox(); scAsiento = new JScrollPane(); tblAsiento = new JTable(); lblTotalHaber = new JLabel(); lblNumero = new JLabel(); txtNumero = new JFormattedTextField(); lblPlanCuenta = new JLabel(); cmbPlanCuenta = new JComboBox(); lblFecha = new JLabel(); cmbFecha = new DateComboBox(); lblPeriodo = new JLabel(); cmbPeriodo = new JComboBox(); lblStatus = new JLabel(); cmbEstado = new JComboBox(); lblConcepto = new JLabel(); txtConcepto = new JTextField(); btnAgregarNota = new JButton(); lblCuenta = new JLabel(); txtCuenta = new JTextField(); btnBuscarCuenta = new JButton(); lblReferencia = new JLabel(); txtReferencia = new JTextField(); lblGlosa = new JLabel(); txtGlosa = new JTextField(); lblValorDebe = new JLabel(); txtValorDebe = new JFormattedTextField(); lblValorHaber = new JLabel(); txtValorHaber = new JFormattedTextField(); bpAsientoPanel = new JPanel(); btnMostrarPanelCentrosGasto = new JButton(); jpCentrosGasto = new JPanel(); lblCentroGasto = new JLabel(); cmbCentroGasto = new JComboBox(); lblEmpleado = new JLabel(); cmbEmpleado = new JComboBox(); lblDepartamento = new JLabel(); cmbDepartamento = new JComboBox(); lblLinea = new JLabel(); cmbLinea = new JComboBox(); lblCliente = new JLabel(); cmbCliente = new JComboBox(); lblDumbLabel = new JLabel(); panel1 = new JPanel(); btnAgregar = new JButton(); btnActualizar = new JButton(); btnEliminar = new JButton(); lblTotalDebe = new JLabel(); txtTotalDebe = new JTextField(); txtTotalHaber = new JTextField(); btnAnadir = new JButton(); popup = new JPopupMenu(); CellConstraints cc = new CellConstraints(); //======== this ======== setLayout(new FormLayout("max(pref;10dlu):grow", "fill:default:grow")); //======== spAsiento ======== {/*from ww w . ja va 2 s . co m*/ //======== panelAsiento ======== { panelAsiento.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.DLUX5), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(100)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(80)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(130)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.DLUX5) }, new RowSpec[] { new RowSpec(Sizes.dluY(10)), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(10)), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec("min(default;30dlu)"), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(100)), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(10)) })); panelAsiento.add(cbEfectivo, cc.xy(3, 11)); //---- lblTipoAsiento ---- lblTipoAsiento.setText("Tipo Asiento:"); panelAsiento.add(lblTipoAsiento, cc.xywh(5, 11, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panelAsiento.add(cmbSubtipoAsiento, cc.xywh(15, 11, 5, 1)); panelAsiento.add(cmbTipoAsiento, cc.xywh(7, 11, 5, 1)); //======== scAsiento ======== { //---- tblAsiento ---- tblAsiento.setModel(new DefaultTableModel(new Object[][] {}, new String[] { "C\u00f3digo", "Nombre cuenta", "Glosa", "Debe", "Haber" }) { boolean[] columnEditable = new boolean[] { false, false, false, false, false }; @Override public boolean isCellEditable(int rowIndex, int columnIndex) { return columnEditable[columnIndex]; } }); tblAsiento.setPreferredScrollableViewportSize(new Dimension(450, 200)); scAsiento.setViewportView(tblAsiento); } panelAsiento.add(scAsiento, cc.xywh(5, 25, 15, 5)); //---- lblTotalHaber ---- lblTotalHaber.setText("Total Haber:"); panelAsiento.add(lblTotalHaber, cc.xywh(17, 31, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- lblNumero ---- lblNumero.setText("N\u00famero:"); panelAsiento.add(lblNumero, cc.xywh(5, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panelAsiento.add(txtNumero, cc.xy(7, 3)); //---- lblPlanCuenta ---- lblPlanCuenta.setText("Plan Cuenta:"); panelAsiento.add(lblPlanCuenta, cc.xywh(11, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panelAsiento.add(cmbPlanCuenta, cc.xywh(13, 3, 5, 1)); //---- lblFecha ---- lblFecha.setText("Fecha:"); panelAsiento.add(lblFecha, cc.xywh(5, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panelAsiento.add(cmbFecha, cc.xy(7, 5)); //---- lblPeriodo ---- lblPeriodo.setText("Per\u00edodo:"); panelAsiento.add(lblPeriodo, cc.xywh(11, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panelAsiento.add(cmbPeriodo, cc.xywh(13, 5, 5, 1)); //---- lblStatus ---- lblStatus.setText("Estado:"); panelAsiento.add(lblStatus, cc.xywh(5, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- cmbEstado ---- cmbEstado.setModel(new DefaultComboBoxModel(new String[] { "PRE-ASIENTO", "ASIENTO" })); panelAsiento.add(cmbEstado, cc.xy(7, 7)); //---- lblConcepto ---- lblConcepto.setText("Concepto:"); panelAsiento.add(lblConcepto, cc.xywh(5, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panelAsiento.add(txtConcepto, cc.xywh(7, 9, 12, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- btnAgregarNota ---- btnAgregarNota.setText("Agregar Nota"); panelAsiento.add(btnAgregarNota, cc.xy(19, 9)); //---- lblSubtipoAsiento ---- lblSubtipoAsiento.setText("Subtipo Asiento:"); panelAsiento.add(lblSubtipoAsiento, cc.xywh(13, 11, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- lblCuenta ---- lblCuenta.setText("Cuenta:"); panelAsiento.add(lblCuenta, cc.xywh(5, 13, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panelAsiento.add(txtCuenta, cc.xywh(7, 13, 11, 1)); panelAsiento.add(btnBuscarCuenta, cc.xywh(19, 13, 1, 1, CellConstraints.LEFT, CellConstraints.FILL)); //---- lblReferencia ---- lblReferencia.setText("Referencia:"); panelAsiento.add(lblReferencia, cc.xywh(5, 15, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtReferencia ---- txtReferencia.setToolTipText("Referencia"); panelAsiento.add(txtReferencia, cc.xywh(7, 15, 13, 1)); //---- lblGlosa ---- lblGlosa.setText("Glosa:"); panelAsiento.add(lblGlosa, cc.xywh(5, 17, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panelAsiento.add(txtGlosa, cc.xywh(7, 17, 13, 1)); //---- lblValorDebe ---- lblValorDebe.setText("Valor Debe:"); panelAsiento.add(lblValorDebe, cc.xywh(11, 19, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtValorDebe ---- txtValorDebe.setHorizontalAlignment(SwingConstants.RIGHT); panelAsiento.add(txtValorDebe, cc.xywh(13, 19, 3, 1)); //---- lblValorHaber ---- lblValorHaber.setText("Valor Haber:"); panelAsiento.add(lblValorHaber, cc.xywh(17, 19, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtValorHaber ---- txtValorHaber.setHorizontalAlignment(SwingConstants.RIGHT); panelAsiento.add(txtValorHaber, cc.xy(19, 19)); //======== bpAsientoPanel ======== { bpAsientoPanel.setBorder(new LineBorder(Color.lightGray)); bpAsientoPanel.setLayout(new BorderLayout()); //---- btnMostrarPanelCentrosGasto ---- btnMostrarPanelCentrosGasto.setText("Centros de Gasto | Ver m\u00e1s >>"); btnMostrarPanelCentrosGasto.setHorizontalAlignment(SwingConstants.LEFT); bpAsientoPanel.add(btnMostrarPanelCentrosGasto, BorderLayout.NORTH); //======== jpCentrosGasto ======== { jpCentrosGasto.setLayout(new FormLayout(new ColumnSpec[] { new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("max(default;50dlu):grow"), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec("max(default;50dlu):grow"), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(10)) }, new RowSpec[] { new RowSpec(Sizes.DLUY2), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.DLUY3) })); //---- lblCentroGasto ---- lblCentroGasto.setText("Centro Gasto:"); jpCentrosGasto.add(lblCentroGasto, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); jpCentrosGasto.add(cmbCentroGasto, cc.xywh(5, 3, 3, 1)); //---- lblEmpleado ---- lblEmpleado.setText("Empleado:"); jpCentrosGasto.add(lblEmpleado, cc.xywh(9, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); jpCentrosGasto.add(cmbEmpleado, cc.xywh(11, 3, 3, 1)); //---- lblDepartamento ---- lblDepartamento.setText("Departamento:"); jpCentrosGasto.add(lblDepartamento, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); jpCentrosGasto.add(cmbDepartamento, cc.xywh(5, 5, 3, 1)); //---- lblLinea ---- lblLinea.setText("L\u00ednea:"); jpCentrosGasto.add(lblLinea, cc.xywh(9, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); jpCentrosGasto.add(cmbLinea, cc.xywh(11, 5, 3, 1)); //---- lblCliente ---- lblCliente.setText("Cliente:"); jpCentrosGasto.add(lblCliente, cc.xywh(3, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); jpCentrosGasto.add(cmbCliente, cc.xywh(5, 7, 3, 1)); } bpAsientoPanel.add(jpCentrosGasto, BorderLayout.CENTER); bpAsientoPanel.add(lblDumbLabel, BorderLayout.SOUTH); } panelAsiento.add(bpAsientoPanel, cc.xywh(5, 21, 15, 1)); //======== panel1 ======== { panel1.setLayout( new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- btnAgregar ---- btnAgregar.setToolTipText("Agrega el Asiento a la Tabla"); panel1.add(btnAgregar, cc.xywh(1, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); panel1.add(btnActualizar, cc.xywh(3, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); panel1.add(btnEliminar, cc.xywh(5, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); } panelAsiento.add(panel1, cc.xywh(5, 23, 15, 1)); //---- lblTotalDebe ---- lblTotalDebe.setText("Total Debe:"); panelAsiento.add(lblTotalDebe, cc.xywh(11, 31, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtTotalDebe ---- txtTotalDebe.setHorizontalAlignment(SwingConstants.RIGHT); panelAsiento.add(txtTotalDebe, cc.xywh(13, 31, 3, 1)); //---- txtTotalHaber ---- txtTotalHaber.setHorizontalAlignment(SwingConstants.RIGHT); panelAsiento.add(txtTotalHaber, cc.xy(19, 31)); } spAsiento.setViewportView(panelAsiento); } add(spAsiento, cc.xy(1, 1)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:com.spirit.facturacion.gui.panel.JPAnularFactura.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Open Source Project license - unknown jtpAnularFactura = new JideTabbedPane(); scrollPane1 = new JScrollPane(); panel3 = new JPanel(); panel2 = new JPanel(); lblTipoDocumento = new JLabel(); txtTipoDocumento = new JTextField(); rbNinguno = new JRadioButton(); lblDescuentoGlobal = new JLabel(); txtDescuentoGlobal = new JTextField(); lblTipoFactura = new JLabel(); rbPresupuesto = new JRadioButton(); rbOrdenMedios = new JRadioButton(); panel32 = new JPanel(); cmbFechaFactura = new DateComboBox(); lblFechaFactura = new JLabel(); lblFechaCreacion = new JLabel(); txtFechaCreacion = new JTextField(); lblPreimpreso = new JLabel(); txtPreimpreso = new JTextField(); lblMoneda = new JLabel(); txtMoneda = new JTextField(); lblOficina = new JLabel(); txtOficinaEmpresa = new JTextField(); lblCaja = new JLabel(); txtCaja = new JTextField(); lblFormaPago = new JLabel(); txtFormaPago = new JTextField(); lblEstado = new JLabel(); txtEstado = new JTextField(); lblListaPrecio = new JLabel(); txtListaPrecio = new JTextField(); txtFechaVencimiento = new JTextField(); lblFechaVencimiento = new JLabel(); lblObservacion = new JLabel(); txtObservacion = new JTextField(); panel4 = new JPanel(); lblCorporacion = new JLabel(); txtCorporacion = new JTextField(); btnBuscarCorporacion = new JButton(); btnEncerarCliente = new JButton(); lblCliente = new JLabel(); txtCliente = new JTextField(); btnBuscarCliente = new JButton(); lblClienteOficina = new JLabel(); txtClienteOficina = new JTextField(); lblTipoIdentificacion = new JLabel(); txtTipodentificacion = new JTextField(); btnBuscarClienteOficina = new JButton(); lblIdentificacion = new JLabel(); txtIdentificacion = new JTextField(); lblTelefono = new JLabel(); txtTelefono = new JTextField(); lblContacto = new JLabel(); txtContacto = new JTextField(); lblAutorizacionSAP = new JLabel(); txtAutorizacionSAP = new JTextField(); lblDireccion = new JLabel(); txtDireccion = new JTextField(); panel5 = new JPanel(); lblPlanMedios = new JLabel(); txtPlanMedios = new JTextField(); lblPresupuesto = new JLabel(); txtPresupuesto = new JTextField(); panel6 = new JPanel(); lblFacturadoPor = new JLabel(); txtFacturadoPor = new JTextField(); lblOrigenDocumento = new JLabel(); txtOrigenDocumento = new JTextField(); lblBodega = new JLabel(); txtBodega = new JTextField(); lblPuntoImpresion = new JLabel(); txtPuntoImpresion = new JTextField(); lblVendedor = new JLabel(); txtVendedor = new JTextField(); lblNumero = new JLabel(); txtNumero = new JTextField(); lblDirectorCuentas = new JLabel(); txtDirectorCuentas = new JTextField(); bpNegociacionPanel = new JPanel(); btnMostrarPanelNegociacion = new JButton(); jpNegociacion = new JPanel(); cbNegociacionDirecta = new JCheckBox(); lblPorcentajeNegociacionDirecta = new JLabel(); txtPorcentajeNegociacionDirecta = new JTextField(); lblDsctoCompraPorcentaje = new JLabel(); txtDsctoCompraPorcentaje = new JTextField(); lblClienteNegociacion = new JLabel(); txtClienteNegociacion = new JTextField(); btnBuscarClienteNegociacion = new JButton(); lblPorcentajeDescuento = new JLabel(); cbComisionPura = new JCheckBox(); scrollPane2 = new JScrollPane(); panel11 = new JPanel(); panel8 = new JPanel(); lblDocumento = new JLabel(); txtDocumento = new JTextField(); panel10 = new JPanel(); lblProducto = new JLabel(); lblDescripcion = new JLabel(); txtCodigoProducto = new JTextField(); spDescripcion = new JScrollPane(); txtDescripcion = new JTextArea(); lblProveedor = new JLabel(); txtProveedor = new JTextField(); lblFacturaProveedor = new JLabel(); txtFacturaProveedor = new JTextField(); lblCantidad = new JLabel(); txtCantidad = new JTextField(); lblCantidadDevuelta = new JLabel(); txtCantidadDevuelta = new JTextField(); lblPrecio = new JLabel(); txtPrecio = new JTextField(); lblCosto = new JLabel(); txtCosto = new JTextField(); lblPrecioReal = new JLabel(); txtPrecioReal = new JTextField(); lblLinea = new JLabel(); txtLinea = new JTextField(); lblPorcentajeDescuentoAgencia = new JLabel(); lblLote = new JLabel(); txtLote = new JTextField(); txtPorcentajeDescuentoAgencia = new JTextField(); lblPorcentajeDescuentosVarios = new JLabel(); txtPorcentajeDescuentosVarios = new JTextField(); scPlantilla = new JScrollPane(); tblFacturaDetalle = new JTable(); panel9 = new JPanel(); lblMotivo = new JLabel(); txtMotivo = new JTextField(); panel112 = new JPanel(); lblValorFinal = new JLabel(); txtValorFinal = new JTextField(); lblIVAFinal = new JLabel(); txtIVAFinal = new JTextField(); lblDescuentoAgenciaTotal = new JLabel(); txtDescuentoAgenciaTotal = new JTextField(); txtICEFinal = new JTextField(); lblOtroImpuestoFinal = new JLabel(); txtOtroImpuestoFinal = new JTextField(); lblICEFinal = new JLabel(); lblDescuentosVariosTotal = new JLabel(); txtDescuentosVariosTotal = new JTextField(); lblComisionAgencia = new JLabel(); txtPorcentajeComision = new JTextField(); lblPorcentajeComision = new JLabel(); lblValorComision = new JLabel(); txtValorComision = new JTextField(); lblTotalFinal = new JLabel(); txtTotalFinal = new JTextField(); CellConstraints cc = new CellConstraints(); //======== this ======== setLayout(new FormLayout("default:grow", "fill:default:grow")); //======== jtpAnularFactura ======== {// ww w .jav a2 s . c om //======== scrollPane1 ======== { //======== panel3 ======== { panel3.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //======== panel2 ======== { panel2.setBorder( new TitledBorder(null, "Tipo Documento", TitledBorder.LEADING, TitledBorder.TOP)); panel2.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(100)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- lblTipoDocumento ---- lblTipoDocumento.setText("Tipo de documento:"); panel2.add(lblTipoDocumento, cc.xywh(3, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel2.add(txtTipoDocumento, cc.xy(5, 1)); //---- rbNinguno ---- rbNinguno.setText("Ninguno"); panel2.add(rbNinguno, cc.xy(11, 1)); //---- lblDescuentoGlobal ---- lblDescuentoGlobal.setText("Descuento global [%]:"); panel2.add(lblDescuentoGlobal, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panel2.add(txtDescuentoGlobal, cc.xy(5, 3)); //---- lblTipoFactura ---- lblTipoFactura.setText("Tipo de Factura:"); panel2.add(lblTipoFactura, cc.xywh(9, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- rbPresupuesto ---- rbPresupuesto.setText("De Presupuesto"); panel2.add(rbPresupuesto, cc.xy(11, 3)); //---- rbOrdenMedios ---- rbOrdenMedios.setText("De Orden de Medios"); panel2.add(rbOrdenMedios, cc.xy(11, 5)); } panel3.add(panel2, cc.xy(1, 1)); //======== panel32 ======== { panel32.setBorder( new TitledBorder(null, "Datos de Factura", TitledBorder.LEADING, TitledBorder.TOP)); panel32.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(100)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(100)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); panel32.add(cmbFechaFactura, cc.xy(5, 1)); //---- lblFechaFactura ---- lblFechaFactura.setText("Fecha de la factura:"); panel32.add(lblFechaFactura, cc.xywh(3, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- lblFechaCreacion ---- lblFechaCreacion.setText("Fecha de creaci\u00f3n:"); panel32.add(lblFechaCreacion, cc.xywh(11, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtFechaCreacion ---- txtFechaCreacion.setHorizontalAlignment(SwingConstants.LEADING); panel32.add(txtFechaCreacion, cc.xywh(13, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblPreimpreso ---- lblPreimpreso.setText("Preimpreso:"); panel32.add(lblPreimpreso, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel32.add(txtPreimpreso, cc.xywh(5, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblMoneda ---- lblMoneda.setText("Moneda:"); panel32.add(lblMoneda, cc.xywh(11, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel32.add(txtMoneda, cc.xywh(13, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblOficina ---- lblOficina.setText("Oficina :"); panel32.add(lblOficina, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtOficinaEmpresa ---- txtOficinaEmpresa.setEditable(true); txtOficinaEmpresa.setHorizontalAlignment(SwingConstants.LEADING); panel32.add(txtOficinaEmpresa, cc.xywh(5, 5, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblCaja ---- lblCaja.setText("Caja:"); panel32.add(lblCaja, cc.xywh(11, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel32.add(txtCaja, cc.xywh(13, 5, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblFormaPago ---- lblFormaPago.setText("Forma de pago:"); panel32.add(lblFormaPago, cc.xywh(3, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel32.add(txtFormaPago, cc.xywh(5, 7, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblEstado ---- lblEstado.setText("Estado:"); panel32.add(lblEstado, cc.xywh(11, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel32.add(txtEstado, cc.xy(13, 7)); //---- lblListaPrecio ---- lblListaPrecio.setText("Lista de precios:"); panel32.add(lblListaPrecio, cc.xywh(3, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel32.add(txtListaPrecio, cc.xywh(5, 9, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); panel32.add(txtFechaVencimiento, cc.xywh(13, 9, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblFechaVencimiento ---- lblFechaVencimiento.setText("Fecha de vencimiento:"); panel32.add(lblFechaVencimiento, cc.xywh(11, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- lblObservacion ---- lblObservacion.setText("Observaci\u00f3n:"); panel32.add(lblObservacion, cc.xywh(3, 11, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel32.add(txtObservacion, cc.xywh(5, 11, 9, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); } panel3.add(panel32, cc.xy(1, 3)); //======== panel4 ======== { panel4.setBorder(new TitledBorder(null, "Datos del Cliente", TitledBorder.LEADING, TitledBorder.TOP)); panel4.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(100)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- lblCorporacion ---- lblCorporacion.setText("Corporaci\u00f3n:"); panel4.add(lblCorporacion, cc.xywh(3, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel4.add(txtCorporacion, cc.xy(5, 1)); panel4.add(btnBuscarCorporacion, cc.xywh(7, 1, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); panel4.add(btnEncerarCliente, cc.xywh(9, 1, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- lblCliente ---- lblCliente.setText("Cliente:"); panel4.add(lblCliente, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel4.add(txtCliente, cc.xy(5, 3)); panel4.add(btnBuscarCliente, cc.xywh(7, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblClienteOficina ---- lblClienteOficina.setText("Oficina del cliente:"); panel4.add(lblClienteOficina, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel4.add(txtClienteOficina, cc.xy(5, 5)); //---- lblTipoIdentificacion ---- lblTipoIdentificacion.setText("Tipo de identificaci\u00f3n:"); panel4.add(lblTipoIdentificacion, cc.xywh(3, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel4.add(txtTipodentificacion, cc.xywh(5, 7, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); panel4.add(btnBuscarClienteOficina, cc.xywh(7, 5, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- lblIdentificacion ---- lblIdentificacion.setText("Identificaci\u00f3n:"); panel4.add(lblIdentificacion, cc.xywh(13, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtIdentificacion ---- txtIdentificacion.setHorizontalAlignment(SwingConstants.RIGHT); panel4.add(txtIdentificacion, cc.xywh(15, 5, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblTelefono ---- lblTelefono.setText("Tel\u00e9fono:"); panel4.add(lblTelefono, cc.xywh(13, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtTelefono ---- txtTelefono.setHorizontalAlignment(SwingConstants.RIGHT); panel4.add(txtTelefono, cc.xywh(15, 7, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblContacto ---- lblContacto.setText("Contacto:"); panel4.add(lblContacto, cc.xywh(3, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel4.add(txtContacto, cc.xywh(5, 9, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblAutorizacionSAP ---- lblAutorizacionSAP.setText("SAP:"); panel4.add(lblAutorizacionSAP, cc.xywh(13, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtAutorizacionSAP ---- txtAutorizacionSAP.setHorizontalAlignment(SwingConstants.RIGHT); txtAutorizacionSAP.setEditable(false); panel4.add(txtAutorizacionSAP, cc.xy(15, 9)); //---- lblDireccion ---- lblDireccion.setText("Direcci\u00f3n:"); panel4.add(lblDireccion, cc.xywh(3, 11, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel4.add(txtDireccion, cc.xywh(5, 11, 11, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); } panel3.add(panel4, cc.xy(1, 5)); //======== panel5 ======== { panel5.setBorder(new TitledBorder(null, "Procedencia de la Factura", TitledBorder.LEADING, TitledBorder.TOP)); panel5.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(180)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default, 3dlu, default"))); ((FormLayout) panel5.getLayout()).setColumnGroups(new int[][] { { 5, 7 } }); //---- lblPlanMedios ---- lblPlanMedios.setText("Plan de Medios:"); panel5.add(lblPlanMedios, cc.xywh(3, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel5.add(txtPlanMedios, cc.xy(5, 1)); //---- lblPresupuesto ---- lblPresupuesto.setText("Presupuesto:"); panel5.add(lblPresupuesto, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel5.add(txtPresupuesto, cc.xy(5, 3)); } panel3.add(panel5, cc.xy(1, 7)); //======== panel6 ======== { panel6.setBorder( new TitledBorder(null, "Datos Generales", TitledBorder.LEADING, TitledBorder.TOP)); panel6.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(100)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); ((FormLayout) panel6.getLayout()).setColumnGroups(new int[][] { { 3, 9 }, { 5, 11 } }); //---- lblFacturadoPor ---- lblFacturadoPor.setText("Facturado por:"); panel6.add(lblFacturadoPor, cc.xywh(3, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel6.add(txtFacturadoPor, cc.xywh(5, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblOrigenDocumento ---- lblOrigenDocumento.setText("Origen del documento:"); panel6.add(lblOrigenDocumento, cc.xywh(9, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel6.add(txtOrigenDocumento, cc.xywh(11, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblBodega ---- lblBodega.setText("Bodega:"); panel6.add(lblBodega, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel6.add(txtBodega, cc.xywh(5, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblPuntoImpresion ---- lblPuntoImpresion.setText("Punto de impresi\u00f3n:"); panel6.add(lblPuntoImpresion, cc.xywh(9, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel6.add(txtPuntoImpresion, cc.xywh(11, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblVendedor ---- lblVendedor.setText("Vendedor:"); panel6.add(lblVendedor, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel6.add(txtVendedor, cc.xywh(5, 5, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblNumero ---- lblNumero.setText("N\u00famero:"); panel6.add(lblNumero, cc.xywh(9, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtNumero ---- txtNumero.setHorizontalAlignment(SwingConstants.LEADING); panel6.add(txtNumero, cc.xywh(11, 5, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblDirectorCuentas ---- lblDirectorCuentas.setText("Director(a):"); panel6.add(lblDirectorCuentas, cc.xywh(3, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panel6.add(txtDirectorCuentas, cc.xy(5, 7)); } panel3.add(panel6, cc.xy(1, 11)); //======== bpNegociacionPanel ======== { bpNegociacionPanel.setBorder(new LineBorder(Color.lightGray)); bpNegociacionPanel.setLayout(new BorderLayout()); //---- btnMostrarPanelNegociacion ---- btnMostrarPanelNegociacion.setText("Negociaci\u00f3n | >>"); btnMostrarPanelNegociacion.setHorizontalAlignment(SwingConstants.LEFT); bpNegociacionPanel.add(btnMostrarPanelNegociacion, BorderLayout.NORTH); //======== jpNegociacion ======== { jpNegociacion.setLayout(new FormLayout(new ColumnSpec[] { new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(30)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(130)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(10)) }, new RowSpec[] { new RowSpec(Sizes.DLUY2), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.DLUY3) })); //---- cbNegociacionDirecta ---- cbNegociacionDirecta.setText("Negociaci\u00f3n Directa"); jpNegociacion.add(cbNegociacionDirecta, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- lblPorcentajeNegociacionDirecta ---- lblPorcentajeNegociacionDirecta.setText("%:"); jpNegociacion.add(lblPorcentajeNegociacionDirecta, cc.xywh(5, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtPorcentajeNegociacionDirecta ---- txtPorcentajeNegociacionDirecta.setHorizontalAlignment(SwingConstants.RIGHT); txtPorcentajeNegociacionDirecta.setEditable(false); jpNegociacion.add(txtPorcentajeNegociacionDirecta, cc.xy(7, 3)); //---- lblDsctoCompraPorcentaje ---- lblDsctoCompraPorcentaje.setText("Descuento:"); jpNegociacion.add(lblDsctoCompraPorcentaje, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtDsctoCompraPorcentaje ---- txtDsctoCompraPorcentaje.setHorizontalAlignment(SwingConstants.RIGHT); txtDsctoCompraPorcentaje.setEditable(false); jpNegociacion.add(txtDsctoCompraPorcentaje, cc.xy(7, 5)); //---- lblClienteNegociacion ---- lblClienteNegociacion.setText("Cliente Negociaci\u00f3n:"); jpNegociacion.add(lblClienteNegociacion, cc.xywh(3, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtClienteNegociacion ---- txtClienteNegociacion.setEditable(false); jpNegociacion.add(txtClienteNegociacion, cc.xywh(5, 7, 9, 1)); jpNegociacion.add(btnBuscarClienteNegociacion, cc.xywh(15, 7, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- lblPorcentajeDescuento ---- lblPorcentajeDescuento.setText("%:"); jpNegociacion.add(lblPorcentajeDescuento, cc.xywh(5, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- cbComisionPura ---- cbComisionPura.setText("Comisi\u00f3n Pura"); jpNegociacion.add(cbComisionPura, cc.xywh(11, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); } bpNegociacionPanel.add(jpNegociacion, BorderLayout.CENTER); } panel3.add(bpNegociacionPanel, cc.xy(1, 9)); } scrollPane1.setViewportView(panel3); } jtpAnularFactura.addTab("Factura", scrollPane1); //======== scrollPane2 ======== { //======== panel11 ======== { panel11.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //======== panel8 ======== { panel8.setBorder( new TitledBorder(null, "Documento", TitledBorder.LEADING, TitledBorder.TOP)); panel8.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- lblDocumento ---- lblDocumento.setText("Documento:"); panel8.add(lblDocumento, cc.xywh(3, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); panel8.add(txtDocumento, cc.xywh(5, 1, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); } panel11.add(panel8, cc.xy(1, 1)); //======== panel10 ======== { panel10.setBorder(new TitledBorder(null, "Otra Informaci\u00f3n", TitledBorder.LEADING, TitledBorder.TOP)); panel10.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(230)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(30)), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- lblProducto ---- lblProducto.setText("C\u00f3digo del producto:"); panel10.add(lblProducto, cc.xywh(3, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- lblDescripcion ---- lblDescripcion.setText("Descripci\u00f3n:"); panel10.add(lblDescripcion, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel10.add(txtCodigoProducto, cc.xywh(5, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //======== spDescripcion ======== { //---- txtDescripcion ---- txtDescripcion.setLineWrap(true); spDescripcion.setViewportView(txtDescripcion); } panel10.add(spDescripcion, cc.xywh(5, 3, 7, 5)); //---- lblProveedor ---- lblProveedor.setText("Proveedor:"); panel10.add(lblProveedor, cc.xywh(3, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel10.add(txtProveedor, cc.xywh(5, 9, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblFacturaProveedor ---- lblFacturaProveedor.setText("Factura Proveedor:"); panel10.add(lblFacturaProveedor, cc.xywh(9, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panel10.add(txtFacturaProveedor, cc.xy(11, 9)); //---- lblCantidad ---- lblCantidad.setText("Cantidad a pedir:"); panel10.add(lblCantidad, cc.xywh(3, 11, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtCantidad ---- txtCantidad.setHorizontalAlignment(SwingConstants.RIGHT); panel10.add(txtCantidad, cc.xy(5, 11)); //---- lblCantidadDevuelta ---- lblCantidadDevuelta.setText("Cantidad devuelta:"); panel10.add(lblCantidadDevuelta, cc.xywh(9, 11, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panel10.add(txtCantidadDevuelta, cc.xy(11, 11)); //---- lblPrecio ---- lblPrecio.setText("Precio:"); panel10.add(lblPrecio, cc.xywh(3, 13, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtPrecio ---- txtPrecio.setHorizontalAlignment(SwingConstants.RIGHT); panel10.add(txtPrecio, cc.xy(5, 13)); //---- lblCosto ---- lblCosto.setText("Costo del producto:"); panel10.add(lblCosto, cc.xywh(9, 13, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtCosto ---- txtCosto.setHorizontalAlignment(SwingConstants.RIGHT); panel10.add(txtCosto, cc.xywh(11, 13, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblPrecioReal ---- lblPrecioReal.setText("Precio real:"); panel10.add(lblPrecioReal, cc.xywh(3, 15, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtPrecioReal ---- txtPrecioReal.setHorizontalAlignment(SwingConstants.RIGHT); panel10.add(txtPrecioReal, cc.xywh(5, 15, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblLinea ---- lblLinea.setText("L\u00ednea:"); panel10.add(lblLinea, cc.xywh(9, 15, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel10.add(txtLinea, cc.xywh(11, 15, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblPorcentajeDescuentoAgencia ---- lblPorcentajeDescuentoAgencia.setText("Dscto. Agencia [%]:"); panel10.add(lblPorcentajeDescuentoAgencia, cc.xywh(3, 17, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- lblLote ---- lblLote.setText("Lote:"); panel10.add(lblLote, cc.xywh(9, 17, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel10.add(txtLote, cc.xywh(11, 17, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- txtPorcentajeDescuentoAgencia ---- txtPorcentajeDescuentoAgencia.setHorizontalAlignment(SwingConstants.RIGHT); panel10.add(txtPorcentajeDescuentoAgencia, cc.xywh(5, 17, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblPorcentajeDescuentosVarios ---- lblPorcentajeDescuentosVarios.setText("Dsctos. Varios [%]:"); panel10.add(lblPorcentajeDescuentosVarios, cc.xywh(3, 19, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtPorcentajeDescuentosVarios ---- txtPorcentajeDescuentosVarios.setHorizontalAlignment(SwingConstants.RIGHT); panel10.add(txtPorcentajeDescuentosVarios, cc.xy(5, 19)); //======== scPlantilla ======== { //---- tblFacturaDetalle ---- tblFacturaDetalle.setModel( new DefaultTableModel(new Object[][] {}, new String[] { "Descripci\u00f3n", "Cantidad", "Precio Real", "Descuento", "Descuento Global", "Iva" }) { boolean[] columnEditable = new boolean[] { false, false, false, false, false, false }; @Override public boolean isCellEditable(int rowIndex, int columnIndex) { return columnEditable[columnIndex]; } }); tblFacturaDetalle.setPreferredScrollableViewportSize(new Dimension(450, 150)); tblFacturaDetalle.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); scPlantilla.setViewportView(tblFacturaDetalle); } panel10.add(scPlantilla, cc.xywh(3, 23, 9, 1)); } panel11.add(panel10, cc.xy(1, 5)); //======== panel9 ======== { panel9.setBorder( new TitledBorder(null, "Documento Aplica", TitledBorder.LEADING, TitledBorder.TOP)); panel9.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); ((FormLayout) panel9.getLayout()).setColumnGroups(new int[][] { { 3, 9 }, { 5, 11 } }); //---- lblMotivo ---- lblMotivo.setText("Motivo:"); panel9.add(lblMotivo, cc.xywh(3, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); panel9.add(txtMotivo, cc.xywh(5, 1, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); } panel11.add(panel9, cc.xy(1, 3)); //======== panel112 ======== { panel112.setBorder( new TitledBorder(null, "Totales", TitledBorder.LEADING, TitledBorder.TOP)); panel112.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(40)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(12)) }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); ((FormLayout) panel112.getLayout()).setColumnGroups(new int[][] { { 11, 17 } }); //---- lblValorFinal ---- lblValorFinal.setText("SubTotal:"); panel112.add(lblValorFinal, cc.xywh(3, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtValorFinal ---- txtValorFinal.setHorizontalAlignment(SwingConstants.RIGHT); txtValorFinal.setEditable(false); panel112.add(txtValorFinal, cc.xywh(5, 1, 7, 1)); //---- lblIVAFinal ---- lblIVAFinal.setText("IVA:"); panel112.add(lblIVAFinal, cc.xywh(15, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtIVAFinal ---- txtIVAFinal.setHorizontalAlignment(SwingConstants.RIGHT); txtIVAFinal.setEditable(false); panel112.add(txtIVAFinal, cc.xy(17, 1)); //---- lblDescuentoAgenciaTotal ---- lblDescuentoAgenciaTotal.setText("Dscto. Agencia:"); panel112.add(lblDescuentoAgenciaTotal, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtDescuentoAgenciaTotal ---- txtDescuentoAgenciaTotal.setHorizontalAlignment(SwingConstants.RIGHT); txtDescuentoAgenciaTotal.setEditable(false); panel112.add(txtDescuentoAgenciaTotal, cc.xywh(5, 3, 7, 1)); //---- txtICEFinal ---- txtICEFinal.setHorizontalAlignment(SwingConstants.RIGHT); txtICEFinal.setEditable(false); panel112.add(txtICEFinal, cc.xy(17, 3)); //---- lblOtroImpuestoFinal ---- lblOtroImpuestoFinal.setText("Otro Impuesto:"); panel112.add(lblOtroImpuestoFinal, cc.xywh(15, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtOtroImpuestoFinal ---- txtOtroImpuestoFinal.setHorizontalAlignment(SwingConstants.RIGHT); txtOtroImpuestoFinal.setEditable(false); panel112.add(txtOtroImpuestoFinal, cc.xy(17, 5)); //---- lblICEFinal ---- lblICEFinal.setText("ICE:"); panel112.add(lblICEFinal, cc.xywh(15, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- lblDescuentosVariosTotal ---- lblDescuentosVariosTotal.setText("Dsctos. Varios:"); panel112.add(lblDescuentosVariosTotal, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtDescuentosVariosTotal ---- txtDescuentosVariosTotal.setHorizontalAlignment(SwingConstants.RIGHT); txtDescuentosVariosTotal.setEditable(false); panel112.add(txtDescuentosVariosTotal, cc.xywh(5, 5, 7, 1)); //---- lblComisionAgencia ---- lblComisionAgencia.setText("Comisi\u00f3n de Agencia:"); panel112.add(lblComisionAgencia, cc.xywh(3, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtPorcentajeComision ---- txtPorcentajeComision.setHorizontalAlignment(SwingConstants.RIGHT); panel112.add(txtPorcentajeComision, cc.xy(5, 7)); //---- lblPorcentajeComision ---- lblPorcentajeComision.setText("%"); panel112.add(lblPorcentajeComision, cc.xy(7, 7)); //---- lblValorComision ---- lblValorComision.setText("Valor:"); panel112.add(lblValorComision, cc.xy(9, 7)); //---- txtValorComision ---- txtValorComision.setHorizontalAlignment(SwingConstants.RIGHT); panel112.add(txtValorComision, cc.xy(11, 7)); //---- lblTotalFinal ---- lblTotalFinal.setText("TOTAL:"); lblTotalFinal.setFont(new Font("Microsoft Sans Serif", Font.BOLD, 11)); panel112.add(lblTotalFinal, cc.xywh(15, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtTotalFinal ---- txtTotalFinal.setHorizontalAlignment(SwingConstants.RIGHT); txtTotalFinal.setFont(new Font("Microsoft Sans Serif", Font.BOLD, 11)); txtTotalFinal.setEditable(false); panel112.add(txtTotalFinal, cc.xy(17, 7)); } panel11.add(panel112, cc.xy(1, 7)); } scrollPane2.setViewportView(panel11); } jtpAnularFactura.addTab("Detalle", scrollPane2); } add(jtpAnularFactura, cc.xy(1, 1)); //---- buttonGroup1 ---- ButtonGroup buttonGroup1 = new ButtonGroup(); buttonGroup1.add(rbNinguno); buttonGroup1.add(rbPresupuesto); buttonGroup1.add(rbOrdenMedios); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:com.spirit.facturacion.gui.panel.JPFactura.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Open Source Project license - unknown jtpFactura = new JideTabbedPane(); scrollPane1 = new JScrollPane(); panel3 = new JPanel(); panel2 = new JPanel(); lblTipoDocumento = new JLabel(); txtTipoDocumento = new JTextField(); rbNinguno = new JRadioButton(); lblDescuentoGlobal = new JLabel(); txtDescuentoGlobal = new JTextField(); lblTipoFactura = new JLabel(); rbPresupuesto = new JRadioButton(); rbOrdenMedios = new JRadioButton(); panel32 = new JPanel(); cmbFechaFactura = new DateComboBox(); lblFechaFactura = new JLabel(); lblFechaCreacion = new JLabel(); txtFechaCreacion = new JTextField(); txtPreimpreso = new JTextField(); lblPreimpreso = new JLabel(); lblMoneda = new JLabel(); txtMoneda = new JTextField(); lblOficina = new JLabel(); txtOficinaEmpresa = new JTextField(); lblCaja = new JLabel(); txtCaja = new JTextField(); lblFormaPago = new JLabel(); txtFormaPago = new JTextField(); lblEstado = new JLabel(); cmbEstado = new JComboBox(); lblListaPrecio = new JLabel(); txtListaPrecio = new JTextField(); txtFechaVencimiento = new JTextField(); lblFechaVencimiento = new JLabel(); lblObservacion = new JLabel(); txtObservacion = new JTextField(); panel4 = new JPanel(); lblCorporacion = new JLabel(); txtCorporacion = new JTextField(); btnBuscarCorporacion = new JButton(); btnEncerarCliente = new JButton(); lblCliente = new JLabel(); txtCliente = new JTextField(); btnBuscarCliente = new JButton(); lblClienteOficina = new JLabel(); txtClienteOficina = new JTextField(); lblTipoIdentificacion = new JLabel(); txtTipodentificacion = new JTextField(); btnBuscarClienteOficina = new JButton(); lblIdentificacion = new JLabel(); txtIdentificacion = new JTextField(); lblTelefono = new JLabel(); txtTelefono = new JTextField(); lblContacto = new JLabel(); txtContacto = new JTextField(); lblAutorizacionSAP = new JLabel(); txtAutorizacionSAP = new JTextField(); lblDireccion = new JLabel(); txtDireccion = new JTextField(); panel5 = new JPanel(); cbMostrarReferenciaFactura = new JCheckBox(); lblPlanMedios = new JLabel(); txtPlanMedios = new JTextField(); lblPresupuesto = new JLabel(); txtPresupuesto = new JTextField(); panel6 = new JPanel(); lblFacturadoPor = new JLabel(); txtFacturadoPor = new JTextField(); lblOrigenDocumento = new JLabel(); txtOrigenDocumento = new JTextField(); lblBodega = new JLabel(); txtBodega = new JTextField(); lblPuntoImpresion = new JLabel(); txtPuntoImpresion = new JTextField(); lblVendedor = new JLabel(); txtVendedor = new JTextField(); lblNumero = new JLabel(); txtNumero = new JTextField(); lblDirectorCuentas = new JLabel(); txtDirectorCuentas = new JTextField(); bpNegociacionPanel = new JPanel(); btnMostrarPanelNegociacion = new JButton(); jpNegociacion = new JPanel(); cbNegociacionDirecta = new JCheckBox(); lblPorcentajeNegociacionDirecta = new JLabel(); txtPorcentajeNegociacionDirecta = new JTextField(); lblDsctoCompraPorcentaje = new JLabel(); txtDsctoCompraPorcentaje = new JTextField(); lblClienteNegociacion = new JLabel(); txtClienteNegociacion = new JTextField(); btnBuscarClienteNegociacion = new JButton(); lblPorcentajeDescuento = new JLabel(); cbComisionPura = new JCheckBox(); scrollPane2 = new JScrollPane(); panel11 = new JPanel(); panel8 = new JPanel(); lblDocumento = new JLabel(); txtDocumento = new JTextField(); panel10 = new JPanel(); lblProducto = new JLabel(); lblDescripcion = new JLabel(); txtCodigoProducto = new JTextField(); spDescripcion = new JScrollPane(); txtDescripcion = new JTextArea(); lblProveedor = new JLabel(); txtProveedor = new JTextField(); lblFacturaProveedor = new JLabel(); txtFacturaProveedor = new JTextField(); lblCantidad = new JLabel(); txtCantidad = new JTextField(); lblCantidadDevuelta = new JLabel(); txtCantidadDevuelta = new JTextField(); lblPrecio = new JLabel(); txtPrecio = new JTextField(); lblCosto = new JLabel(); txtCosto = new JTextField(); lblPrecioReal = new JLabel(); txtPrecioReal = new JTextField(); lblLinea = new JLabel(); txtLinea = new JTextField(); lblPorcentajeDescuentoAgencia = new JLabel(); lblLote = new JLabel(); txtLote = new JTextField(); txtPorcentajeDescuentoAgencia = new JTextField(); lblPorcentajeDescuentosVarios = new JLabel(); txtPorcentajeDescuentosVarios = new JTextField(); scPlantilla = new JScrollPane(); tblFacturaDetalle = new JTable(); panel9 = new JPanel(); lblMotivo = new JLabel(); txtMotivo = new JTextField(); panel112 = new JPanel(); lblValorFinal = new JLabel(); txtValorFinal = new JTextField(); lblIVAFinal = new JLabel(); txtIVAFinal = new JTextField(); lblDescuentoAgenciaTotal = new JLabel(); txtDescuentoAgenciaTotal = new JTextField(); txtICEFinal = new JTextField(); lblOtroImpuestoFinal = new JLabel(); txtOtroImpuestoFinal = new JTextField(); lblICEFinal = new JLabel(); lblDescuentosVariosTotal = new JLabel(); txtDescuentosVariosTotal = new JTextField(); lblComisionAgencia = new JLabel(); txtPorcentajeComision = new JTextField(); lblPorcentajeComision = new JLabel(); lblValorComision = new JLabel(); txtValorComision = new JTextField(); lblTotalFinal = new JLabel(); txtTotalFinal = new JTextField(); CellConstraints cc = new CellConstraints(); //======== this ======== setLayout(new FormLayout("default:grow", "fill:default:grow")); //======== jtpFactura ======== {/*from w ww . j a va 2 s.co m*/ //======== scrollPane1 ======== { //======== panel3 ======== { panel3.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //======== panel2 ======== { panel2.setBorder( new TitledBorder(null, "Tipo Documento", TitledBorder.LEADING, TitledBorder.TOP)); panel2.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(100)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- lblTipoDocumento ---- lblTipoDocumento.setText("Tipo de documento:"); panel2.add(lblTipoDocumento, cc.xywh(3, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel2.add(txtTipoDocumento, cc.xy(5, 1)); //---- rbNinguno ---- rbNinguno.setText("Ninguno"); panel2.add(rbNinguno, cc.xy(11, 1)); //---- lblDescuentoGlobal ---- lblDescuentoGlobal.setText("Descuento global [%]:"); panel2.add(lblDescuentoGlobal, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panel2.add(txtDescuentoGlobal, cc.xy(5, 3)); //---- lblTipoFactura ---- lblTipoFactura.setText("Tipo de Factura:"); panel2.add(lblTipoFactura, cc.xywh(9, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- rbPresupuesto ---- rbPresupuesto.setText("De Presupuesto"); panel2.add(rbPresupuesto, cc.xy(11, 3)); //---- rbOrdenMedios ---- rbOrdenMedios.setText("De Orden de Medios"); panel2.add(rbOrdenMedios, cc.xy(11, 5)); } panel3.add(panel2, cc.xy(1, 1)); //======== panel32 ======== { panel32.setBorder( new TitledBorder(null, "Datos de Factura", TitledBorder.LEADING, TitledBorder.TOP)); panel32.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(100)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(100)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); panel32.add(cmbFechaFactura, cc.xy(5, 1)); //---- lblFechaFactura ---- lblFechaFactura.setText("Fecha de la factura:"); panel32.add(lblFechaFactura, cc.xywh(3, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- lblFechaCreacion ---- lblFechaCreacion.setText("Fecha de creaci\u00f3n:"); panel32.add(lblFechaCreacion, cc.xywh(11, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtFechaCreacion ---- txtFechaCreacion.setHorizontalAlignment(SwingConstants.LEADING); panel32.add(txtFechaCreacion, cc.xywh(13, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); panel32.add(txtPreimpreso, cc.xywh(5, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblPreimpreso ---- lblPreimpreso.setText("Preimpreso:"); panel32.add(lblPreimpreso, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- lblMoneda ---- lblMoneda.setText("Moneda:"); panel32.add(lblMoneda, cc.xywh(11, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel32.add(txtMoneda, cc.xywh(13, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblOficina ---- lblOficina.setText("Oficina :"); panel32.add(lblOficina, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtOficinaEmpresa ---- txtOficinaEmpresa.setEditable(true); txtOficinaEmpresa.setHorizontalAlignment(SwingConstants.LEADING); panel32.add(txtOficinaEmpresa, cc.xywh(5, 5, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblCaja ---- lblCaja.setText("Caja:"); panel32.add(lblCaja, cc.xywh(11, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel32.add(txtCaja, cc.xywh(13, 5, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblFormaPago ---- lblFormaPago.setText("Forma de pago:"); panel32.add(lblFormaPago, cc.xywh(3, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel32.add(txtFormaPago, cc.xywh(5, 7, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblEstado ---- lblEstado.setText("Estado:"); panel32.add(lblEstado, cc.xywh(11, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- cmbEstado ---- cmbEstado.setModel(new DefaultComboBoxModel( new String[] { "PENDIENTE", "COMPLETO", "INCOMPLETO", "ANULADO" })); panel32.add(cmbEstado, cc.xy(13, 7)); //---- lblListaPrecio ---- lblListaPrecio.setText("Lista de precios:"); panel32.add(lblListaPrecio, cc.xywh(3, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel32.add(txtListaPrecio, cc.xywh(5, 9, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); panel32.add(txtFechaVencimiento, cc.xywh(13, 9, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblFechaVencimiento ---- lblFechaVencimiento.setText("Fecha de vencimiento:"); panel32.add(lblFechaVencimiento, cc.xywh(11, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- lblObservacion ---- lblObservacion.setText("Observaci\u00f3n:"); panel32.add(lblObservacion, cc.xywh(3, 11, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel32.add(txtObservacion, cc.xywh(5, 11, 9, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); } panel3.add(panel32, cc.xy(1, 3)); //======== panel4 ======== { panel4.setBorder(new TitledBorder(null, "Datos del Cliente", TitledBorder.LEADING, TitledBorder.TOP)); panel4.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(100)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- lblCorporacion ---- lblCorporacion.setText("Corporaci\u00f3n:"); panel4.add(lblCorporacion, cc.xywh(3, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel4.add(txtCorporacion, cc.xy(5, 1)); panel4.add(btnBuscarCorporacion, cc.xywh(7, 1, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); panel4.add(btnEncerarCliente, cc.xywh(9, 1, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- lblCliente ---- lblCliente.setText("Cliente:"); panel4.add(lblCliente, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel4.add(txtCliente, cc.xy(5, 3)); panel4.add(btnBuscarCliente, cc.xywh(7, 3, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- lblClienteOficina ---- lblClienteOficina.setText("Oficina del cliente:"); panel4.add(lblClienteOficina, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel4.add(txtClienteOficina, cc.xy(5, 5)); //---- lblTipoIdentificacion ---- lblTipoIdentificacion.setText("Tipo de identificaci\u00f3n:"); panel4.add(lblTipoIdentificacion, cc.xywh(3, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel4.add(txtTipodentificacion, cc.xywh(5, 7, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); panel4.add(btnBuscarClienteOficina, cc.xywh(7, 5, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- lblIdentificacion ---- lblIdentificacion.setText("Identificaci\u00f3n:"); panel4.add(lblIdentificacion, cc.xywh(13, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtIdentificacion ---- txtIdentificacion.setHorizontalAlignment(SwingConstants.RIGHT); panel4.add(txtIdentificacion, cc.xywh(15, 5, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblTelefono ---- lblTelefono.setText("Tel\u00e9fono:"); panel4.add(lblTelefono, cc.xywh(13, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtTelefono ---- txtTelefono.setHorizontalAlignment(SwingConstants.RIGHT); panel4.add(txtTelefono, cc.xywh(15, 7, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblContacto ---- lblContacto.setText("Contacto:"); panel4.add(lblContacto, cc.xywh(3, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel4.add(txtContacto, cc.xywh(5, 9, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblAutorizacionSAP ---- lblAutorizacionSAP.setText("SAP:"); panel4.add(lblAutorizacionSAP, cc.xywh(13, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtAutorizacionSAP ---- txtAutorizacionSAP.setHorizontalAlignment(SwingConstants.RIGHT); txtAutorizacionSAP.setEditable(false); panel4.add(txtAutorizacionSAP, cc.xy(15, 9)); //---- lblDireccion ---- lblDireccion.setText("Direcci\u00f3n:"); panel4.add(lblDireccion, cc.xywh(3, 11, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel4.add(txtDireccion, cc.xywh(5, 11, 11, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); } panel3.add(panel4, cc.xy(1, 5)); //======== panel5 ======== { panel5.setBorder(new TitledBorder(null, "Procedencia de la Factura", TitledBorder.LEADING, TitledBorder.TOP)); panel5.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(180)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default, default, 3dlu, default"))); ((FormLayout) panel5.getLayout()).setColumnGroups(new int[][] { { 5, 7 } }); //---- cbMostrarReferenciaFactura ---- cbMostrarReferenciaFactura.setText("Mostrar Referencia en Factura"); panel5.add(cbMostrarReferenciaFactura, cc.xywh(3, 1, 3, 1)); //---- lblPlanMedios ---- lblPlanMedios.setText("Plan de Medios:"); panel5.add(lblPlanMedios, cc.xywh(3, 2, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel5.add(txtPlanMedios, cc.xy(5, 2)); //---- lblPresupuesto ---- lblPresupuesto.setText("Presupuesto:"); panel5.add(lblPresupuesto, cc.xywh(3, 4, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel5.add(txtPresupuesto, cc.xy(5, 4)); } panel3.add(panel5, cc.xy(1, 7)); //======== panel6 ======== { panel6.setBorder( new TitledBorder(null, "Datos Generales", TitledBorder.LEADING, TitledBorder.TOP)); panel6.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(100)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); ((FormLayout) panel6.getLayout()).setColumnGroups(new int[][] { { 3, 9 }, { 5, 11 } }); //---- lblFacturadoPor ---- lblFacturadoPor.setText("Facturado por:"); panel6.add(lblFacturadoPor, cc.xywh(3, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel6.add(txtFacturadoPor, cc.xywh(5, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblOrigenDocumento ---- lblOrigenDocumento.setText("Origen del documento:"); panel6.add(lblOrigenDocumento, cc.xywh(9, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel6.add(txtOrigenDocumento, cc.xywh(11, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblBodega ---- lblBodega.setText("Bodega:"); panel6.add(lblBodega, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel6.add(txtBodega, cc.xywh(5, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblPuntoImpresion ---- lblPuntoImpresion.setText("Punto de impresi\u00f3n:"); panel6.add(lblPuntoImpresion, cc.xywh(9, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel6.add(txtPuntoImpresion, cc.xywh(11, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblVendedor ---- lblVendedor.setText("Vendedor:"); panel6.add(lblVendedor, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel6.add(txtVendedor, cc.xywh(5, 5, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblNumero ---- lblNumero.setText("N\u00famero:"); panel6.add(lblNumero, cc.xywh(9, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtNumero ---- txtNumero.setHorizontalAlignment(SwingConstants.LEADING); panel6.add(txtNumero, cc.xywh(11, 5, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblDirectorCuentas ---- lblDirectorCuentas.setText("Director(a):"); panel6.add(lblDirectorCuentas, cc.xywh(3, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panel6.add(txtDirectorCuentas, cc.xy(5, 7)); } panel3.add(panel6, cc.xy(1, 11)); //======== bpNegociacionPanel ======== { bpNegociacionPanel.setBorder(new LineBorder(Color.lightGray)); bpNegociacionPanel.setLayout(new BorderLayout()); //---- btnMostrarPanelNegociacion ---- btnMostrarPanelNegociacion.setText("Negociaci\u00f3n | >>"); btnMostrarPanelNegociacion.setHorizontalAlignment(SwingConstants.LEFT); bpNegociacionPanel.add(btnMostrarPanelNegociacion, BorderLayout.NORTH); //======== jpNegociacion ======== { jpNegociacion.setLayout(new FormLayout(new ColumnSpec[] { new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(30)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(130)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(10)) }, new RowSpec[] { new RowSpec(Sizes.DLUY2), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.DLUY3) })); //---- cbNegociacionDirecta ---- cbNegociacionDirecta.setText("Negociaci\u00f3n Directa"); jpNegociacion.add(cbNegociacionDirecta, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- lblPorcentajeNegociacionDirecta ---- lblPorcentajeNegociacionDirecta.setText("%:"); jpNegociacion.add(lblPorcentajeNegociacionDirecta, cc.xywh(5, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtPorcentajeNegociacionDirecta ---- txtPorcentajeNegociacionDirecta.setHorizontalAlignment(SwingConstants.RIGHT); txtPorcentajeNegociacionDirecta.setEditable(false); jpNegociacion.add(txtPorcentajeNegociacionDirecta, cc.xy(7, 3)); //---- lblDsctoCompraPorcentaje ---- lblDsctoCompraPorcentaje.setText("Descuento:"); jpNegociacion.add(lblDsctoCompraPorcentaje, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtDsctoCompraPorcentaje ---- txtDsctoCompraPorcentaje.setHorizontalAlignment(SwingConstants.RIGHT); txtDsctoCompraPorcentaje.setEditable(false); jpNegociacion.add(txtDsctoCompraPorcentaje, cc.xy(7, 5)); //---- lblClienteNegociacion ---- lblClienteNegociacion.setText("Cliente Negociaci\u00f3n:"); jpNegociacion.add(lblClienteNegociacion, cc.xywh(3, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtClienteNegociacion ---- txtClienteNegociacion.setEditable(false); jpNegociacion.add(txtClienteNegociacion, cc.xywh(5, 7, 9, 1)); jpNegociacion.add(btnBuscarClienteNegociacion, cc.xywh(15, 7, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- lblPorcentajeDescuento ---- lblPorcentajeDescuento.setText("%:"); jpNegociacion.add(lblPorcentajeDescuento, cc.xywh(5, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- cbComisionPura ---- cbComisionPura.setText("Comisi\u00f3n Pura"); jpNegociacion.add(cbComisionPura, cc.xywh(11, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); } bpNegociacionPanel.add(jpNegociacion, BorderLayout.CENTER); } panel3.add(bpNegociacionPanel, cc.xy(1, 9)); } scrollPane1.setViewportView(panel3); } jtpFactura.addTab("Factura", scrollPane1); //======== scrollPane2 ======== { //======== panel11 ======== { panel11.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //======== panel8 ======== { panel8.setBorder( new TitledBorder(null, "Documento", TitledBorder.LEADING, TitledBorder.TOP)); panel8.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- lblDocumento ---- lblDocumento.setText("Documento:"); panel8.add(lblDocumento, cc.xywh(3, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); panel8.add(txtDocumento, cc.xywh(5, 1, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); } panel11.add(panel8, cc.xy(1, 1)); //======== panel10 ======== { panel10.setBorder(new TitledBorder(null, "Otra Informaci\u00f3n", TitledBorder.LEADING, TitledBorder.TOP)); panel10.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(230)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(30)), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- lblProducto ---- lblProducto.setText("C\u00f3digo del producto:"); panel10.add(lblProducto, cc.xywh(3, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- lblDescripcion ---- lblDescripcion.setText("Descripci\u00f3n:"); panel10.add(lblDescripcion, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel10.add(txtCodigoProducto, cc.xywh(5, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //======== spDescripcion ======== { //---- txtDescripcion ---- txtDescripcion.setLineWrap(true); spDescripcion.setViewportView(txtDescripcion); } panel10.add(spDescripcion, cc.xywh(5, 3, 7, 5)); //---- lblProveedor ---- lblProveedor.setText("Proveedor:"); panel10.add(lblProveedor, cc.xywh(3, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel10.add(txtProveedor, cc.xywh(5, 9, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblFacturaProveedor ---- lblFacturaProveedor.setText("Factura Proveedor:"); panel10.add(lblFacturaProveedor, cc.xywh(9, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panel10.add(txtFacturaProveedor, cc.xy(11, 9)); //---- lblCantidad ---- lblCantidad.setText("Cantidad a pedir:"); panel10.add(lblCantidad, cc.xywh(3, 11, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtCantidad ---- txtCantidad.setHorizontalAlignment(SwingConstants.RIGHT); panel10.add(txtCantidad, cc.xy(5, 11)); //---- lblCantidadDevuelta ---- lblCantidadDevuelta.setText("Cantidad devuelta:"); panel10.add(lblCantidadDevuelta, cc.xywh(9, 11, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtCantidadDevuelta ---- txtCantidadDevuelta.setHorizontalAlignment(SwingConstants.RIGHT); panel10.add(txtCantidadDevuelta, cc.xy(11, 11)); //---- lblPrecio ---- lblPrecio.setText("Precio:"); panel10.add(lblPrecio, cc.xywh(3, 13, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtPrecio ---- txtPrecio.setHorizontalAlignment(SwingConstants.RIGHT); panel10.add(txtPrecio, cc.xy(5, 13)); //---- lblCosto ---- lblCosto.setText("Costo del producto:"); panel10.add(lblCosto, cc.xywh(9, 13, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtCosto ---- txtCosto.setHorizontalAlignment(SwingConstants.RIGHT); panel10.add(txtCosto, cc.xywh(11, 13, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblPrecioReal ---- lblPrecioReal.setText("Precio real:"); panel10.add(lblPrecioReal, cc.xywh(3, 15, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtPrecioReal ---- txtPrecioReal.setHorizontalAlignment(SwingConstants.RIGHT); panel10.add(txtPrecioReal, cc.xywh(5, 15, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblLinea ---- lblLinea.setText("L\u00ednea:"); panel10.add(lblLinea, cc.xywh(9, 15, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel10.add(txtLinea, cc.xywh(11, 15, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblPorcentajeDescuentoAgencia ---- lblPorcentajeDescuentoAgencia.setText("Dscto. Agencia [%]:"); panel10.add(lblPorcentajeDescuentoAgencia, cc.xywh(3, 17, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- lblLote ---- lblLote.setText("Lote:"); panel10.add(lblLote, cc.xywh(9, 17, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel10.add(txtLote, cc.xywh(11, 17, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- txtPorcentajeDescuentoAgencia ---- txtPorcentajeDescuentoAgencia.setHorizontalAlignment(SwingConstants.RIGHT); panel10.add(txtPorcentajeDescuentoAgencia, cc.xywh(5, 17, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblPorcentajeDescuentosVarios ---- lblPorcentajeDescuentosVarios.setText("Dsctos. Varios [%]:"); panel10.add(lblPorcentajeDescuentosVarios, cc.xywh(3, 19, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtPorcentajeDescuentosVarios ---- txtPorcentajeDescuentosVarios.setHorizontalAlignment(SwingConstants.RIGHT); panel10.add(txtPorcentajeDescuentosVarios, cc.xy(5, 19)); //======== scPlantilla ======== { //---- tblFacturaDetalle ---- tblFacturaDetalle.setModel(new DefaultTableModel(new Object[][] {}, new String[] { "Descripci\u00f3n", "Cantidad", "Precio Real", "Dscto. Agencia", "Descuento Global", "Iva", "Dctos. Varios" }) { boolean[] columnEditable = new boolean[] { false, false, false, false, false, false, false }; @Override public boolean isCellEditable(int rowIndex, int columnIndex) { return columnEditable[columnIndex]; } }); tblFacturaDetalle.setPreferredScrollableViewportSize(new Dimension(450, 150)); tblFacturaDetalle.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); scPlantilla.setViewportView(tblFacturaDetalle); } panel10.add(scPlantilla, cc.xywh(3, 23, 9, 1)); } panel11.add(panel10, cc.xy(1, 5)); //======== panel9 ======== { panel9.setBorder( new TitledBorder(null, "Documento Aplica", TitledBorder.LEADING, TitledBorder.TOP)); panel9.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); ((FormLayout) panel9.getLayout()).setColumnGroups(new int[][] { { 3, 9 }, { 5, 11 } }); //---- lblMotivo ---- lblMotivo.setText("Motivo:"); panel9.add(lblMotivo, cc.xywh(3, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); panel9.add(txtMotivo, cc.xywh(5, 1, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); } panel11.add(panel9, cc.xy(1, 3)); //======== panel112 ======== { panel112.setBorder( new TitledBorder(null, "Totales", TitledBorder.LEADING, TitledBorder.TOP)); panel112.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(40)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(12)) }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); ((FormLayout) panel112.getLayout()).setColumnGroups(new int[][] { { 11, 17 } }); //---- lblValorFinal ---- lblValorFinal.setText("SubTotal:"); panel112.add(lblValorFinal, cc.xywh(3, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtValorFinal ---- txtValorFinal.setHorizontalAlignment(SwingConstants.RIGHT); txtValorFinal.setEditable(false); panel112.add(txtValorFinal, cc.xywh(5, 1, 7, 1)); //---- lblIVAFinal ---- lblIVAFinal.setText("IVA:"); panel112.add(lblIVAFinal, cc.xywh(15, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtIVAFinal ---- txtIVAFinal.setHorizontalAlignment(SwingConstants.RIGHT); txtIVAFinal.setEditable(false); panel112.add(txtIVAFinal, cc.xy(17, 1)); //---- lblDescuentoAgenciaTotal ---- lblDescuentoAgenciaTotal.setText("Dscto. Agencia:"); panel112.add(lblDescuentoAgenciaTotal, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtDescuentoAgenciaTotal ---- txtDescuentoAgenciaTotal.setHorizontalAlignment(SwingConstants.RIGHT); txtDescuentoAgenciaTotal.setEditable(false); panel112.add(txtDescuentoAgenciaTotal, cc.xywh(5, 3, 7, 1)); //---- txtICEFinal ---- txtICEFinal.setHorizontalAlignment(SwingConstants.RIGHT); txtICEFinal.setEditable(false); panel112.add(txtICEFinal, cc.xy(17, 3)); //---- lblOtroImpuestoFinal ---- lblOtroImpuestoFinal.setText("Otro Impuesto:"); panel112.add(lblOtroImpuestoFinal, cc.xywh(15, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtOtroImpuestoFinal ---- txtOtroImpuestoFinal.setHorizontalAlignment(SwingConstants.RIGHT); txtOtroImpuestoFinal.setEditable(false); panel112.add(txtOtroImpuestoFinal, cc.xy(17, 5)); //---- lblICEFinal ---- lblICEFinal.setText("ICE:"); panel112.add(lblICEFinal, cc.xywh(15, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- lblDescuentosVariosTotal ---- lblDescuentosVariosTotal.setText("Dsctos. Varios:"); panel112.add(lblDescuentosVariosTotal, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtDescuentosVariosTotal ---- txtDescuentosVariosTotal.setHorizontalAlignment(SwingConstants.RIGHT); txtDescuentosVariosTotal.setEditable(false); panel112.add(txtDescuentosVariosTotal, cc.xywh(5, 5, 7, 1)); //---- lblComisionAgencia ---- lblComisionAgencia.setText("Comisi\u00f3n de Agencia:"); panel112.add(lblComisionAgencia, cc.xywh(3, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtPorcentajeComision ---- txtPorcentajeComision.setHorizontalAlignment(SwingConstants.RIGHT); panel112.add(txtPorcentajeComision, cc.xy(5, 7)); //---- lblPorcentajeComision ---- lblPorcentajeComision.setText("%"); panel112.add(lblPorcentajeComision, cc.xy(7, 7)); //---- lblValorComision ---- lblValorComision.setText("Valor:"); panel112.add(lblValorComision, cc.xywh(9, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtValorComision ---- txtValorComision.setHorizontalAlignment(SwingConstants.RIGHT); panel112.add(txtValorComision, cc.xy(11, 7)); //---- lblTotalFinal ---- lblTotalFinal.setText("TOTAL:"); lblTotalFinal.setFont(new Font("Microsoft Sans Serif", Font.BOLD, 11)); panel112.add(lblTotalFinal, cc.xywh(15, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtTotalFinal ---- txtTotalFinal.setHorizontalAlignment(SwingConstants.RIGHT); txtTotalFinal.setFont(new Font("Microsoft Sans Serif", Font.BOLD, 11)); txtTotalFinal.setEditable(false); panel112.add(txtTotalFinal, cc.xy(17, 7)); } panel11.add(panel112, cc.xy(1, 7)); } scrollPane2.setViewportView(panel11); } jtpFactura.addTab("Detalle", scrollPane2); } add(jtpFactura, cc.xy(1, 1)); //---- buttonGroup1 ---- ButtonGroup buttonGroup1 = new ButtonGroup(); buttonGroup1.add(rbNinguno); buttonGroup1.add(rbPresupuesto); buttonGroup1.add(rbOrdenMedios); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:com.spirit.facturacion.gui.panel.JPPedido.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Open Source Project license - unknown jtpPedido = new JideTabbedPane(); scrollPane1 = new JScrollPane(); panel3 = new JPanel(); panel2 = new JPanel(); lblTipoDocumento = new JLabel(); cmbTipoDocumento = new JComboBox(); lblGenerarFactura = new JLabel(); btnGenerarFactura = new JButton(); lblInformacionPedido = new JLabel(); btnInformacionEnvio = new JButton(); panel32 = new JPanel(); cmbFechaPedido = new DateComboBox(); lblFechaPedido = new JLabel(); lblFechaVencimiento = new JLabel(); cmbFechaVencimiento = new DateComboBox(); lblMoneda = new JLabel(); cmbMoneda = new JComboBox(); lblCodigo = new JLabel(); txtCodigo = new JTextField(); lblCaja = new JLabel(); cmbCaja = new JComboBox(); lblOficina = new JLabel(); cmbOficinaEmpresa = new JComboBox(); lblEstado = new JLabel(); cmbEstado = new JComboBox(); panel4 = new JPanel(); lblCorporacion = new JLabel(); txtCorporacion = new JTextField(); btnEncerarCliente = new JButton(); btnBuscarCorporacion = new JButton(); lblTipoIdentificacion = new JLabel(); cmbTipoIdentificacion = new JComboBox(); lblCliente = new JLabel(); txtCliente = new JTextField(); btnBuscarCliente = new JButton(); btnNuevoCliente = new JButton(); lblIdentificacion = new JLabel(); txtIdentificacion = new JTextField(); lblClienteOficina = new JLabel(); txtClienteOficina = new JTextField(); lblTelefono = new JLabel(); txtTelefono = new JTextField(); txtContacto = new JTextField(); btnBuscarClienteOficina = new JButton(); lblTipoReferencia = new JLabel(); cmbTipoReferencia = new JComboBox(); cbMostrarReferenciaFactura = new JCheckBox(); lblEscojaReferencia = new JLabel(); txtEscojaReferencia = new JTextField(); btnEscojaReferencia = new JButton(); cbMultipleFacturacion = new JCheckBox(); lblAutorizacionSAP = new JLabel(); txtAutorizacionSAP = new JTextField(); lblArchivoAdjunto = new JLabel(); txtArchivoAdjunto = new JTextField(); btnVerArchivoAdjunto = new JButton(); lblReferencia = new JLabel(); txtReferencia = new JTextField(); lblContacto = new JLabel(); lblDireccion = new JLabel(); txtDireccion = new JTextField(); lblInformacionAdc = new JLabel(); txtInformacionAdc = new JTextField(); bpNegociacionPanel = new JPanel(); btnMostrarPanelNegociacion = new JButton(); jpNegociacion = new JPanel(); cbNegociacionDirecta = new JCheckBox(); lblPorcentajeNegociacionDirecta = new JLabel(); txtPorcentajeNegociacionDirecta = new JTextField(); lblDsctoCompraPorcentaje = new JLabel(); txtDsctoCompraPorcentaje = new JTextField(); lblClienteNegociacion = new JLabel(); txtClienteNegociacion = new JTextField(); btnBuscarClienteNegociacion = new JButton(); lblPorcentajeDescuento = new JLabel(); cbComisionPura = new JCheckBox(); panel6 = new JPanel(); lblObservacion = new JLabel(); txtObservacion = new JTextField(); lblListaPrecio = new JLabel(); cmbListaPrecio = new JComboBox(); lblDiasValidez = new JLabel(); txtDiasValidez = new JTextField(); lblFormaPago = new JLabel(); cmbFormaPago = new JComboBox(); lblPuntoImpresion = new JLabel(); txtPuntoImpresion = new JTextField(); lblVendedor = new JLabel(); cmbVendedor = new JComboBox(); lblBodega = new JLabel(); cmbBodega = new JComboBox(); lblDirectorCuentas = new JLabel(); cmbDirectorCuentas = new JComboBox(); lblOrigenDocumento = new JLabel(); cmbOrigenDocumento = new JComboBox(); lblFundacion = new JLabel(); cmbFundacion = new JComboBox(); scrollPane2 = new JScrollPane(); panel11 = new JPanel(); panel8 = new JPanel(); lblDocumento = new JLabel(); lblMotivo = new JLabel(); cmbMotivo = new JComboBox(); cmbDocumento = new JComboBox(); panel10 = new JPanel(); scPlantilla = new JScrollPane(); tblPedidoDetalle = new JTable(); lblCodigoProducto = new JLabel(); btnBuscarProducto = new JButton(); txtCodigoProducto = new JTextField(); lblDescripcion = new JLabel(); spDescripcion = new JScrollPane(); txtDescripcion = new JTextArea(); lblCantidad = new JLabel(); txtCantidadPedida = new JTextField(); lblCantidadPedida = new JLabel(); txtCantidad = new JTextField(); lblPrecio = new JLabel(); txtPrecio = new JTextField(); lblProveedor = new JLabel(); txtProveedor = new JTextField(); lblPrecioReal = new JLabel(); txtPrecioReal = new JTextField(); lblFacturaProveedor = new JLabel(); txtFacturaProveedor = new JTextField(); btnFacturaProveedor = new JButton(); lblPorcentajeDescuentoAgencia = new JLabel(); txtPorcentajeDescuentoAgencia = new JTextField(); lblLinea = new JLabel(); txtLinea = new JTextField(); lblPorcentajeDescuentosVarios = new JLabel(); txtPorcentajeDescuentosVarios = new JTextField(); lblLote = new JLabel(); cmbLote = new JComboBox(); panel1 = new JPanel(); btnAgregarDetalle = new JButton(); btnActualizarDetalle = new JButton(); btnEliminarDetalle = new JButton(); panel7 = new JPanel(); rbDescuentoGlobalPorcentaje = new JRadioButton(); txtDescuentoGlobalPorcentaje = new JTextField(); rbDescuentoGlobalValor = new JRadioButton(); txtDescuentoGlobalValor = new JTextField(); btnActualizarTotales = new JButton(); panel112 = new JPanel(); lblValorFinal = new JLabel(); txtValorFinal = new JTextField(); txtIVAFinal = new JTextField(); lblIVAFinal = new JLabel(); lblDescuentoFinal = new JLabel(); txtDescuentoFinal = new JTextField(); lblICEFinal = new JLabel(); txtICEFinal = new JTextField(); lblDescuentosVariosTotal = new JLabel(); txtDescuentosVariosTotal = new JTextField(); lblOtroImpuestoFinal = new JLabel(); txtOtroImpuestoFinal = new JTextField(); lblComisionAgencia = new JLabel(); txtPorcentajeComision = new JTextField(); lblValorComision = new JLabel(); txtValorComision = new JTextField(); lblTotalFinal = new JLabel(); txtTotalFinal = new JTextField(); spPresupuesto = new JScrollPane(); panelPresupuesto = new JPanel(); lblProveedorP = new JLabel(); txtProveedorP = new JTextField(); lblProductoP = new JLabel(); txtProductoP = new JTextField(); lblConceptoPresupuestoDetalleP = new JLabel(); spConceptoPresupuestoDetalleP = new JScrollPane(); txtConceptoPresupuestoDetalleP = new JTextArea(); lblPrecioVentaP = new JLabel(); txtPrecioVentaP = new JTextField(); txtCantidadP = new JTextField(); lblCantidadP = new JLabel(); panel13 = new JPanel(); btnAgregarDetalleP = new JButton(); btnActualizarDetalleP = new JButton(); btnEliminarDetalleP = new JButton(); scPresupuestoDetalleP = new JScrollPane(); tblPresupuestoDetalleP = new JTable(); CellConstraints cc = new CellConstraints(); //======== this ======== setName("Pedido"); setLayout(new FormLayout("default:grow", "fill:default:grow")); //======== jtpPedido ======== {/* w ww . j a v a 2 s. c o m*/ //======== scrollPane1 ======== { //======== panel3 ======== { panel3.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //======== panel2 ======== { panel2.setBorder(new TitledBorder(null, "Tipo de Documento", TitledBorder.LEADING, TitledBorder.TOP)); panel2.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(140)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(50)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.CENTER, Sizes.dluX(50), FormSpec.NO_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- lblTipoDocumento ---- lblTipoDocumento.setText("Tipo de documento:"); panel2.add(lblTipoDocumento, cc.xywh(3, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel2.add(cmbTipoDocumento, cc.xy(5, 1)); //---- lblGenerarFactura ---- lblGenerarFactura.setText("Generar factura:"); panel2.add(lblGenerarFactura, cc.xywh(9, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel2.add(btnGenerarFactura, cc.xywh(11, 1, 1, 1, CellConstraints.CENTER, CellConstraints.FILL)); //---- lblInformacionPedido ---- lblInformacionPedido.setText("Informaci\u00f3n de Envio:"); panel2.add(lblInformacionPedido, cc.xy(13, 1)); //---- btnInformacionEnvio ---- btnInformacionEnvio.setText(" "); panel2.add(btnInformacionEnvio, cc.xy(15, 1)); } panel3.add(panel2, cc.xy(1, 1)); //======== panel32 ======== { panel32.setBorder( new TitledBorder(null, "Datos Generales", TitledBorder.LEADING, TitledBorder.TOP)); panel32.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(100)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(100)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(100)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); panel32.add(cmbFechaPedido, cc.xy(5, 1)); //---- lblFechaPedido ---- lblFechaPedido.setText("Fecha del pedido:"); panel32.add(lblFechaPedido, cc.xywh(3, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- lblFechaVencimiento ---- lblFechaVencimiento.setText("Fecha de Vencimiento:"); panel32.add(lblFechaVencimiento, cc.xy(9, 1)); panel32.add(cmbFechaVencimiento, cc.xy(11, 1)); //---- lblMoneda ---- lblMoneda.setText("Moneda:"); panel32.add(lblMoneda, cc.xywh(15, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel32.add(cmbMoneda, cc.xy(17, 1)); //---- lblCodigo ---- lblCodigo.setText("C\u00f3digo:"); panel32.add(lblCodigo, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtCodigo ---- txtCodigo.setHorizontalAlignment(SwingConstants.LEADING); panel32.add(txtCodigo, cc.xy(5, 3)); //---- lblCaja ---- lblCaja.setText("Caja:"); panel32.add(lblCaja, cc.xywh(15, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel32.add(cmbCaja, cc.xy(17, 3)); //---- lblOficina ---- lblOficina.setText("Oficina :"); panel32.add(lblOficina, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel32.add(cmbOficinaEmpresa, cc.xywh(5, 5, 7, 1)); //---- lblEstado ---- lblEstado.setText("Estado:"); panel32.add(lblEstado, cc.xywh(15, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panel32.add(cmbEstado, cc.xy(17, 5)); } panel3.add(panel32, cc.xy(1, 3)); //======== panel4 ======== { panel4.setBorder(new TitledBorder(null, "Datos del Cliente", TitledBorder.LEADING, TitledBorder.TOP)); panel4.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(100)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(95)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- lblCorporacion ---- lblCorporacion.setText("Corporaci\u00f3n:"); panel4.add(lblCorporacion, cc.xywh(3, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel4.add(txtCorporacion, cc.xywh(5, 1, 3, 1)); panel4.add(btnEncerarCliente, cc.xywh(11, 1, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); panel4.add(btnBuscarCorporacion, cc.xywh(9, 1, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- lblTipoIdentificacion ---- lblTipoIdentificacion.setText("Tipo de identificaci\u00f3n:"); panel4.add(lblTipoIdentificacion, cc.xywh(15, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel4.add(cmbTipoIdentificacion, cc.xy(17, 1)); //---- lblCliente ---- lblCliente.setText("Cliente:"); panel4.add(lblCliente, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel4.add(txtCliente, cc.xywh(5, 3, 3, 1)); panel4.add(btnBuscarCliente, cc.xywh(9, 3, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); panel4.add(btnNuevoCliente, cc.xywh(11, 3, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- lblIdentificacion ---- lblIdentificacion.setText("Identificaci\u00f3n:"); panel4.add(lblIdentificacion, cc.xywh(15, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel4.add(txtIdentificacion, cc.xywh(17, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblClienteOficina ---- lblClienteOficina.setText("Oficina del cliente:"); panel4.add(lblClienteOficina, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel4.add(txtClienteOficina, cc.xywh(5, 5, 3, 1)); //---- lblTelefono ---- lblTelefono.setText("Tel\u00e9fono:"); panel4.add(lblTelefono, cc.xywh(15, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel4.add(txtTelefono, cc.xy(17, 5)); panel4.add(txtContacto, cc.xywh(5, 14, 3, 1)); panel4.add(btnBuscarClienteOficina, cc.xywh(9, 5, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- lblTipoReferencia ---- lblTipoReferencia.setText("Tipo de referencia:"); panel4.add(lblTipoReferencia, cc.xywh(3, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel4.add(cmbTipoReferencia, cc.xy(5, 7)); //---- cbMostrarReferenciaFactura ---- cbMostrarReferenciaFactura.setText("Mostrar Referencia en Factura"); panel4.add(cbMostrarReferenciaFactura, cc.xywh(7, 7, 3, 1)); //---- lblEscojaReferencia ---- lblEscojaReferencia.setText("Escoja referencia:"); panel4.add(lblEscojaReferencia, cc.xywh(3, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel4.add(txtEscojaReferencia, cc.xywh(5, 9, 3, 1)); panel4.add(btnEscojaReferencia, cc.xywh(9, 9, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- cbMultipleFacturacion ---- cbMultipleFacturacion.setText("M\u00faltiple"); panel4.add(cbMultipleFacturacion, cc.xywh(11, 9, 3, 1)); //---- lblAutorizacionSAP ---- lblAutorizacionSAP.setText("SAP:"); panel4.add(lblAutorizacionSAP, cc.xywh(15, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtAutorizacionSAP ---- txtAutorizacionSAP.setHorizontalAlignment(SwingConstants.RIGHT); panel4.add(txtAutorizacionSAP, cc.xywh(17, 9, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- lblArchivoAdjunto ---- lblArchivoAdjunto.setText("Archivo Adjunto:"); panel4.add(lblArchivoAdjunto, cc.xywh(3, 10, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panel4.add(txtArchivoAdjunto, cc.xywh(5, 10, 3, 1)); panel4.add(btnVerArchivoAdjunto, cc.xywh(9, 10, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- lblReferencia ---- lblReferencia.setText("Referencia:"); panel4.add(lblReferencia, cc.xywh(3, 12, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel4.add(txtReferencia, cc.xywh(5, 12, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblContacto ---- lblContacto.setText("Contacto:"); panel4.add(lblContacto, cc.xywh(3, 14, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- lblDireccion ---- lblDireccion.setText("Direcci\u00f3n:"); panel4.add(lblDireccion, cc.xywh(3, 16, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel4.add(txtDireccion, cc.xywh(5, 16, 13, 1)); //---- lblInformacionAdc ---- lblInformacionAdc.setText("Inf. Adicional (cobro/pago):"); panel4.add(lblInformacionAdc, cc.xy(3, 18)); panel4.add(txtInformacionAdc, cc.xywh(5, 18, 13, 1)); } panel3.add(panel4, cc.xy(1, 5)); //======== bpNegociacionPanel ======== { bpNegociacionPanel.setBorder(new LineBorder(Color.lightGray)); bpNegociacionPanel.setLayout(new BorderLayout()); //---- btnMostrarPanelNegociacion ---- btnMostrarPanelNegociacion.setText("Negociaci\u00f3n | >>"); btnMostrarPanelNegociacion.setHorizontalAlignment(SwingConstants.LEFT); bpNegociacionPanel.add(btnMostrarPanelNegociacion, BorderLayout.NORTH); //======== jpNegociacion ======== { jpNegociacion.setLayout(new FormLayout(new ColumnSpec[] { new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(30)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(130)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(10)) }, new RowSpec[] { new RowSpec(Sizes.DLUY2), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.DLUY3) })); //---- cbNegociacionDirecta ---- cbNegociacionDirecta.setText("Negociaci\u00f3n Directa"); jpNegociacion.add(cbNegociacionDirecta, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- lblPorcentajeNegociacionDirecta ---- lblPorcentajeNegociacionDirecta.setText("%:"); jpNegociacion.add(lblPorcentajeNegociacionDirecta, cc.xywh(5, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtPorcentajeNegociacionDirecta ---- txtPorcentajeNegociacionDirecta.setHorizontalAlignment(SwingConstants.RIGHT); jpNegociacion.add(txtPorcentajeNegociacionDirecta, cc.xy(7, 3)); //---- lblDsctoCompraPorcentaje ---- lblDsctoCompraPorcentaje.setText("Descuento:"); jpNegociacion.add(lblDsctoCompraPorcentaje, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtDsctoCompraPorcentaje ---- txtDsctoCompraPorcentaje.setHorizontalAlignment(SwingConstants.RIGHT); jpNegociacion.add(txtDsctoCompraPorcentaje, cc.xy(7, 5)); //---- lblClienteNegociacion ---- lblClienteNegociacion.setText("Cliente Negociaci\u00f3n:"); jpNegociacion.add(lblClienteNegociacion, cc.xywh(3, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtClienteNegociacion ---- txtClienteNegociacion.setEditable(false); jpNegociacion.add(txtClienteNegociacion, cc.xywh(5, 7, 9, 1)); jpNegociacion.add(btnBuscarClienteNegociacion, cc.xywh(15, 7, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- lblPorcentajeDescuento ---- lblPorcentajeDescuento.setText("%:"); jpNegociacion.add(lblPorcentajeDescuento, cc.xywh(5, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- cbComisionPura ---- cbComisionPura.setText("Comisi\u00f3n Pura"); jpNegociacion.add(cbComisionPura, cc.xywh(11, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); } bpNegociacionPanel.add(jpNegociacion, BorderLayout.CENTER); } panel3.add(bpNegociacionPanel, cc.xy(1, 7)); //======== panel6 ======== { panel6.setBorder( new TitledBorder(null, "Datos del Pedido", TitledBorder.LEADING, TitledBorder.TOP)); panel6.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(100)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //---- lblObservacion ---- lblObservacion.setText("Observaci\u00f3n:"); panel6.add(lblObservacion, cc.xywh(3, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panel6.add(txtObservacion, cc.xywh(5, 1, 7, 1)); //---- lblListaPrecio ---- lblListaPrecio.setText("Lista de precios:"); panel6.add(lblListaPrecio, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel6.add(cmbListaPrecio, cc.xy(5, 3)); //---- lblDiasValidez ---- lblDiasValidez.setText("D\u00edas de validez:"); panel6.add(lblDiasValidez, cc.xywh(9, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtDiasValidez ---- txtDiasValidez.setHorizontalAlignment(SwingConstants.RIGHT); panel6.add(txtDiasValidez, cc.xy(11, 3)); //---- lblFormaPago ---- lblFormaPago.setText("Forma de pago:"); panel6.add(lblFormaPago, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel6.add(cmbFormaPago, cc.xy(5, 5)); //---- lblPuntoImpresion ---- lblPuntoImpresion.setText("Punto de impresi\u00f3n:"); panel6.add(lblPuntoImpresion, cc.xywh(9, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtPuntoImpresion ---- txtPuntoImpresion.setEditable(false); panel6.add(txtPuntoImpresion, cc.xy(11, 5)); //---- lblVendedor ---- lblVendedor.setText("Vendedor:"); panel6.add(lblVendedor, cc.xywh(3, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel6.add(cmbVendedor, cc.xy(5, 7)); //---- lblBodega ---- lblBodega.setText("Bodega:"); panel6.add(lblBodega, cc.xywh(9, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel6.add(cmbBodega, cc.xy(11, 7)); //---- lblDirectorCuentas ---- lblDirectorCuentas.setText("Director(a):"); panel6.add(lblDirectorCuentas, cc.xywh(3, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panel6.add(cmbDirectorCuentas, cc.xy(5, 9)); //---- lblOrigenDocumento ---- lblOrigenDocumento.setText("Origen del documento:"); panel6.add(lblOrigenDocumento, cc.xy(9, 9)); panel6.add(cmbOrigenDocumento, cc.xy(11, 9)); //---- lblFundacion ---- lblFundacion.setText("Fundaci\u00f3n:"); panel6.add(lblFundacion, cc.xywh(3, 11, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panel6.add(cmbFundacion, cc.xy(5, 11)); } panel3.add(panel6, cc.xy(1, 9)); } scrollPane1.setViewportView(panel3); } jtpPedido.addTab("Pedido", scrollPane1); //======== scrollPane2 ======== { //======== panel11 ======== { panel11.setLayout(new FormLayout(ColumnSpec.decodeSpecs("default:grow"), new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); //======== panel8 ======== { panel8.setBorder( new TitledBorder(null, "Documento", TitledBorder.LEADING, TitledBorder.TOP)); panel8.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(200)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(200)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default, 3dlu, default"))); //---- lblDocumento ---- lblDocumento.setText("Documento:"); panel8.add(lblDocumento, cc.xywh(3, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblMotivo ---- lblMotivo.setText("Motivo:"); panel8.add(lblMotivo, cc.xywh(9, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel8.add(cmbMotivo, cc.xy(11, 1)); panel8.add(cmbDocumento, cc.xy(5, 1)); } panel11.add(panel8, cc.xy(1, 1)); //======== panel10 ======== { panel10.setBorder( new TitledBorder(null, "Detalle", TitledBorder.LEADING, TitledBorder.TOP)); panel10.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(30)), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); ((FormLayout) panel10.getLayout()).setColumnGroups(new int[][] { { 3, 9 }, { 5, 11 } }); //======== scPlantilla ======== { //---- tblPedidoDetalle ---- tblPedidoDetalle.setModel(new DefaultTableModel(new Object[][] {}, new String[] { "Descripci\u00f3n", "Cantidad", "Precio Real", "Dscto. Agencia", "Descuento Global", "IVA", "Dsctos. Varios" }) { boolean[] columnEditable = new boolean[] { false, false, false, false, false, false, false }; @Override public boolean isCellEditable(int rowIndex, int columnIndex) { return columnEditable[columnIndex]; } }); tblPedidoDetalle.setPreferredScrollableViewportSize(new Dimension(450, 150)); tblPedidoDetalle.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); scPlantilla.setViewportView(tblPedidoDetalle); } panel10.add(scPlantilla, cc.xywh(3, 21, 11, 1)); //---- lblCodigoProducto ---- lblCodigoProducto.setText("C\u00f3digo del producto:"); panel10.add(lblCodigoProducto, cc.xywh(3, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- btnBuscarProducto ---- btnBuscarProducto.setIcon(null); panel10.add(btnBuscarProducto, cc.xywh(7, 1, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- txtCodigoProducto ---- txtCodigoProducto.setFocusable(true); panel10.add(txtCodigoProducto, cc.xywh(5, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblDescripcion ---- lblDescripcion.setText("Descripci\u00f3n:"); panel10.add(lblDescripcion, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //======== spDescripcion ======== { //---- txtDescripcion ---- txtDescripcion.setLineWrap(true); spDescripcion.setViewportView(txtDescripcion); } panel10.add(spDescripcion, cc.xywh(5, 3, 9, 5)); //---- lblCantidad ---- lblCantidad.setText("Cantidad a pedir:"); panel10.add(lblCantidad, cc.xywh(3, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtCantidadPedida ---- txtCantidadPedida.setHorizontalAlignment(SwingConstants.RIGHT); panel10.add(txtCantidadPedida, cc.xy(5, 9)); //---- lblCantidadPedida ---- lblCantidadPedida.setText("Cantidad facturada:"); panel10.add(lblCantidadPedida, cc.xywh(9, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtCantidad ---- txtCantidad.setHorizontalAlignment(SwingConstants.RIGHT); panel10.add(txtCantidad, cc.xywh(11, 9, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblPrecio ---- lblPrecio.setText("Precio:"); panel10.add(lblPrecio, cc.xywh(3, 11, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtPrecio ---- txtPrecio.setHorizontalAlignment(SwingConstants.RIGHT); panel10.add(txtPrecio, cc.xywh(5, 11, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblProveedor ---- lblProveedor.setText("Proveedor:"); panel10.add(lblProveedor, cc.xywh(9, 11, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtProveedor ---- txtProveedor.setFocusable(false); panel10.add(txtProveedor, cc.xywh(11, 11, 3, 1)); //---- lblPrecioReal ---- lblPrecioReal.setText("Precio real:"); panel10.add(lblPrecioReal, cc.xywh(3, 13, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtPrecioReal ---- txtPrecioReal.setHorizontalAlignment(SwingConstants.RIGHT); panel10.add(txtPrecioReal, cc.xy(5, 13)); //---- lblFacturaProveedor ---- lblFacturaProveedor.setText("Factura Proveedor:"); panel10.add(lblFacturaProveedor, cc.xywh(9, 13, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panel10.add(txtFacturaProveedor, cc.xy(11, 13)); //---- btnFacturaProveedor ---- btnFacturaProveedor.setEnabled(false); panel10.add(btnFacturaProveedor, cc.xywh(13, 13, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- lblPorcentajeDescuentoAgencia ---- lblPorcentajeDescuentoAgencia.setText("Dscto. Agencia [%]:"); panel10.add(lblPorcentajeDescuentoAgencia, cc.xywh(3, 15, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtPorcentajeDescuentoAgencia ---- txtPorcentajeDescuentoAgencia.setHorizontalAlignment(SwingConstants.RIGHT); panel10.add(txtPorcentajeDescuentoAgencia, cc.xywh(5, 15, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblLinea ---- lblLinea.setText("L\u00ednea:"); panel10.add(lblLinea, cc.xywh(9, 15, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtLinea ---- txtLinea.setFocusable(false); panel10.add(txtLinea, cc.xywh(11, 15, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblPorcentajeDescuentosVarios ---- lblPorcentajeDescuentosVarios.setText("Dsctos. Varios [%]:"); panel10.add(lblPorcentajeDescuentosVarios, cc.xywh(3, 17, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtPorcentajeDescuentosVarios ---- txtPorcentajeDescuentosVarios.setHorizontalAlignment(SwingConstants.RIGHT); panel10.add(txtPorcentajeDescuentosVarios, cc.xy(5, 17)); //---- lblLote ---- lblLote.setText("Lote:"); panel10.add(lblLote, cc.xywh(9, 17, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panel10.add(cmbLote, cc.xywh(11, 17, 3, 1)); //======== panel1 ======== { panel1.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- btnAgregarDetalle ---- btnAgregarDetalle.setText("A"); btnAgregarDetalle.setIcon(null); panel1.add(btnAgregarDetalle, cc.xy(1, 1)); //---- btnActualizarDetalle ---- btnActualizarDetalle.setText("U"); btnActualizarDetalle.setIcon(null); panel1.add(btnActualizarDetalle, cc.xy(3, 1)); //---- btnEliminarDetalle ---- btnEliminarDetalle.setText("E"); panel1.add(btnEliminarDetalle, cc.xy(5, 1)); } panel10.add(panel1, cc.xywh(3, 19, 9, 1)); } panel11.add(panel10, cc.xy(1, 3)); //======== panel7 ======== { panel7.setBorder( new TitledBorder(null, "Descuento Global", TitledBorder.LEADING, TitledBorder.TOP)); panel7.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(50)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(50)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- rbDescuentoGlobalPorcentaje ---- rbDescuentoGlobalPorcentaje.setText("Descuento global [%]:"); panel7.add(rbDescuentoGlobalPorcentaje, cc.xy(3, 1)); //---- txtDescuentoGlobalPorcentaje ---- txtDescuentoGlobalPorcentaje.setHorizontalAlignment(SwingConstants.RIGHT); panel7.add(txtDescuentoGlobalPorcentaje, cc.xy(5, 1)); //---- rbDescuentoGlobalValor ---- rbDescuentoGlobalValor.setText("Descuento global [$]:"); panel7.add(rbDescuentoGlobalValor, cc.xy(7, 1)); //---- txtDescuentoGlobalValor ---- txtDescuentoGlobalValor.setHorizontalAlignment(SwingConstants.RIGHT); panel7.add(txtDescuentoGlobalValor, cc.xy(9, 1)); //---- btnActualizarTotales ---- btnActualizarTotales.setText("U"); panel7.add(btnActualizarTotales, cc.xy(11, 1)); } panel11.add(panel7, cc.xy(1, 5)); //======== panel112 ======== { panel112.setBorder( new TitledBorder(null, "Totales", TitledBorder.LEADING, TitledBorder.TOP)); panel112.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(40)), new ColumnSpec(ColumnSpec.LEFT, Sizes.DLUX3, FormSpec.NO_GROW), new ColumnSpec(Sizes.dluX(10)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(12)) }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); ((FormLayout) panel112.getLayout()).setColumnGroups(new int[][] { { 11, 17 } }); //---- lblValorFinal ---- lblValorFinal.setText("SubTotal:"); panel112.add(lblValorFinal, cc.xywh(3, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtValorFinal ---- txtValorFinal.setHorizontalAlignment(SwingConstants.RIGHT); panel112.add(txtValorFinal, cc.xywh(5, 1, 7, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- txtIVAFinal ---- txtIVAFinal.setHorizontalAlignment(SwingConstants.RIGHT); panel112.add(txtIVAFinal, cc.xywh(17, 1, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblIVAFinal ---- lblIVAFinal.setText("IVA:"); panel112.add(lblIVAFinal, cc.xywh(15, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- lblDescuentoFinal ---- lblDescuentoFinal.setText("Dscto. Agencia:"); panel112.add(lblDescuentoFinal, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtDescuentoFinal ---- txtDescuentoFinal.setHorizontalAlignment(SwingConstants.RIGHT); panel112.add(txtDescuentoFinal, cc.xywh(5, 3, 7, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblICEFinal ---- lblICEFinal.setText("ICE:"); panel112.add(lblICEFinal, cc.xywh(15, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtICEFinal ---- txtICEFinal.setHorizontalAlignment(SwingConstants.RIGHT); panel112.add(txtICEFinal, cc.xywh(17, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblDescuentosVariosTotal ---- lblDescuentosVariosTotal.setText("Dsctos. Varios:"); panel112.add(lblDescuentosVariosTotal, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtDescuentosVariosTotal ---- txtDescuentosVariosTotal.setHorizontalAlignment(SwingConstants.RIGHT); txtDescuentosVariosTotal.setEditable(false); panel112.add(txtDescuentosVariosTotal, cc.xywh(5, 5, 7, 1)); //---- lblOtroImpuestoFinal ---- lblOtroImpuestoFinal.setText("Otro impuesto:"); panel112.add(lblOtroImpuestoFinal, cc.xywh(15, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtOtroImpuestoFinal ---- txtOtroImpuestoFinal.setHorizontalAlignment(SwingConstants.RIGHT); panel112.add(txtOtroImpuestoFinal, cc.xywh(17, 5, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblComisionAgencia ---- lblComisionAgencia.setText("Comisi\u00f3n de Agencia [%]:"); panel112.add(lblComisionAgencia, cc.xywh(3, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtPorcentajeComision ---- txtPorcentajeComision.setHorizontalAlignment(SwingConstants.RIGHT); panel112.add(txtPorcentajeComision, cc.xy(5, 7)); //---- lblValorComision ---- lblValorComision.setText("Valor [$]:"); panel112.add(lblValorComision, cc.xywh(9, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtValorComision ---- txtValorComision.setHorizontalAlignment(SwingConstants.RIGHT); panel112.add(txtValorComision, cc.xy(11, 7)); //---- lblTotalFinal ---- lblTotalFinal.setText("TOTAL:"); lblTotalFinal.setFont(new Font("Microsoft Sans Serif", Font.BOLD, 11)); panel112.add(lblTotalFinal, cc.xywh(15, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtTotalFinal ---- txtTotalFinal.setHorizontalAlignment(SwingConstants.RIGHT); txtTotalFinal.setFont(new Font("Microsoft Sans Serif", Font.BOLD, 11)); panel112.add(txtTotalFinal, cc.xywh(17, 7, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); } panel11.add(panel112, cc.xy(1, 7)); } scrollPane2.setViewportView(panel11); } jtpPedido.addTab("Detalle", scrollPane2); //======== spPresupuesto ======== { //======== panelPresupuesto ======== { panelPresupuesto.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.dluX(10)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(30)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(70)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(10)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(40)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(30)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(30)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(10)) }, new RowSpec[] { new RowSpec(Sizes.dluY(10)), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(70)), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.TOP, Sizes.DLUY7, FormSpec.NO_GROW), FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.CENTER, Sizes.dluY(70), FormSpec.DEFAULT_GROW), new RowSpec(RowSpec.TOP, Sizes.dluY(10), FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.dluY(10), FormSpec.NO_GROW) })); //---- lblProveedorP ---- lblProveedorP.setText("Proveedor:"); panelPresupuesto.add(lblProveedorP, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtProveedorP ---- txtProveedorP.setEditable(false); panelPresupuesto.add(txtProveedorP, cc.xywh(5, 3, 9, 1)); //---- lblProductoP ---- lblProductoP.setText("Producto:"); panelPresupuesto.add(lblProductoP, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtProductoP ---- txtProductoP.setEditable(false); panelPresupuesto.add(txtProductoP, cc.xywh(5, 5, 9, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- lblConceptoPresupuestoDetalleP ---- lblConceptoPresupuestoDetalleP.setText("Concepto:"); panelPresupuesto.add(lblConceptoPresupuestoDetalleP, cc.xywh(3, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //======== spConceptoPresupuestoDetalleP ======== { //---- txtConceptoPresupuestoDetalleP ---- txtConceptoPresupuestoDetalleP.setWrapStyleWord(false); txtConceptoPresupuestoDetalleP.setRows(6); txtConceptoPresupuestoDetalleP.setLineWrap(true); txtConceptoPresupuestoDetalleP.setEditable(true); spConceptoPresupuestoDetalleP.setViewportView(txtConceptoPresupuestoDetalleP); } panelPresupuesto.add(spConceptoPresupuestoDetalleP, cc.xywh(5, 7, 21, 5)); //---- lblPrecioVentaP ---- lblPrecioVentaP.setText("Precio de venta:"); panelPresupuesto.add(lblPrecioVentaP, cc.xywh(3, 13, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- txtPrecioVentaP ---- txtPrecioVentaP.setHorizontalAlignment(SwingConstants.RIGHT); txtPrecioVentaP.setEditable(false); panelPresupuesto.add(txtPrecioVentaP, cc.xywh(5, 13, 3, 1)); //---- txtCantidadP ---- txtCantidadP.setHorizontalAlignment(SwingConstants.RIGHT); txtCantidadP.setEditable(false); panelPresupuesto.add(txtCantidadP, cc.xy(13, 13)); //---- lblCantidadP ---- lblCantidadP.setText("Cantidad:"); panelPresupuesto.add(lblCantidadP, cc.xywh(11, 13, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //======== panel13 ======== { panel13.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- btnAgregarDetalleP ---- btnAgregarDetalleP.setText("A"); btnAgregarDetalleP.setEnabled(false); panel13.add(btnAgregarDetalleP, cc.xy(1, 1)); //---- btnActualizarDetalleP ---- btnActualizarDetalleP.setText("U"); panel13.add(btnActualizarDetalleP, cc.xy(3, 1)); //---- btnEliminarDetalleP ---- btnEliminarDetalleP.setText("D"); btnEliminarDetalleP.setEnabled(false); panel13.add(btnEliminarDetalleP, cc.xy(5, 1)); } panelPresupuesto.add(panel13, cc.xywh(3, 16, 19, 1)); //======== scPresupuestoDetalleP ======== { //---- tblPresupuestoDetalleP ---- tblPresupuestoDetalleP.setModel( new DefaultTableModel(new Object[][] {}, new String[] { "Concepto", "Cantidad", "Precio Compra", "Precio Venta", "Dscto. Venta", "Dscto. Compra" }) { boolean[] columnEditable = new boolean[] { false, false, false, false, false, false }; @Override public boolean isCellEditable(int rowIndex, int columnIndex) { return columnEditable[columnIndex]; } }); tblPresupuestoDetalleP.setPreferredScrollableViewportSize(new Dimension(450, 150)); tblPresupuestoDetalleP.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); scPresupuestoDetalleP.setViewportView(tblPresupuestoDetalleP); } panelPresupuesto.add(scPresupuestoDetalleP, cc.xywh(3, 18, 25, 3, CellConstraints.DEFAULT, CellConstraints.FILL)); } spPresupuesto.setViewportView(panelPresupuesto); } jtpPedido.addTab("Presupuesto", spPresupuesto); } add(jtpPedido, cc.xy(1, 1)); //---- buttonGroupDescuento ---- ButtonGroup buttonGroupDescuento = new ButtonGroup(); buttonGroupDescuento.add(rbDescuentoGlobalPorcentaje); buttonGroupDescuento.add(rbDescuentoGlobalValor); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:se.streamsource.streamflow.client.ui.administration.surface.AccessPointView.java
License:Apache License
public AccessPointView(@Service ApplicationContext appContext, @Uses final AccessPointModel model, @Structure Module module) {/*from www .j a v a 2 s.c om*/ this.model = model; this.labels = module.objectBuilderFactory().newObjectBuilder(CaseLabelsView.class) .use(model.getLabelsModel()).newInstance(); setLayout(new BorderLayout()); setActionMap(appContext.getActionMap(this)); RefreshComponents refreshComponents = new RefreshComponents(); model.addObserver(refreshComponents); actionBinder = module.objectBuilderFactory().newObjectBuilder(ActionBinder.class).use(getActionMap()) .newInstance(); valueBinder = module.objectBuilderFactory().newObject(ValueBinder.class); actionBinder.setResourceMap(appContext.getResourceMap(getClass())); LinkValueConverter linkValueConverter = new LinkValueConverter(); FormLayout layout = new FormLayout("90dlu, 5dlu, 150:grow", "pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, " + "pref, 12dlu, pref, 2dlu, pref, 12dlu, pref, 2dlu, default:grow"); JPanel panel = new JPanel(layout); DefaultFormBuilder builder = new DefaultFormBuilder(layout, panel); builder.setBorder(Borders.createEmptyBorder(Sizes.DLUY8, Sizes.DLUX4, Sizes.DLUY2, Sizes.DLUX8)); CellConstraints cc = new CellConstraints(); MacOsUIWrapper.convertAccelerators(appContext.getActionMap(AccessPointView.class, this)); selectedProject.setFont(selectedProject.getFont().deriveFont(Font.BOLD)); selectedCaseType.setFont(selectedCaseType.getFont().deriveFont(Font.BOLD)); selectedForm.setFont(selectedForm.getFont().deriveFont(Font.BOLD)); selectedTemplate.getLabel().setFont(selectedTemplate.getLabel().getFont().deriveFont(Font.BOLD)); ActionMap am = getActionMap(); // Select project javax.swing.Action projectAction = am.get("project"); projectButton = new StreamflowButton(projectAction); projectButton.registerKeyboardAction(projectAction, (KeyStroke) projectAction.getValue(javax.swing.Action.ACCELERATOR_KEY), JComponent.WHEN_IN_FOCUSED_WINDOW); projectButton.setHorizontalAlignment(SwingConstants.LEFT); builder.add(projectButton, cc.xy(1, 1)); builder.add(valueBinder.bind("project", selectedProject, linkValueConverter), new CellConstraints(3, 1, 1, 1, CellConstraints.LEFT, CellConstraints.CENTER, new Insets(5, 0, 0, 0))); // Select case type javax.swing.Action caseTypeAction = am.get("casetype"); caseTypeButton = new StreamflowButton(caseTypeAction); caseTypeButton.registerKeyboardAction(caseTypeAction, (KeyStroke) caseTypeAction.getValue(javax.swing.Action.ACCELERATOR_KEY), JComponent.WHEN_IN_FOCUSED_WINDOW); caseTypeButton.setHorizontalAlignment(SwingConstants.LEFT); builder.add(caseTypeButton, cc.xy(1, 3)); builder.add(valueBinder.bind("caseType", selectedCaseType, linkValueConverter), new CellConstraints(3, 3, 1, 1, CellConstraints.LEFT, CellConstraints.CENTER, new Insets(5, 0, 0, 0))); // Select labels javax.swing.Action labelAction = labels.getActionMap().get("addLabel"); labelButton = new StreamflowButton(labelAction); labelButton.registerKeyboardAction(labelAction, (KeyStroke) labelAction.getValue(javax.swing.Action.ACCELERATOR_KEY), JComponent.WHEN_IN_FOCUSED_WINDOW); labelButton.setHorizontalAlignment(SwingConstants.LEFT); builder.add(labelButton, cc.xy(1, 5, CellConstraints.FILL, CellConstraints.TOP)); labels.setPreferredSize(new Dimension(500, 60)); labels.setTextBold(true); labels.setButtonRelation(labelButton); builder.add(labels, new CellConstraints(3, 5, 1, 1, CellConstraints.LEFT, CellConstraints.TOP, new Insets(5, 0, 0, 0))); // Select form javax.swing.Action formAction = am.get("form"); formButton = new StreamflowButton(formAction); formButton.registerKeyboardAction(formAction, (KeyStroke) formAction.getValue(javax.swing.Action.ACCELERATOR_KEY), JComponent.WHEN_IN_FOCUSED_WINDOW); formButton.setHorizontalAlignment(SwingConstants.LEFT); builder.add(formButton, cc.xy(1, 7, CellConstraints.FILL, CellConstraints.TOP)); // Open replace selection field value editor javax.swing.Action replaceSelectionFieldValueAction = am.get("openReplaceSelectionFieldValueEditor"); replaceSelectionFieldValueEditButton = new StreamflowButton(replaceSelectionFieldValueAction); /*replaceSelectionFieldValueEditButton.registerKeyboardAction( replaceSelectionFieldValueAction, (KeyStroke) replaceSelectionFieldValueAction .getValue( javax.swing.Action.ACCELERATOR_KEY ), JComponent.WHEN_IN_FOCUSED_WINDOW ); */ replaceSelectionFieldValueEditButton.setHorizontalAlignment(SwingConstants.RIGHT); PanelBuilder panelBuilder = new PanelBuilder(new FormLayout("150dlu,5dlu,250:grow", "pref")); panelBuilder.add(valueBinder.bind("form", selectedForm, linkValueConverter)); panelBuilder.nextColumn(2); panelBuilder.add(replaceSelectionFieldValueEditButton, new CellConstraints(3, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.CENTER, new Insets(0, 0, 0, 0))); //panelBuilder.setBorder(BorderFactory.createLineBorder(Color.RED)); builder.add(panelBuilder.getPanel()/*valueBinder.bind( "form", selectedForm, linkValueConverter )*/, new CellConstraints(3, 7, 1, 1, CellConstraints.LEFT, CellConstraints.CENTER, new Insets(5, 0, 0, 0))); // Select template javax.swing.Action templateAction = am.get("template"); templateButton = new StreamflowButton(templateAction); templateButton.registerKeyboardAction(templateAction, (KeyStroke) templateAction.getValue(javax.swing.Action.ACCELERATOR_KEY), JComponent.WHEN_IN_FOCUSED_WINDOW); templateButton.setHorizontalAlignment(SwingConstants.LEFT); builder.add(templateButton, cc.xy(1, 9, CellConstraints.FILL, CellConstraints.TOP)); builder.add(valueBinder.bind("template", actionBinder.bind("removeTemplate", selectedTemplate)), new CellConstraints(3, 9, 1, 1, CellConstraints.LEFT, CellConstraints.CENTER, new Insets(3, 0, 0, 0))); builder.add(new JLabel(text(AdministrationResources.cookieExpirationHours)), cc.xy(1, 13, CellConstraints.LEFT, CellConstraints.BOTTOM)); builder.add( valueBinder.bind("cookieExpirationHours", actionBinder.bind("changeCookieExpirationHours", cookieExpiration = new JTextField())), new CellConstraints(3, 13, 1, 1, CellConstraints.FILL, CellConstraints.BOTTOM, new Insets(3, 0, 0, 0))); mailSelectionLabel.setText(text(AdministrationResources.changeMailSelectionMessage)); mailSelectionLabel.setToolTipText(text(AdministrationResources.changeMailSelectionMessageHint)); builder.add(mailSelectionLabel, cc.xy(1, 15, CellConstraints.LEFT, CellConstraints.BOTTOM)); builder.add( valueBinder.bind("mailSelectionMessage", actionBinder.bind("changeMailSelectionMessage", mailSelectionField)), new CellConstraints(3, 15, 1, 1, CellConstraints.FILL, CellConstraints.BOTTOM, new Insets(3, 0, 0, 0))); PanelBuilder signPanel = new PanelBuilder(new FormLayout("180dlu, 15dlu, 180dlu", "default:grow")); CellConstraints signPanelCc = new CellConstraints(); PanelBuilder primarySignPanel = new PanelBuilder(new FormLayout("180dlu", "pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, default:grow")); CellConstraints primaryCc = new CellConstraints(); primarySignPanel.addSeparator(text(AdministrationResources.signature_1), primaryCc.xy(1, 1)); primarySignPanel.add(valueBinder.bind("primarysign", actionBinder.bind("setSignActive1", signActive1 = new JCheckBox(text(AdministrationResources.active))), new ValueBinder.Converter<RequiredSignatureValue, Boolean>() { public Boolean toComponent(RequiredSignatureValue value) { return value != null ? value.active().get() : Boolean.FALSE; } }), primaryCc.xy(1, 3)); primarySignPanel.addLabel(text(AdministrationResources.name_label), primaryCc.xy(1, 5)); primarySignPanel.add( valueBinder.bind("primarysign", actionBinder.bind("setSignName1", signName1 = new JTextField()), new ValueBinder.Converter<RequiredSignatureValue, String>() { public String toComponent(RequiredSignatureValue value) { return value != null ? value.name().get() : ""; } }), primaryCc.xy(1, 7)); refreshComponents.enabledOn("updateprimarysign", signName1); primarySignPanel.add(new JLabel(text(AdministrationResources.description_label)), primaryCc.xy(1, 9)); primarySignPanel.add(valueBinder.bind("primarysign", actionBinder.bind("setSignDescription1", signDescription1 = new JTextField()), new ValueBinder.Converter<RequiredSignatureValue, String>() { public String toComponent(RequiredSignatureValue value) { return value != null ? value.description().get() : ""; } }), primaryCc.xy(1, 11)); refreshComponents.enabledOn("updateprimarysign", signDescription1); signPanel.add(primarySignPanel.getPanel(), signPanelCc.xy(1, 1, CellConstraints.LEFT, CellConstraints.TOP)); PanelBuilder secondarySignPanel = new PanelBuilder(new FormLayout("180dlu", "pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 2dlu, pref, 12dlu, pref, 2dlu, pref, 2dlu, default:grow")); CellConstraints secondaryCc = new CellConstraints(); secondarySignPanel.addSeparator(text(AdministrationResources.signature_2), secondaryCc.xy(1, 1)); PanelBuilder secondaryOptionsPanel = new PanelBuilder(new FormLayout("70dlu,5dlu,70dlu,pref:grow", "pref")); secondaryOptionsPanel.add(valueBinder.bind("secondarysign", actionBinder.bind("setSignActive2", signActive2 = new JCheckBox(text(AdministrationResources.active))), new ValueBinder.Converter<RequiredSignatureValue, Boolean>() { public Boolean toComponent(RequiredSignatureValue value) { return value != null ? value.active().get() : Boolean.FALSE; } }), secondaryCc.xy(1, 1)); refreshComponents.enabledOn("updatesecondarysignactive", signActive2); secondaryOptionsPanel.add(valueBinder.bind("secondarysign", actionBinder.bind("setSecondMandatory", mandatory2 = new JCheckBox(text(AdministrationResources.mandatory))), new ValueBinder.Converter<RequiredSignatureValue, Boolean>() { public Boolean toComponent(RequiredSignatureValue value) { return value != null ? value.mandatory().get() : Boolean.FALSE; } }), secondaryCc.xy(3, 1)); refreshComponents.enabledOn("updatesecondarysign", mandatory2); secondarySignPanel.add(secondaryOptionsPanel.getPanel(), secondaryCc.xy(1, 3)); secondarySignPanel.add(new JLabel(text(AdministrationResources.name_label)), secondaryCc.xy(1, 5)); secondarySignPanel.add( valueBinder.bind("secondarysign", actionBinder.bind("setSignName2", signName2 = new JTextField()), new ValueBinder.Converter<RequiredSignatureValue, String>() { public String toComponent(RequiredSignatureValue value) { return value != null ? value.name().get() : ""; } }), secondaryCc.xy(1, 7)); refreshComponents.enabledOn("updatesecondarysign", signName2); secondarySignPanel.add(new JLabel(text(AdministrationResources.description_label)), secondaryCc.xy(1, 9)); secondarySignPanel.add(valueBinder.bind("secondarysign", actionBinder.bind("setSignDescription2", signDescription2 = new JTextField()), new ValueBinder.Converter<RequiredSignatureValue, String>() { public String toComponent(RequiredSignatureValue value) { return value != null ? value.description().get() : ""; } }), secondaryCc.xy(1, 11)); refreshComponents.enabledOn("updatesecondarysign", signDescription2); // Select form javax.swing.Action form2Action = am.get("setSecondForm"); form2Button = new StreamflowButton(form2Action); form2Button.registerKeyboardAction(form2Action, (KeyStroke) form2Action.getValue(javax.swing.Action.ACCELERATOR_KEY), JComponent.WHEN_IN_FOCUSED_WINDOW); form2Button.setHorizontalAlignment(SwingConstants.LEFT); refreshComponents.enabledOn("updatesecondarysign", form2Button); PanelBuilder form2ButtonPanel = new PanelBuilder(new FormLayout("70dlu, 5dlu, 150dlu:grow", "pref")); CellConstraints form2ButtonPanelCc = new CellConstraints(); form2ButtonPanel.add(form2Button, form2ButtonPanelCc.xy(1, 1, CellConstraints.FILL, CellConstraints.TOP)); form2ButtonPanel.add(valueBinder.bind("secondarysign", selectedForm2 = new JLabel(), new ValueBinder.Converter<RequiredSignatureValue, String>() { public String toComponent(RequiredSignatureValue value) { return value != null ? value.formdescription().get() : ""; } }), form2ButtonPanelCc.xy(3, 1, CellConstraints.LEFT, CellConstraints.CENTER)); secondarySignPanel.add(form2ButtonPanel.getPanel(), secondaryCc.xy(1, 13)); secondarySignPanel.add(new JLabel(text(AdministrationResources.question_label)), secondaryCc.xy(1, 17)); secondarySignPanel.add(valueBinder.bind("secondarysign", actionBinder.bind("setQuestion", formQuestion2 = new JTextField()), new ValueBinder.Converter<RequiredSignatureValue, String>() { public String toComponent(RequiredSignatureValue value) { return value != null ? value.question().get() : ""; } }), secondaryCc.xy(1, 19)); refreshComponents.enabledOn("updatesecondarysign", formQuestion2); signPanel.add(secondarySignPanel.getPanel(), signPanelCc.xy(3, 1, CellConstraints.LEFT, CellConstraints.TOP)); builder.add(signPanel.getPanel(), new CellConstraints(1, 17, 3, 1, CellConstraints.FILL, CellConstraints.FILL, new Insets(0, 0, 0, 0))); JPanel templatePanel = new JPanel(); templatePanel.setVisible(false); FormLayout templateFormLayout = new FormLayout("75dlu, 5dlu, fill:p:grow", "pref, pref, fill:p:grow, pref"); DefaultFormBuilder templateFormBuilder = new DefaultFormBuilder(templateFormLayout, templatePanel); templateFormBuilder.addSeparator(text(AdministrationResources.emailTemplates)); templateFormBuilder.nextLine(); templateFormBuilder.append(text(AdministrationResources.subject), valueBinder.bind("subject", actionBinder.bind("changeSubject", subject = new JTextField()))); templateFormBuilder.nextLine(); templateFormBuilder.append(new JScrollPane(emailTemplateList)); templateFormBuilder.append(new JScrollPane(actionBinder.bind("save", emailTemplateText))); templateFormBuilder.nextLine(); emailTemplateList.addListSelectionListener(new ListSelectionListener() { public void valueChanged(ListSelectionEvent e) { if (!e.getValueIsAdjusting()) { if (emailTemplateList.getSelectedIndex() != -1) { emailTemplateText.setText(model.getAccessPointValue().messages().get() .get(emailTemplateList.getSelectedValue())); } } } }); refreshComponents.visibleOn("updatesecondarysign", templatePanel); builder.add(templatePanel, new CellConstraints(1, 19, 3, 1, CellConstraints.FILL, CellConstraints.FILL, new Insets(0, 0, 0, 0))); add(new JScrollPane(panel), BorderLayout.CENTER); new RefreshWhenShowing(this, this); }
From source file:se.streamsource.streamflow.client.ui.administration.templates.SelectedTemplatesView.java
License:Apache License
public SelectedTemplatesView(@Service ApplicationContext appContext, @Uses SelectedTemplatesModel model, @Structure Module module) {//from w ww. ja v a 2s .c om this.model = model; model.addObserver(this); selectedTemplatesBinder = module.objectBuilderFactory().newObject(StateBinder.class); selectedTemplatesBinder.addObserver(this); selectedTemplatesBinder.addConverter(new StateBinder.Converter() { public Object toComponent(Object value) { if (value instanceof LinkValue) { return ((LinkValue) value).text().get(); } else return value; } public Object fromComponent(Object value) { return value; } }); selectedTemplatesBinder.setResourceMap(appContext.getResourceMap(getClass())); SelectedTemplatesDTO template = selectedTemplatesBinder.bindingTemplate(SelectedTemplatesDTO.class); defaultTemplate.getLabel().setFont(defaultTemplate.getLabel().getFont().deriveFont(Font.BOLD)); defaultTemplate.setPreferredSize(new Dimension(150, 25)); formTemplate.getLabel().setFont(formTemplate.getLabel().getFont().deriveFont(Font.BOLD)); formTemplate.setPreferredSize(new Dimension(150, 25)); caseTemplate.getLabel().setFont(caseTemplate.getLabel().getFont().deriveFont(Font.BOLD)); caseTemplate.setPreferredSize(new Dimension(150, 25)); FormLayout layout = new FormLayout("80dlu, 5dlu, 150:grow", "pref, 2dlu, pref, 2dlu, pref, 2dlu, pref:grow"); JPanel panel = new JPanel(layout); DefaultFormBuilder builder = new DefaultFormBuilder(layout, panel); builder.setBorder(Borders.createEmptyBorder(Sizes.DLUY8, Sizes.DLUX4, Sizes.DLUY2, Sizes.DLUX8)); CellConstraints cc = new CellConstraints(); setActionMap(appContext.getActionMap(this)); MacOsUIWrapper.convertAccelerators(appContext.getActionMap(SelectedTemplatesView.class, this)); ActionMap am = getActionMap(); // Select default template javax.swing.Action defaultTemplateAction = am.get("defaultTemplate"); defaultTemplateButton = new StreamflowButton(defaultTemplateAction); defaultTemplateButton.registerKeyboardAction(defaultTemplateAction, (KeyStroke) defaultTemplateAction.getValue(javax.swing.Action.ACCELERATOR_KEY), JComponent.WHEN_IN_FOCUSED_WINDOW); defaultTemplateButton.setHorizontalAlignment(SwingConstants.LEFT); builder.add(defaultTemplateButton, cc.xy(1, 3, CellConstraints.FILL, CellConstraints.TOP)); builder.add(selectedTemplatesBinder.bind(defaultTemplate, template.defaultPdfTemplate()), new CellConstraints(3, 3, 1, 1, CellConstraints.LEFT, CellConstraints.TOP, new Insets(3, 0, 0, 0))); // Select form template javax.swing.Action formTemplateAction = am.get("formTemplate"); formTemplateButton = new StreamflowButton(formTemplateAction); formTemplateButton.registerKeyboardAction(formTemplateAction, (KeyStroke) formTemplateAction.getValue(javax.swing.Action.ACCELERATOR_KEY), JComponent.WHEN_IN_FOCUSED_WINDOW); formTemplateButton.setHorizontalAlignment(SwingConstants.LEFT); builder.add(formTemplateButton, cc.xy(1, 5, CellConstraints.FILL, CellConstraints.TOP)); builder.add(selectedTemplatesBinder.bind(formTemplate, template.formPdfTemplate()), new CellConstraints(3, 5, 1, 1, CellConstraints.LEFT, CellConstraints.TOP, new Insets(3, 0, 0, 0))); // Select case template javax.swing.Action caseTemplateAction = am.get("caseTemplate"); caseTemplateButton = new StreamflowButton(caseTemplateAction); caseTemplateButton.registerKeyboardAction(caseTemplateAction, (KeyStroke) caseTemplateAction.getValue(javax.swing.Action.ACCELERATOR_KEY), JComponent.WHEN_IN_FOCUSED_WINDOW); caseTemplateButton.setHorizontalAlignment(SwingConstants.LEFT); builder.add(caseTemplateButton, cc.xy(1, 7, CellConstraints.FILL, CellConstraints.TOP)); builder.add(selectedTemplatesBinder.bind(caseTemplate, template.casePdfTemplate()), new CellConstraints(3, 7, 1, 1, CellConstraints.LEFT, CellConstraints.TOP, new Insets(3, 0, 0, 0))); add(panel, BorderLayout.CENTER); selectedTemplatesBinder.updateWith(model.getSelectedTemplatesValue()); new RefreshWhenShowing(this, model); }
From source file:se.streamsource.streamflow.client.ui.workspace.cases.caselog.CaseLogView.java
License:Apache License
public CaseLogView(@Service final ApplicationContext context, @Uses CaseLogModel logmodel) { this.model = logmodel; setActionMap(context.getActionMap(this)); // Load icons notPublishedIcon = icon(Icons.not_published, ICON_16); publishedIcon = icon(Icons.published, ICON_16); // Layout and form for the left panel FormLayout rightLayout = new FormLayout("30dlu, 300:grow, 50dlu, 20dlu", "pref, fill:pref:grow, 60dlu"); setLayout(rightLayout);// ww w . j a v a2 s . c o m setFocusable(false); DefaultFormBuilder rightBuilder = new DefaultFormBuilder(rightLayout, this); rightBuilder.setBorder(Borders.createEmptyBorder(Sizes.DLUY2, Sizes.DLUX2, Sizes.DLUY2, Sizes.DLUX2)); JLabel caseLogLabel = new JLabel(i18n.text(WorkspaceResources.case_log)); rightBuilder.add(caseLogLabel, new CellConstraints(1, 1, 2, 1, CellConstraints.LEFT, CellConstraints.TOP, new Insets(0, 0, 0, 0))); rightBuilder.nextColumn(); filtersList = new SelectionList( Arrays.asList(system.name(), system_trace.name(), custom.name(), contact.name(), form.name(), conversation.name(), attachment.name()), model.getSelectedFilters(), new ValueToLabelConverter() { public String convert(String value) { return text(valueOf(value.toString())); } }, new ListSelectionListener() { public void valueChanged(ListSelectionEvent event) { if (!event.getValueIsAdjusting()) { String selectedValue = (String) ((JList) event.getSource()).getSelectedValue(); if (selectedValue != null) { if (model.getSelectedFilters().contains(selectedValue)) { model.getSelectedFilters().remove(selectedValue); } else { model.getSelectedFilters().add(selectedValue); } model.refresh(); ((JList) event.getSource()).clearSelection(); } } } }); filterPopupHandler = new StandardPopupHandler(CaseLogView.this, getActionMap().get("filter"), Position.right, false, new RefreshHandler() { public void refresh() { model.refresh(); list.ensureIndexIsVisible(list.getModel().getSize() - 1); } }); rightBuilder.add(filterPopupHandler.getButton(), new CellConstraints(3, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.TOP, new Insets(0, 0, 0, 0))); filtersList.addFocusListener(new FocusAdapter() { @Override public void focusLost(FocusEvent e) { if (e.getOppositeComponent() != null && (e.getOppositeComponent().equals(filterPopupHandler.getButton()))) filterPopupHandler.kill(); } }); editButton = new StreamflowToggleButton(getActionMap().get("edit")); editButton.setMargin(new Insets(3, 7, 1, 5)); rightBuilder.add(editButton, new CellConstraints(4, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.TOP, new Insets(0, 0, 0, 0))); // Caselog rightBuilder.nextLine(); ((JXList) list).addHighlighter(HighlighterFactory.createAlternateStriping()); list.setModel(new EventListModel<CaseLogEntryDTO>(model.caselogs())); list.setCellRenderer(new CaseLogListCellRenderer()); list.setFixedCellHeight(-1); list.getSelectionModel().setSelectionMode(ListSelectionModel.SINGLE_SELECTION); final JList tmpList = list; list.addMouseListener(new MouseAdapter() { public void mousePressed(MouseEvent e) { if (e.isPopupTrigger()) { int index = tmpList.locationToIndex(new Point(e.getX(), e.getY())); if (tmpList.getSelectedIndex() != index) { tmpList.setSelectedIndex(index); } final JPopupMenu menu = new JPopupMenu(); JMenuItem item = new JMenuItem(); item.setAction(context.getActionMap().get("copy")); item.setIcon(null); menu.add(item); final int x = e.getX(); final int y = e.getY(); final Component c = e.getComponent(); SwingUtilities.invokeLater(new Runnable() { public void run() { menu.show(c, x, y); } }); } } }); scroll = new JScrollPane(list, JScrollPane.VERTICAL_SCROLLBAR_AS_NEEDED, JScrollPane.HORIZONTAL_SCROLLBAR_NEVER); scroll.setMinimumSize(new Dimension(250, 100)); scroll.setPreferredSize(new Dimension(400, 300)); rightBuilder.setExtent(3, 1); rightBuilder.add(scroll, new CellConstraints(1, 2, 4, 1, CellConstraints.FILL, CellConstraints.FILL, new Insets(0, 0, 0, 0))); // Add caselog message ImageIcon icon = i18n.icon(Icons.message_add, 24); rightBuilder.add(new JLabel(icon), new CellConstraints(1, 3, 1, 1, CellConstraints.LEFT, CellConstraints.TOP, new Insets(10, 10, 0, 0))); newMessageArea = new JTextArea(10, 30); newMessageArea.setLineWrap(true); newMessageArea.setWrapStyleWord(true); newMessagePane = new JScrollPane(newMessageArea); newMessagePane.setMinimumSize(new Dimension(10, 10)); newMessagePane.setPreferredSize(new Dimension(10, 70)); rightBuilder.add(newMessagePane, new CellConstraints(2, 3, 3, 1, CellConstraints.FILL, CellConstraints.TOP, new Insets(10, 0, 0, 0))); newMessageArea.addKeyListener(new KeyListener() { public void keyTyped(KeyEvent e) { } public void keyReleased(KeyEvent e) { if (e.getKeyCode() == 10) { if (!e.isControlDown()) { newMessageArea.setText(""); } } } public void keyPressed(KeyEvent e) { if (e.getKeyCode() == 10) { if (e.isControlDown()) { newMessageArea.append("\n"); } else { addMessage(); } } } }); listSelectionListener = new ListSelectionListener() { public void valueChanged(ListSelectionEvent event) { if (!event.getValueIsAdjusting()) { final CaseLogEntryDTO selectedValue = (CaseLogEntryDTO) ((JList) event.getSource()) .getSelectedValue(); if (selectedValue != null) { new CommandTask() { @Override protected void command() throws Exception { model.togglepublish(selectedValue); } }.execute(); ((JList) event.getSource()).clearSelection(); } } } }; addHierarchyListener(new HierarchyListener() { public void hierarchyChanged(HierarchyEvent e) { if ((e.getChangeFlags() & HierarchyEvent.SHOWING_CHANGED) != 0 && !isShowing() && editMode) { editButton.setSelected(false); configureComponentsForEdit(false); } } }); new RefreshWhenShowing(this, this); }
From source file:se.streamsource.streamflow.client.ui.workspace.cases.general.CaseGeneralView.java
License:Apache License
public CaseGeneralView(@Service ApplicationContext appContext, @Uses CaseGeneralModel generalModel, @Uses CaseLogView caseLogView, @Structure Module module) { this.appContext = appContext; this.model = generalModel; RefreshComponents refreshComponents = new RefreshComponents(); model.addObserver(refreshComponents); ObjectBuilderFactory obf = module.objectBuilderFactory(); this.labels = obf.newObjectBuilder(CaseLabelsView.class).use(generalModel.newLabelsModel()).newInstance(); this.caseNotes = obf.newObjectBuilder(CaseNoteView.class).use(generalModel.newCaseNoteModel()) .newInstance();//w ww . j a va2s . co m RefreshComponents refreshLabelComponents = new RefreshComponents(); labels.getModel().addObserver(refreshLabelComponents); this.forms = obf.newObjectBuilder(PossibleFormsView.class).use(generalModel.newPossibleFormsModel()) .newInstance(); refreshComponents.visibleOn("changedescription", forms); this.setBorder(BorderFactory.createEmptyBorder()); getVerticalScrollBar().setUnitIncrement(30); setActionMap(appContext.getActionMap(this)); ActionMap am = getActionMap(); MacOsUIWrapper.convertAccelerators(appContext.getActionMap(CaseGeneralView.class, this)); actionBinder = obf.newObjectBuilder(ActionBinder.class).use(am).newInstance(); valueBinder = obf.newObject(ValueBinder.class); actionBinder.setResourceMap(appContext.getResourceMap(getClass())); // Layout and form for the right panel FormLayout leftLayout = new FormLayout("70dlu, 2dlu, 200:grow, 70dlu", "pref, pref, pref, pref, 20dlu, pref, pref, pref, pref"); leftPane = new JPanel(leftLayout); leftPane.setFocusable(false); DefaultFormBuilder leftBuilder = new DefaultFormBuilder(leftLayout, leftPane); leftBuilder.setBorder(Borders.createEmptyBorder(Sizes.DLUY2, Sizes.DLUX2, Sizes.DLUY2, Sizes.DLUX11)); selectedCaseType.getLabel().setFont(selectedCaseType.getLabel().getFont().deriveFont(Font.BOLD)); selectedCaseType.getButton().addActionListener(am.get("removeCaseType")); valueBinder.bind("caseType", selectedCaseType); // Description & DueDate leftBuilder.setExtent(3, 1); JLabel descriptionLabel = leftBuilder.getComponentFactory() .createLabel(i18n.text(WorkspaceResources.description_label)); leftBuilder.add(descriptionLabel); descriptionLabel.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 0)); leftBuilder.nextColumn(3); JLabel dueOnLabel = leftBuilder.append(i18n.text(WorkspaceResources.due_on_label)); dueOnLabel.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 0)); leftBuilder.nextLine(); leftBuilder.setExtent(3, 1); JPanel descPanel = new JPanel(new BorderLayout()); descPanel.add(valueBinder.bind("description", actionBinder.bind("changeDescription", descriptionField = (JTextField) TEXTFIELD.newField())), BorderLayout.WEST); leftBuilder.add(descPanel); descriptionField.setName("txtCaseDescription"); leftBuilder.add( valueBinder.bind("dueOn", actionBinder.bind("changeDueOn", dueOnField = (JXDatePicker) DATEPICKER.newField())), new CellConstraints(4, 2, 1, 1, CellConstraints.LEFT, CellConstraints.BOTTOM, new Insets(4, 0, 0, 0))); leftBuilder.nextLine(); descriptionLabel.setLabelFor(descriptionField); dueOnLabel.setLabelFor(dueOnField); refreshComponents.enabledOn("changedescription", descriptionField); refreshComponents.enabledOn("changedueon", dueOnField); // Select case type javax.swing.Action caseTypeAction = am.get("changeCaseType"); caseTypeButton = new StreamflowButton(caseTypeAction); caseTypeButton.registerKeyboardAction(caseTypeAction, (KeyStroke) caseTypeAction.getValue(javax.swing.Action.ACCELERATOR_KEY), JComponent.WHEN_IN_FOCUSED_WINDOW); caseTypeButton.setHorizontalAlignment(SwingConstants.LEFT); refreshComponents.enabledOn("casetype", caseTypeButton, selectedCaseType); leftBuilder.add(caseTypeButton, new CellConstraints(1, 3, 1, 1, CellConstraints.FILL, CellConstraints.TOP, new Insets(2, 0, 5, 0))); leftBuilder.add(selectedCaseType, new CellConstraints(3, 3, 1, 1, CellConstraints.LEFT, CellConstraints.BOTTOM, new Insets(5, 5, 0, 0))); JLabel priorityLabel = leftBuilder.getComponentFactory() .createLabel(i18n.text(WorkspaceResources.priority_label)); priorityLabel.setBorder(BorderFactory.createEmptyBorder(0, 2, 0, 0)); leftBuilder.add(priorityLabel, new CellConstraints(4, 3, 1, 1, CellConstraints.FILL, CellConstraints.BOTTOM, new Insets(4, 0, 0, 0))); leftBuilder.nextLine(); // Select labels javax.swing.Action labelAction = labels.getActionMap().get("addLabel"); labelButton = new StreamflowButton(labelAction); // NotificationGlassPane.registerButton(labelButton); labelButton.registerKeyboardAction(labelAction, (KeyStroke) labelAction.getValue(javax.swing.Action.ACCELERATOR_KEY), JComponent.WHEN_IN_FOCUSED_WINDOW); labelButton.setHorizontalAlignment(SwingConstants.LEFT); labels.setButtonRelation(labelButton); refreshLabelComponents.enabledOn("addlabel", labelButton, labels); leftBuilder.add(labelButton, new CellConstraints(1, 4, 1, 1, CellConstraints.FILL, CellConstraints.TOP, new Insets(5, 0, 0, 0))); labels.setPreferredSize(new Dimension(500, 50)); leftBuilder.add(labels, new CellConstraints(3, 4, 1, 1, CellConstraints.LEFT, CellConstraints.TOP, new Insets(5, 0, 0, 0))); JPanel prioPanel = new JPanel(new BorderLayout()); prioPanel.add(valueBinder.bind("priority", actionBinder.bind("changePriority", casePriority = (JComboBox) COMBOBOX.newField()))); leftBuilder.add(prioPanel, new CellConstraints(4, 4, 1, 1, CellConstraints.FILL, CellConstraints.TOP, new Insets(2, 0, 0, 0))); priorityLabel.setLabelFor(casePriority); refreshComponents.visibleOn("changepriority", casePriority, priorityLabel); refreshComponents.enabledOn("changepriority", casePriority, priorityLabel); casePriority.setRenderer(new DefaultListCellRenderer() { public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { final PriorityValue itemValue = (PriorityValue) value; String val = itemValue == null ? "" : itemValue.text().get(); JPanel panel = new JPanel(); panel.setOpaque(false); FormLayout layout = new FormLayout("10dlu, 60dlu:grow", "pref"); DefaultFormBuilder formBuilder = new DefaultFormBuilder(layout, panel); panel.setBorder(BorderFactory.createEmptyBorder(2, 0, 1, 0)); JLabel label = new JLabel() { @Override protected void paintComponent(Graphics g) { Color color = getBackground(); if (itemValue != null) { if (!Strings.empty(itemValue.color().get())) color = new Color(parseInt(itemValue.color().get())); else color = Color.BLACK; } final Color FILL_COLOR = ColorUtil.removeAlpha(color); Graphics2D g2 = (Graphics2D) g.create(); try { g2.setRenderingHint(KEY_ANTIALIASING, VALUE_ANTIALIAS_ON); g2.setColor(Color.LIGHT_GRAY); final int DIAM = Math.min(getWidth(), getHeight()); final int inset = 3; g2.fill(new Ellipse2D.Float(inset, inset, DIAM - 2 * inset, DIAM - 2 * inset)); g2.setColor(FILL_COLOR); final int border = 1; g2.fill(new Ellipse2D.Float(inset + border, inset + border, DIAM - 2 * inset - 2 * border, DIAM - 2 * inset - 2 * border)); } finally { g2.dispose(); } } }; label.setPreferredSize(new Dimension(10, 10)); formBuilder.add((Strings.empty(val) || "-".equals(val)) ? new JLabel() : label, new CellConstraints( 1, 1, 1, 1, CellConstraints.FILL, CellConstraints.FILL, new Insets(0, 0, 0, 0))); JLabel text = new JLabel(val); formBuilder.add(text, new CellConstraints(2, 1, 1, 1, CellConstraints.LEFT, CellConstraints.FILL, new Insets(0, 0, 0, 0))); return panel; } }); leftBuilder.nextLine(); leftBuilder.add(caseNotes, new CellConstraints(1, 6, 4, 1, CellConstraints.FILL, CellConstraints.TOP, new Insets(0, 2, 5, 0))); // Forms JLabel formsLabel = new JLabel(i18n.text(WorkspaceResources.forms_label)); refreshComponents.visibleOn("changedescription", formsLabel); leftBuilder.add(formsLabel, new CellConstraints(1, 7, 1, 1, CellConstraints.LEFT, CellConstraints.TOP, new Insets(5, 0, 0, 0))); leftBuilder.nextLine(); JPanel formsPanel = new JPanel(new BorderLayout()); formsPanel.add(forms, BorderLayout.WEST); leftBuilder.add(formsPanel, new CellConstraints(1, 8, 3, 1, CellConstraints.FILL, CellConstraints.FILL, new Insets(5, 0, 0, 0))); // Limit pickable dates to future Calendar calendar = Calendar.getInstance(); calendar.setTime(new Date()); calendar.add(Calendar.DAY_OF_MONTH, 1); dueOnField.getMonthView().setLowerBound(calendar.getTime()); final DateFormat dateFormat = DateFormat.getDateInstance(DateFormat.SHORT); dateFormat.setTimeZone(TimeZone.getTimeZone("UTC")); dueOnField.getEditor().setFormatterFactory( new DefaultFormatterFactory(new DatePickerFormatter(new DateFormat[] { dateFormat }) { @Override public Object stringToValue(String text) throws ParseException { Object result; try { result = super.stringToValue(text); } catch (ParseException pe) { dialogs.showMessageDialog(dueOnField, text(WorkspaceResources.wrong_format_msg) + " " + ((SimpleDateFormat) dateFormat).toPattern(), text(WorkspaceResources.wrong_format_title)); throw pe; } return result; } })); // Main panel that contains both left and right pane JPanel formsContainer = new JPanel(); formsContainer.setLayout(new GridLayout(1, 2)); formsContainer.setBorder(Borders.createEmptyBorder("2dlu, 2dlu, 2dlu, 2dlu")); formsContainer.add(leftPane); formsContainer.add(caseLogView); setViewportView(formsContainer); setFocusTraversalPolicy(new LayoutFocusTraversalPolicy()); setFocusCycleRoot(true); setFocusable(true); new RefreshWhenShowing(this, this); }
From source file:uk.ac.ebi.mnb.importer.xls.wizzard.ReactionColumnChooser.java
License:Open Source License
public ReactionColumnChooser(ExcelHelper helper, ExcelModelProperties properties) { super();//from www . j a v a2 s . co m this.helper = helper; this.properties = properties; columns.add("-"); // no selection for (char c = 'A'; c <= 'Z'; ++c) { columns.add(Character.toString(c)); } start = new JSpinner(new SpinnerNumberModel(1, 1, 4000, 1)); end = new JSpinner(new SpinnerNumberModel(1, 1, 4000, 1)); abbreviation = ComboBoxFactory.newComboBox(columns); description = ComboBoxFactory.newComboBox(columns); equation = ComboBoxFactory.newComboBox(columns); classification = ComboBoxFactory.newComboBox(columns); subsystem = ComboBoxFactory.newComboBox(columns); source = ComboBoxFactory.newComboBox(columns); locus = ComboBoxFactory.newComboBox(columns); FormLayout layout = new FormLayout("right:p:grow, 4dlu, min, 4dlu, right:p:grow, 4dlu, min", "p"); // content panel setLayout(layout); removeAll(); add(LabelFactory.newFormLabel("Start Row"), cc.xy(1, layout.getRowCount())); add(start, cc.xy(3, layout.getRowCount())); add(LabelFactory.newFormLabel("End Row"), cc.xy(5, layout.getRowCount())); add(end, cc.xy(7, layout.getRowCount())); layout.appendRow(new RowSpec(Sizes.DLUY2)); layout.appendRow(new RowSpec(Sizes.PREFERRED)); add(new JSeparator(), cc.xyw(1, layout.getRowCount(), 7)); layout.appendRow(new RowSpec(Sizes.DLUY2)); layout.appendRow(new RowSpec(Sizes.PREFERRED)); add(LabelFactory.newFormLabel("Identifier/Abbreviation"), cc.xy(1, layout.getRowCount())); add(abbreviation, cc.xy(3, layout.getRowCount())); add(LabelFactory.newFormLabel("Name/Description"), cc.xy(5, layout.getRowCount())); add(description, cc.xy(7, layout.getRowCount())); layout.appendRow(new RowSpec(Sizes.DLUY2)); layout.appendRow(new RowSpec(Sizes.PREFERRED)); add(LabelFactory.newFormLabel("Reaction Equation"), cc.xy(1, layout.getRowCount())); add(equation, cc.xy(3, layout.getRowCount())); add(LabelFactory.newFormLabel("Classification (EC/TC Number)"), cc.xy(5, layout.getRowCount())); add(classification, cc.xy(7, layout.getRowCount())); layout.appendRow(new RowSpec(Sizes.DLUY2)); layout.appendRow(new RowSpec(Sizes.PREFERRED)); add(LabelFactory.newFormLabel("Subsystem/Reaction type"), cc.xy(1, layout.getRowCount())); add(subsystem, cc.xy(3, layout.getRowCount())); add(LabelFactory.newFormLabel("Source/Reference:"), cc.xy(5, layout.getRowCount())); add(source, cc.xy(7, layout.getRowCount())); layout.appendRow(new RowSpec(Sizes.DLUY2)); layout.appendRow(new RowSpec(Sizes.PREFERRED)); add(LabelFactory.newFormLabel("Locus"), cc.xy(1, layout.getRowCount())); add(locus, cc.xy(3, layout.getRowCount())); layout.appendRow(new RowSpec(Sizes.DLUY2)); layout.appendRow(new RowSpec(Sizes.PREFERRED)); JPanel extra = PanelFactory.createDialogPanel("right:p:grow, 4dlu, min, 4dlu, right:p:grow, 4dlu, min", "p, 2dlu, p, 2dlu, p"); deltaG = ComboBoxFactory.newComboBox(columns); deltaGError = ComboBoxFactory.newComboBox(columns); minFlux = ComboBoxFactory.newComboBox(columns); maxFlux = ComboBoxFactory.newComboBox(columns); direction = ComboBoxFactory.newComboBox(columns); extra.add(LabelFactory.newFormLabel("Free energy / G"), cc.xy(1, 1)); extra.add(deltaG, cc.xy(3, 1)); extra.add(LabelFactory.newFormLabel("Free energy / G (error)"), cc.xy(5, 1)); extra.add(deltaGError, cc.xy(7, 1)); extra.add(LabelFactory.newFormLabel("Lower Bound Flux"), cc.xy(1, 3)); extra.add(minFlux, cc.xy(3, 3)); extra.add(LabelFactory.newFormLabel("Upper Bound Flux"), cc.xy(5, 3)); extra.add(maxFlux, cc.xy(7, 3)); extra.add(LabelFactory.newFormLabel("Direction"), cc.xy(1, 5)); extra.add(direction, cc.xy(3, 5)); add(new ExpandableComponentGroup("Extra Columns", extra), cc.xyw(1, layout.getRowCount(), 7, CellConstraints.FILL, CellConstraints.FILL)); layout.appendRow(new RowSpec(Sizes.DLUY2)); layout.appendRow(new RowSpec(Sizes.PREFERRED)); add(new JSeparator(), cc.xyw(1, layout.getRowCount(), 7)); layout.appendRow(new RowSpec(Sizes.DLUY2)); layout.appendRow(new RowSpec(Sizes.PREFERRED)); table = new SelectionTable(helper); JScrollPane pane = new BorderlessScrollPane(table, JScrollPane.HORIZONTAL_SCROLLBAR_ALWAYS); RowNumberTable rnt = new RowNumberTable(table); pane.setRowHeaderView(rnt); pane.setCorner(JScrollPane.UPPER_LEFT_CORNER, rnt.getTableHeader()); pane.setPreferredSize(new Dimension(800, table.getRowHeight() * 10)); add(pane, cc.xyw(1, layout.getRowCount(), 7)); // set previous selections Preferences pref = Preferences.userNodeForPackage(ReactionColumnChooser.class); start.setValue(pref.getInt(properties.getPreferenceKey("rxn.start"), 1)); end.setValue(pref.getInt(properties.getPreferenceKey("rxn.end"), 10)); abbreviation.setSelectedIndex(pref.getInt(properties.getPreferenceKey(ABBREVIATION), 0)); description.setSelectedIndex(pref.getInt(properties.getPreferenceKey(DESCRIPTION), 0)); equation.setSelectedIndex(pref.getInt(properties.getPreferenceKey(EQUATION), 0)); classification.setSelectedIndex(pref.getInt(properties.getPreferenceKey(CLASSIFICATION), 0)); subsystem.setSelectedIndex(pref.getInt(properties.getPreferenceKey(SUBSYSTEM), 0)); source.setSelectedIndex(pref.getInt(properties.getPreferenceKey(SOURCE), 0)); locus.setSelectedIndex(pref.getInt(properties.getPreferenceKey(LOCUS), 0)); minFlux.setSelectedIndex(pref.getInt(properties.getPreferenceKey(MIN_FLUX), 0)); maxFlux.setSelectedIndex(pref.getInt(properties.getPreferenceKey(MAX_FLUX), 0)); deltaG.setSelectedIndex(pref.getInt(properties.getPreferenceKey(FREE_ENERGY), 0)); deltaGError.setSelectedIndex(pref.getInt(properties.getPreferenceKey(FREE_ENERGY_ERROR), 0)); direction.setSelectedIndex(pref.getInt(properties.getPreferenceKey(DIRECTION), 0)); // listeners to change table header name abbreviation.addActionListener(new TableHeaderChanger(abbreviation, "Abbreviation")); description.addActionListener(new TableHeaderChanger(description, "Description")); equation.addActionListener(new TableHeaderChanger(equation, "Equation")); classification.addActionListener(new TableHeaderChanger(classification, "Classification")); source.addActionListener(new TableHeaderChanger(source, "Source")); subsystem.addActionListener(new TableHeaderChanger(subsystem, "Subsystem")); // Spinner listeners for shading the table start.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent ce) { table.setStart((Integer) start.getValue()); repaint(); } }); end.addChangeListener(new ChangeListener() { public void stateChanged(ChangeEvent ce) { table.setEnd((Integer) end.getValue()); repaint(); } }); }