List of usage examples for com.jgoodies.forms.layout ColumnSpec CENTER
DefaultAlignment CENTER
To view the source code for com.jgoodies.forms.layout ColumnSpec CENTER.
Click Source Link
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 w w . ja v a2s. 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:com.spirit.medios.gui.panel.JPOrdenTrabajo.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Open Source Project license - unknown DefaultComponentFactory compFactory = DefaultComponentFactory.getInstance(); jtpOrdenTrabajo = new JideTabbedPane(); spGeneral = new JScrollPane(); panelOrdenTrabajo = new JPanel(); lblCodigo = new JLabel(); txtCodigo = new JTextField(); lblEstadoOrden = new JLabel(); cmbEstadoOrden = new JComboBox(); txtDescripcionOrden = new JTextField(); lblDescripcionOrden = new JLabel(); lblCorporacion = new JLabel(); txtCorporacion = new JTextField(); btnBuscarCorporacion = new JButton(); lblFechaCreacion = new JLabel(); txtFechaCreacion = new JTextField(); txtCliente = new JTextField(); lblCliente = new JLabel(); btnBuscarCliente = new JButton(); lblFechaLimiteOrden = new JLabel(); cmbFechaLimiteOrden = new DateComboBox(); lblOficina = new JLabel(); txtOficina = new JTextField(); btnBuscarClienteOficina = new JButton(); lblFechaEntregaOrden = new JLabel(); cmbFechaEntregaOrden = new DateComboBox(); lblCampana = new JLabel(); cmbCampana = new JComboBox(); lblAsignadoAOrden = new JLabel(); cmbAsignadoAOrden = new JComboBox(); lblDirector = new JLabel(); cmbDirector = new JComboBox(); lblUrlPropuestaOrden = new JLabel(); txtUrlPropuestaOrden = new JTextField(); btnAgregarArchivoPropuestaOrden = new JButton(); btnVerArchivoPropuestaOrden = new JButton(); lblObservacion = new JLabel(); scrollPane2 = new JScrollPane(); txtObservacion = new JTextArea(); panelProductoCliente = new JPanel(); btnSeleccionarTodo = new JButton(); btnDeseleccionarTodo = new JButton(); spCbListProductos = new JScrollPane(); cbListProductos = new CheckBoxList(); spDetalle = new JScrollPane(); panelOrdenTrabajoDetalle = new JPanel(); lblTipo = new JLabel(); cmbTipo = new JComboBox(); lblFechaLimiteOrdenDetalle = new JLabel(); cmbFechaLimiteOrdenDetalle = new DateComboBox(); lblEquipo = new JLabel(); cmbEquipo = new JComboBox(); lblFechaEntregaOrdenDetall = new JLabel(); cmbFechaEntregaOrdenDetalle = new DateComboBox(); lblAsignadoAOrdenDetalle = new JLabel(); cmbAsignadoAOrdenDetalle = new JComboBox(); ttJefe = compFactory.createTitle("Jefe"); lblEstadoOrdenDetalle = new JLabel(); cmbEstadoOrdenDetalle = new JComboBox(); lblSubTipo = new JLabel(); cmbSubTipo = new JComboBox(); lblUrlDescripcionOrdenDetalle = new JLabel(); btnAgregarArchivoDescripcion = new JButton(); txtUrlDescripcionOrdenDetalle = new JTextField(); btnLimpiarArchivoDescripcion = new JButton(); lblUrlPropuestaDetalle = new JLabel(); btnAgregarArchivoPropuestaOrdenDetalle = new JButton(); txtUrlPropuestaOrdenDetalle = new JTextField(); btnLimpiarArchivoPropuesta = new JButton(); lblDescripcion = new JLabel(); scrollPane1 = new JScrollPane(); txtDescripcionOrdenDetalle = new JTextArea(); panel2 = new JPanel(); btnAgregarDetalle = new JButton(); btnActualizarDetalle = new JButton(); btnEliminarDetalle = new JButton(); scOrdenTrabajoDetalle = new JScrollPane(); tblOrdenTrabajoDetalle = new JTable(); CellConstraints cc = new CellConstraints(); //======== this ======== setLayout(new FormLayout("default:grow", "fill:default:grow")); //======== jtpOrdenTrabajo ======== {/*w w w . ja v a2 s . co m*/ //======== spGeneral ======== { //======== panelOrdenTrabajo ======== { panelOrdenTrabajo.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.dluX(10)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.RIGHT, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(110)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(125)), 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(50)), 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(10)) }, new RowSpec[] { new RowSpec(Sizes.dluY(12)), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(15)), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(15)), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(15)), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(15)), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(15)), new RowSpec(RowSpec.TOP, Sizes.DLUY8, FormSpec.NO_GROW), FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(15)), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.dluY(100), FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(12)) })); //---- lblCodigo ---- lblCodigo.setText("C\u00f3digo:"); panelOrdenTrabajo.add(lblCodigo, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panelOrdenTrabajo.add(txtCodigo, cc.xywh(5, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblEstadoOrden ---- lblEstadoOrden.setText("Estado:"); panelOrdenTrabajo.add(lblEstadoOrden, cc.xywh(13, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panelOrdenTrabajo.add(cmbEstadoOrden, cc.xywh(15, 3, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); panelOrdenTrabajo.add(txtDescripcionOrden, cc.xywh(5, 5, 15, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblDescripcionOrden ---- lblDescripcionOrden.setText("Descripci\u00f3n:"); panelOrdenTrabajo.add(lblDescripcionOrden, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); //---- lblCorporacion ---- lblCorporacion.setText("Corporaci\u00f3n:"); panelOrdenTrabajo.add(lblCorporacion, cc.xywh(3, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panelOrdenTrabajo.add(txtCorporacion, cc.xywh(5, 7, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); panelOrdenTrabajo.add(btnBuscarCorporacion, cc.xywh(9, 7, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- lblFechaCreacion ---- lblFechaCreacion.setText("Fecha de creaci\u00f3n:"); panelOrdenTrabajo.add(lblFechaCreacion, cc.xywh(13, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panelOrdenTrabajo.add(txtFechaCreacion, cc.xywh(15, 7, 5, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); panelOrdenTrabajo.add(txtCliente, cc.xywh(5, 9, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblCliente ---- lblCliente.setText("Cliente:"); panelOrdenTrabajo.add(lblCliente, cc.xywh(3, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panelOrdenTrabajo.add(btnBuscarCliente, cc.xywh(9, 9, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- lblFechaLimiteOrden ---- lblFechaLimiteOrden.setText("Fecha l\u00edmite:"); panelOrdenTrabajo.add(lblFechaLimiteOrden, cc.xywh(13, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panelOrdenTrabajo.add(cmbFechaLimiteOrden, cc.xywh(15, 9, 5, 1)); //---- lblOficina ---- lblOficina.setText("Oficina:"); panelOrdenTrabajo.add(lblOficina, cc.xywh(3, 11, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panelOrdenTrabajo.add(txtOficina, cc.xywh(5, 11, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); panelOrdenTrabajo.add(btnBuscarClienteOficina, cc.xywh(9, 11, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- lblFechaEntregaOrden ---- lblFechaEntregaOrden.setText("Fecha de entrega:"); panelOrdenTrabajo.add(lblFechaEntregaOrden, cc.xywh(13, 11, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panelOrdenTrabajo.add(cmbFechaEntregaOrden, cc.xywh(15, 11, 5, 1)); //---- lblCampana ---- lblCampana.setText("Campa\u00f1a:"); panelOrdenTrabajo.add(lblCampana, cc.xywh(3, 13, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panelOrdenTrabajo.add(cmbCampana, cc.xywh(5, 13, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblAsignadoAOrden ---- lblAsignadoAOrden.setText("Ejecutivo(a):"); panelOrdenTrabajo.add(lblAsignadoAOrden, cc.xywh(3, 15, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panelOrdenTrabajo.add(cmbAsignadoAOrden, cc.xywh(5, 15, 3, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblDirector ---- lblDirector.setText("Director(a):"); panelOrdenTrabajo.add(lblDirector, cc.xywh(9, 15, 3, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panelOrdenTrabajo.add(cmbDirector, cc.xywh(13, 15, 7, 1)); //---- lblUrlPropuestaOrden ---- lblUrlPropuestaOrden.setText("Archivo Propuesta:"); panelOrdenTrabajo.add(lblUrlPropuestaOrden, cc.xywh(3, 17, 3, 1, CellConstraints.LEFT, CellConstraints.FILL)); panelOrdenTrabajo.add(txtUrlPropuestaOrden, cc.xywh(3, 19, 13, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); panelOrdenTrabajo.add(btnAgregarArchivoPropuestaOrden, cc.xywh(17, 19, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); panelOrdenTrabajo.add(btnVerArchivoPropuestaOrden, cc.xywh(19, 19, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- lblObservacion ---- lblObservacion.setText("Observaci\u00f3n:"); panelOrdenTrabajo.add(lblObservacion, cc.xywh(3, 21, 1, 1, CellConstraints.LEFT, CellConstraints.FILL)); //======== scrollPane2 ======== { //---- txtObservacion ---- txtObservacion.setLineWrap(true); scrollPane2.setViewportView(txtObservacion); } panelOrdenTrabajo.add(scrollPane2, cc.xywh(3, 23, 17, 1, CellConstraints.FILL, CellConstraints.FILL)); } spGeneral.setViewportView(panelOrdenTrabajo); } jtpOrdenTrabajo.addTab("General", spGeneral); //======== panelProductoCliente ======== { panelProductoCliente.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(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(12)) }, new RowSpec[] { new RowSpec(Sizes.dluY(12)), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.CENTER, Sizes.dluY(80), FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(12)) })); //---- btnSeleccionarTodo ---- btnSeleccionarTodo.setText("Seleccionar todo"); panelProductoCliente.add(btnSeleccionarTodo, cc.xy(7, 3)); //---- btnDeseleccionarTodo ---- btnDeseleccionarTodo.setText("Deseleccionar todo"); panelProductoCliente.add(btnDeseleccionarTodo, cc.xy(7, 5)); //======== spCbListProductos ======== { spCbListProductos.setViewportView(cbListProductos); } panelProductoCliente.add(spCbListProductos, cc.xywh(3, 3, 3, 7)); } jtpOrdenTrabajo.addTab("Productos", panelProductoCliente); //======== spDetalle ======== { //======== panelOrdenTrabajoDetalle ======== { panelOrdenTrabajoDetalle.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(170)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.CENTER, Sizes.dluX(12), 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, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(12)) }, new RowSpec[] { new RowSpec(Sizes.dluY(12)), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(15)), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(15)), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(15)), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.DLUY14), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(15)), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(15)), new RowSpec(RowSpec.TOP, Sizes.DLUY8, FormSpec.NO_GROW), FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.dluY(40), FormSpec.DEFAULT_GROW), new RowSpec(RowSpec.TOP, Sizes.DLUY3, FormSpec.NO_GROW), new RowSpec(Sizes.DLUY3), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(90)), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(12)) })); //---- lblTipo ---- lblTipo.setText("Tipo:"); panelOrdenTrabajoDetalle.add(lblTipo, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panelOrdenTrabajoDetalle.add(cmbTipo, cc.xywh(5, 3, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblFechaLimiteOrdenDetalle ---- lblFechaLimiteOrdenDetalle.setText("Fecha l\u00edmite:"); panelOrdenTrabajoDetalle.add(lblFechaLimiteOrdenDetalle, cc.xywh(11, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panelOrdenTrabajoDetalle.add(cmbFechaLimiteOrdenDetalle, cc.xy(13, 3)); //---- lblEquipo ---- lblEquipo.setText("Equipo:"); panelOrdenTrabajoDetalle.add(lblEquipo, cc.xywh(3, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panelOrdenTrabajoDetalle.add(cmbEquipo, cc.xywh(5, 5, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblFechaEntregaOrdenDetall ---- lblFechaEntregaOrdenDetall.setText("Fecha de entrega:"); panelOrdenTrabajoDetalle.add(lblFechaEntregaOrdenDetall, cc.xywh(11, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panelOrdenTrabajoDetalle.add(cmbFechaEntregaOrdenDetalle, cc.xy(13, 5)); //---- lblAsignadoAOrdenDetalle ---- lblAsignadoAOrdenDetalle.setText("Asignado a:"); panelOrdenTrabajoDetalle.add(lblAsignadoAOrdenDetalle, cc.xywh(3, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panelOrdenTrabajoDetalle.add(cmbAsignadoAOrdenDetalle, cc.xywh(5, 7, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); panelOrdenTrabajoDetalle.add(ttJefe, cc.xy(7, 7)); //---- lblEstadoOrdenDetalle ---- lblEstadoOrdenDetalle.setText("Estado:"); panelOrdenTrabajoDetalle.add(lblEstadoOrdenDetalle, cc.xywh(11, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panelOrdenTrabajoDetalle.add(cmbEstadoOrdenDetalle, cc.xywh(13, 7, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblSubTipo ---- lblSubTipo.setText("Subtipo:"); panelOrdenTrabajoDetalle.add(lblSubTipo, cc.xywh(3, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panelOrdenTrabajoDetalle.add(cmbSubTipo, cc.xywh(5, 9, 1, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); //---- lblUrlDescripcionOrdenDetalle ---- lblUrlDescripcionOrdenDetalle.setText("Archivo Descripci\u00f3n:"); panelOrdenTrabajoDetalle.add(lblUrlDescripcionOrdenDetalle, cc.xywh(3, 11, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panelOrdenTrabajoDetalle.add(btnAgregarArchivoDescripcion, cc.xywh(15, 11, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); panelOrdenTrabajoDetalle.add(txtUrlDescripcionOrdenDetalle, cc.xywh(5, 11, 9, 1, CellConstraints.DEFAULT, CellConstraints.FILL)); panelOrdenTrabajoDetalle.add(btnLimpiarArchivoDescripcion, cc.xywh(17, 11, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- lblUrlPropuestaDetalle ---- lblUrlPropuestaDetalle.setText("Archivo Propuesta:"); panelOrdenTrabajoDetalle.add(lblUrlPropuestaDetalle, cc.xywh(3, 13, 1, 1, CellConstraints.RIGHT, CellConstraints.FILL)); panelOrdenTrabajoDetalle.add(btnAgregarArchivoPropuestaOrdenDetalle, cc.xywh(15, 13, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); panelOrdenTrabajoDetalle.add(txtUrlPropuestaOrdenDetalle, cc.xywh(5, 13, 9, 1, CellConstraints.FILL, CellConstraints.FILL)); panelOrdenTrabajoDetalle.add(btnLimpiarArchivoPropuesta, cc.xywh(17, 13, 1, 1, CellConstraints.FILL, CellConstraints.FILL)); //---- lblDescripcion ---- lblDescripcion.setText("Descripci\u00f3n:"); panelOrdenTrabajoDetalle.add(lblDescripcion, cc.xywh(3, 15, 1, 1, CellConstraints.LEFT, CellConstraints.FILL)); //======== scrollPane1 ======== { //---- txtDescripcionOrdenDetalle ---- txtDescripcionOrdenDetalle.setLineWrap(true); scrollPane1.setViewportView(txtDescripcionOrdenDetalle); } panelOrdenTrabajoDetalle.add(scrollPane1, cc.xywh(3, 17, 15, 1)); //======== panel2 ======== { panel2.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"); panel2.add(btnAgregarDetalle, cc.xy(1, 1)); //---- btnActualizarDetalle ---- btnActualizarDetalle.setText("U"); panel2.add(btnActualizarDetalle, cc.xy(3, 1)); //---- btnEliminarDetalle ---- btnEliminarDetalle.setText("E"); panel2.add(btnEliminarDetalle, cc.xy(5, 1)); } panelOrdenTrabajoDetalle.add(panel2, cc.xywh(3, 21, 3, 1)); //======== scOrdenTrabajoDetalle ======== { //---- tblOrdenTrabajoDetalle ---- tblOrdenTrabajoDetalle.setModel(new DefaultTableModel(new Object[][] {}, new String[] { "Subtipo", "Equipo", "Asignado a", "Fecha L\u00edmite", "Estado" }) { boolean[] columnEditable = new boolean[] { false, false, false, false, false }; @Override public boolean isCellEditable(int rowIndex, int columnIndex) { return columnEditable[columnIndex]; } }); tblOrdenTrabajoDetalle.setPreferredScrollableViewportSize(new Dimension(450, 150)); tblOrdenTrabajoDetalle.setAutoResizeMode(JTable.AUTO_RESIZE_ALL_COLUMNS); scOrdenTrabajoDetalle.setViewportView(tblOrdenTrabajoDetalle); } panelOrdenTrabajoDetalle.add(scOrdenTrabajoDetalle, cc.xywh(3, 23, 15, 3, CellConstraints.FILL, CellConstraints.FILL)); } spDetalle.setViewportView(panelOrdenTrabajoDetalle); } jtpOrdenTrabajo.addTab("Detalle", spDetalle); } add(jtpOrdenTrabajo, cc.xy(1, 1)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:com.spirit.nomina.gui.panel.JPRolPago.java
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner Open Source Project license - unknown lblTipoRol = new JLabel(); cmbTipoRol = new JComboBox(); lblFechaInicio = new JLabel(); cmbFechaInicio = new DateComboBox(); lblTipoContrato = new JLabel(); cmbTipoContrato = new JComboBox(); lblFechaFin = new JLabel(); cmbFechaFin = new DateComboBox(); lblMes = new JLabel(); cmbMes = new JComboBox(); btnFiltrar = new JButton(); lblAnio = new JLabel(); cmbAnio = new JComboBox(); lblOficina = new JLabel(); cmbOficina = new JComboBox(); cbReporteCostes = new JCheckBox(); lblRubroEventual = new JLabel(); txtEstado = new JTextField(); lblDepartamento = new JLabel(); cmbDepartamento = new JComboBox(); btnGenerarReporte = new JButton(); btnCerrarRol = new JButton(); scpTablaRolPago = new JScrollPane(); tblRolPago = new JTable(); CellConstraints cc = new CellConstraints(); //======== this ======== setName("Generacion de Rol Pago"); setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(Sizes.dluX(12)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.RIGHT, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(35)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(35)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(25)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.CENTER, Sizes.dluX(25), FormSpec.NO_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(40)), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(50)), 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.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(Sizes.dluX(12)) }, new RowSpec[] { new RowSpec(Sizes.dluY(12)), 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, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.CENTER, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(Sizes.dluY(12)) })); //---- lblTipoRol ---- lblTipoRol.setText("Tipo Rol:"); add(lblTipoRol, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); add(cmbTipoRol, cc.xywh(5, 3, 7, 1)); //---- lblFechaInicio ---- lblFechaInicio.setText("Fecha Inicio: "); add(lblFechaInicio, cc.xywh(15, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); add(cmbFechaInicio, cc.xywh(17, 3, 3, 1)); //---- lblTipoContrato ---- lblTipoContrato.setText("Tipo de Contrato:"); add(lblTipoContrato, cc.xy(3, 5));//from w w w . j a v a 2 s .c o m add(cmbTipoContrato, cc.xywh(5, 5, 7, 1)); //---- lblFechaFin ---- lblFechaFin.setText("Fecha Fin: "); add(lblFechaFin, cc.xywh(15, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); add(cmbFechaFin, cc.xywh(17, 5, 3, 1)); //---- lblMes ---- lblMes.setText("Mes: "); add(lblMes, cc.xywh(3, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- cmbMes ---- cmbMes.setEditable(false); cmbMes.setModel(new DefaultComboBoxModel(new String[] { "ENERO", "FEBRERO", "MARZO", "ABRIL", "MAYO", "JUNIO", "JULIO", "AGOSTO", "SEPTIEMBRE", "OCTUBRE", "NOVIEMBRE", "DICIEMBRE" })); add(cmbMes, cc.xywh(5, 7, 3, 1)); //---- btnFiltrar ---- btnFiltrar.setText("Filtrar"); add(btnFiltrar, cc.xy(19, 7)); //---- lblAnio ---- lblAnio.setText("A\u00f1o:"); add(lblAnio, cc.xy(3, 9)); //---- cmbAnio ---- cmbAnio.setModel(new DefaultComboBoxModel(new String[] { "2009", "2010", "2011", "2012", "2013", "2014", "2015", "2016", "2019", "2020", "2021", "2022", "2023", "2024" })); add(cmbAnio, cc.xy(5, 9)); //---- lblOficina ---- lblOficina.setText("Oficina:"); add(lblOficina, cc.xywh(15, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); add(cmbOficina, cc.xywh(17, 9, 3, 1)); //---- cbReporteCostes ---- cbReporteCostes.setText("Reporte de Costes"); add(cbReporteCostes, cc.xy(21, 9)); //---- lblRubroEventual ---- lblRubroEventual.setText("Estado:"); add(lblRubroEventual, cc.xywh(3, 11, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); //---- txtEstado ---- txtEstado.setEditable(false); add(txtEstado, cc.xywh(5, 11, 3, 1)); //---- lblDepartamento ---- lblDepartamento.setText("Departamento:"); add(lblDepartamento, cc.xywh(15, 11, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); add(cmbDepartamento, cc.xywh(17, 11, 3, 1)); //---- btnGenerarReporte ---- btnGenerarReporte.setText("GENERAR ROL"); add(btnGenerarReporte, cc.xywh(5, 15, 3, 1)); //---- btnCerrarRol ---- btnCerrarRol.setText("CERRAR ROL"); add(btnCerrarRol, cc.xywh(11, 15, 3, 1)); //======== scpTablaRolPago ======== { //---- tblRolPago ---- tblRolPago.setModel(new DefaultTableModel(new Object[][] { { null, null, null, null, null }, }, new String[] { "Tipo de Rol", "Tipo de Contrato", "Mes", "A\u00f1o", "Estado" }) { Class[] columnTypes = new Class[] { Object.class, Object.class, Object.class, Integer.class, String.class }; boolean[] columnEditable = new boolean[] { false, false, false, false, false }; @Override public Class<?> getColumnClass(int columnIndex) { return columnTypes[columnIndex]; } @Override public boolean isCellEditable(int rowIndex, int columnIndex) { return columnEditable[columnIndex]; } }); scpTablaRolPago.setViewportView(tblRolPago); } add(scpTablaRolPago, cc.xywh(3, 19, 21, 3)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.archiviststoolkit.editor.DigitalObjectTreeViewer.java
License:Open Source License
private void initComponents() { // JFormDesigner - Component initialization - DO NOT MODIFY //GEN-BEGIN:initComponents // Generated using JFormDesigner non-commercial license panel3 = new JPanel(); label2 = new JLabel(); resourceTitle = new JTextField(); label3 = new JLabel(); resourceId = new JTextField(); splitPane = new JSplitPane(); digitalObjectTreeScrollPane = new JScrollPane(); panel2 = new JPanel(); addChildButton = new JButton(); addSiblingBelowButton = new JButton(); deleteDigitalObjectButton = new JButton(); exportMetsButton = new JButton(); exportMARC = new JButton(); exportMODS = new JButton(); exportDC = new JButton(); CellConstraints cc = new CellConstraints(); //======== this ======== setPreferredSize(new Dimension(1000, 600)); setOpaque(false);// w ww . j a va 2s .c om setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); setLayout(new FormLayout("default:grow", "default, default, fill:default")); //======== panel3 ======== { panel3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel3.setBackground(new Color(200, 205, 232)); panel3.setVisible(false); panel3.setLayout(new FormLayout( new ColumnSpec[] { 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"))); //---- label2 ---- label2.setText("Digtal Object Title: "); label2.setForeground(new Color(0, 0, 102)); label2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel3.add(label2, cc.xy(1, 1)); //---- resourceTitle ---- resourceTitle.setEditable(false); resourceTitle.setOpaque(false); resourceTitle.setBorder(null); panel3.add(resourceTitle, cc.xywh(3, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); //---- label3 ---- label3.setText("Resource ID: "); label3.setForeground(new Color(0, 0, 102)); label3.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel3.add(label3, cc.xy(5, 1)); //---- resourceId ---- resourceId.setEditable(false); resourceId.setOpaque(false); resourceId.setBorder(null); panel3.add(resourceId, cc.xywh(7, 1, 1, 1, CellConstraints.FILL, CellConstraints.DEFAULT)); } add(panel3, cc.xy(1, 1)); //======== splitPane ======== { splitPane.setDividerLocation(300); splitPane.setLastDividerLocation(300); splitPane.setPreferredSize(new Dimension(1000, 600)); splitPane.setOpaque(false); splitPane.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); //======== digitalObjectTreeScrollPane ======== { digitalObjectTreeScrollPane.setPreferredSize(new Dimension(250, 384)); digitalObjectTreeScrollPane.setMinimumSize(new Dimension(250, 384)); digitalObjectTreeScrollPane .setVerticalScrollBarPolicy(ScrollPaneConstants.VERTICAL_SCROLLBAR_ALWAYS); digitalObjectTreeScrollPane.setFocusable(false); digitalObjectTreeScrollPane.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); digitalObjectTreeScrollPane.setAutoscrolls(true); } splitPane.setLeftComponent(digitalObjectTreeScrollPane); } add(splitPane, cc.xy(1, 2)); //======== panel2 ======== { panel2.setOpaque(false); panel2.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); panel2.setLayout(new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.CENTER, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.UNRELATED_GAP_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("default"))); //---- addChildButton ---- addChildButton.setOpaque(false); addChildButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); addChildButton.setIcon( new ImageIcon(getClass().getResource("/org/archiviststoolkit/resources/images/addChild.jpg"))); addChildButton.setHorizontalTextPosition(SwingConstants.RIGHT); addChildButton.setToolTipText("Add Child"); addChildButton.setText("<html><c>Add<br>Child</c></html>"); addChildButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addChildActionPerformed(e); } }); panel2.add(addChildButton, cc.xy(1, 1)); //---- addSiblingBelowButton ---- addSiblingBelowButton.setOpaque(false); addSiblingBelowButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); addSiblingBelowButton.setIcon(new ImageIcon( getClass().getResource("/org/archiviststoolkit/resources/images/addSibling.png"))); addSiblingBelowButton.setToolTipText("Add Sibling Above"); addSiblingBelowButton.setText("<html>Add<br>Sibling</html>"); addSiblingBelowButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { addSiblingBelowActionPerformed(e); } }); panel2.add(addSiblingBelowButton, cc.xy(3, 1)); //---- deleteDigitalObjectButton ---- deleteDigitalObjectButton.setOpaque(false); deleteDigitalObjectButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); deleteDigitalObjectButton.setIcon( new ImageIcon(getClass().getResource("/org/archiviststoolkit/resources/images/delete.jpg"))); deleteDigitalObjectButton.setToolTipText("Delete Digital Object"); deleteDigitalObjectButton.setText("<html>Delete<br>Node</html>"); deleteDigitalObjectButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { deleteDigitalObjectButtonActionPerformed(e); } }); panel2.add(deleteDigitalObjectButton, cc.xy(5, 1)); //---- exportMetsButton ---- exportMetsButton.setOpaque(false); exportMetsButton.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); exportMetsButton.setIcon(new ImageIcon( getClass().getResource("/org/archiviststoolkit/resources/images/exportMETS.jpg"))); exportMetsButton.setToolTipText("Export METS"); exportMetsButton.setText("<html>Export<br>METS</html>"); exportMetsButton.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { exportMetsButtonActionPerformed(e); } }); panel2.add(exportMetsButton, cc.xywh(9, 1, 1, 1, CellConstraints.CENTER, CellConstraints.DEFAULT)); //---- exportMARC ---- exportMARC.setOpaque(false); exportMARC.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); exportMARC.setIcon(new ImageIcon( getClass().getResource("/org/archiviststoolkit/resources/images/exportMARC.jpg"))); exportMARC.setToolTipText("Export MARC"); exportMARC.setText("<html>Export<br>MARC</html>"); exportMARC.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { exportMARCActionPerformed(e); } }); panel2.add(exportMARC, cc.xywh(11, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- exportMODS ---- exportMODS.setOpaque(false); exportMODS.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); exportMODS.setIcon(new ImageIcon( getClass().getResource("/org/archiviststoolkit/resources/images/exportMODS.png"))); exportMODS.setToolTipText("Export MODS"); exportMODS.setText("<html>Export<br>MODS</html>"); exportMODS.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { exportMODSActionPerformed(e); } }); panel2.add(exportMODS, cc.xywh(13, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); //---- exportDC ---- exportDC.setOpaque(false); exportDC.setFont(new Font("Trebuchet MS", Font.PLAIN, 13)); exportDC.setIcon( new ImageIcon(getClass().getResource("/org/archiviststoolkit/resources/images/exportDC.png"))); exportDC.setToolTipText("Export Dublin Core"); exportDC.setText("<html>Export<br>Dublin Core</html>"); exportDC.addActionListener(new ActionListener() { public void actionPerformed(ActionEvent e) { exportDCActionPerformed(e); } }); panel2.add(exportDC, cc.xywh(15, 1, 1, 1, CellConstraints.LEFT, CellConstraints.DEFAULT)); } add(panel2, cc.xy(1, 3)); // JFormDesigner - End of component initialization //GEN-END:initComponents }
From source file:org.columba.addressbook.gui.dialog.contact.ContactEditorDialog.java
License:Mozilla Public License
private void layoutComponents() { CellConstraints cc = new CellConstraints(); // ======== this ======== Container contentPane2 = getContentPane(); contentPane2.setLayout(new BorderLayout()); // ======== dialogPane ======== {//from w w w. jav a 2 s .co m dialogPane.setBorder(Borders.DIALOG_BORDER); dialogPane.setLayout(new BorderLayout()); // ======== contentPane ======== { contentPane.setLayout(new BorderLayout()); // ======== tabbedPane2 ======== { tabbedPane2.setTabLayoutPolicy(JTabbedPane.SCROLL_TAB_LAYOUT); // ======== contactPanel ======== { contactPanel.setBorder(Borders.DIALOG_BORDER); contactPanel.setLayout(new FormLayout( new ColumnSpec[] { 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, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.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, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW) })); ((FormLayout) contactPanel.getLayout()) .setRowGroups(new int[][] { { 7, 9, 11, 17, 19, 25, 27 } }); // ======== panel7 ======== { panel7.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC, 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), }, new RowSpec[] { new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW) })); ((FormLayout) panel7.getLayout()).setRowGroups(new int[][] { { 1, 3, 5 } }); // ---- pictureButton ---- panel7.add(pictureButton, cc.xywh(1, 1, 1, 5)); // ---- fullnameButton ---- formattedNameButton.setText(bundle.getString("formattedNameButton.text")); panel7.add(formattedNameButton, cc.xy(3, 1)); panel7.add(formattedNameTextField, cc.xy(5, 1)); // ---- nicknameLabel ---- nicknameLabel.setText(bundle.getString("nicknameLabel.text")); nicknameLabel.setLabelFor(nicknameTextField); panel7.add(nicknameLabel, cc.xywh(7, 1, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panel7.add(nicknameTextField, cc.xy(9, 1)); // ---- fileunderLabel ---- fileunderLabel.setText(bundle.getString("fileunderLabel.text")); fileunderLabel.setLabelFor(fileunderComboBox); panel7.add(fileunderLabel, cc.xywh(3, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panel7.add(fileunderComboBox, cc.xy(5, 3)); panel7.add(whereLabel, cc.xywh(7, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); panel7.add(whereComboBox, cc.xy(9, 3)); // ---- categoriesButton ---- categoriesButton.setText(bundle.getString("categoriesButton.text")); panel7.add(categoriesButton, cc.xy(3, 5)); panel7.add(categoriesTextField, cc.xywh(5, 5, 5, 1)); } contactPanel.add(panel7, cc.xywh(1, 1, 7, 1)); contactPanel.add(emailSeparator, cc.xywh(1, 5, 7, 1)); contactPanel.add(emailComboBox1, cc.xy(1, 7)); // ---- emailTextField1 ---- emailTextField1.setColumns(20); contactPanel.add(emailTextField1, cc.xy(3, 7)); contactPanel.add(emailComboBox2, cc.xy(5, 7)); // ---- emailTextField2 ---- emailTextField2.setColumns(20); contactPanel.add(emailTextField2, cc.xy(7, 7)); contactPanel.add(emailComboBox3, cc.xy(1, 9)); // ---- emailTextField3 ---- emailTextField3.setColumns(20); contactPanel.add(emailTextField3, cc.xy(3, 9)); contactPanel.add(emailComboBox4, cc.xy(5, 9)); // ---- emailTextField4 ---- emailTextField4.setColumns(20); contactPanel.add(emailTextField4, cc.xy(7, 9)); // ---- preferHtmlCheckBox ---- preferHtmlCheckBox.setText(bundle.getString("preferHtmlCheckBox.text")); contactPanel.add(preferHtmlCheckBox, cc.xy(3, 11)); contactPanel.add(telephoneSeparator, cc.xywh(1, 15, 7, 1)); contactPanel.add(telephoneComboBox1, cc.xy(1, 17)); // ---- telephoneTextField1 ---- telephoneTextField1.setColumns(20); contactPanel.add(telephoneTextField1, cc.xy(3, 17)); contactPanel.add(telephoneComboBox2, cc.xy(5, 17)); // ---- telephoneTextField2 ---- telephoneTextField2.setColumns(20); contactPanel.add(telephoneTextField2, cc.xy(7, 17)); contactPanel.add(telephoneComboBox3, cc.xy(1, 19)); // ---- telephoneTextField3 ---- telephoneTextField3.setColumns(20); contactPanel.add(telephoneTextField3, cc.xy(3, 19)); contactPanel.add(telephoneComboBox4, cc.xy(5, 19)); // ---- telephoneTextField4 ---- telephoneTextField4.setColumns(20); contactPanel.add(telephoneTextField4, cc.xy(7, 19)); contactPanel.add(imSeparator, cc.xywh(1, 23, 7, 1)); contactPanel.add(imComboBox1, cc.xy(1, 25)); // ---- imTextField1 ---- imTextField1.setColumns(20); contactPanel.add(imTextField1, cc.xy(3, 25)); contactPanel.add(imComboBox2, cc.xy(5, 25)); // ---- imTextField2 ---- imTextField2.setColumns(20); contactPanel.add(imTextField2, cc.xy(7, 25)); contactPanel.add(imComboBox3, cc.xy(1, 27)); // ---- imTextField3 ---- imTextField3.setColumns(20); contactPanel.add(imTextField3, cc.xy(3, 27)); contactPanel.add(imComboBox4, cc.xy(5, 27)); // ---- imTextField4 ---- imTextField4.setColumns(20); contactPanel.add(imTextField4, cc.xy(7, 27)); } tabbedPane2.addTab(bundle.getString("contactPanel.tab.title"), contactPanel); // ======== personalInfoPanel ======== { personalInfoPanel.setBorder(Borders.DIALOG_BORDER); personalInfoPanel.setLayout(new FormLayout( new ColumnSpec[] { 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, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); ((FormLayout) personalInfoPanel.getLayout()) .setRowGroups(new int[][] { { 3, 5, 7, 9, 15, 17, 19, 25 } }); personalInfoPanel.add(webAddressSeparator, cc.xywh(1, 1, 7, 1)); // ---- homepageLabel ---- homepageLabel.setText(bundle.getString("homepageLabel.text")); homepageLabel.setLabelFor(homepageTextField); personalInfoPanel.add(homepageLabel, cc.xywh(1, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ======== panel1 ======== { panel1.setLayout( new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, new ColumnSpec(ColumnSpec.CENTER, Sizes.DEFAULT, FormSpec.NO_GROW) }, RowSpec.decodeSpecs("fill:default"))); // ---- homepageTextField ---- homepageTextField.setColumns(20); panel1.add(homepageTextField, cc.xy(1, 1)); // ---- homepageButton ---- panel1.add(homepageButton, cc.xy(3, 1)); } personalInfoPanel.add(panel1, cc.xywh(3, 3, 5, 1)); // ---- weblogLabel ---- weblogLabel.setText(bundle.getString("weblogLabel.text")); weblogLabel.setLabelFor(weblogTextField); personalInfoPanel.add(weblogLabel, cc.xywh(1, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ======== panel5 ======== { panel5.setLayout( new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("fill:default"))); // ---- weblogTextField ---- weblogTextField.setColumns(20); panel5.add(weblogTextField, cc.xy(1, 1)); // ---- weblogButton ---- panel5.add(weblogButton, cc.xy(3, 1)); } personalInfoPanel.add(panel5, cc.xywh(3, 5, 5, 1)); // ---- calendarLabel ---- calendarLabel.setText(bundle.getString("calendarLabel.text")); calendarLabel.setLabelFor(calendarTextField); personalInfoPanel.add(calendarLabel, cc.xywh(1, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ======== panel6 ======== { panel6.setLayout( new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("fill:default"))); // ---- calendarTextField ---- calendarTextField.setColumns(20); panel6.add(calendarTextField, cc.xy(1, 1)); // ---- calendarButton ---- panel6.add(calendarButton, cc.xy(3, 1)); } personalInfoPanel.add(panel6, cc.xywh(3, 7, 5, 1)); // ---- freebusyLabel ---- freebusyLabel.setText(bundle.getString("freebusyLabel.text")); freebusyLabel.setLabelFor(freebusyTextField); personalInfoPanel.add(freebusyLabel, cc.xywh(1, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ======== panel8 ======== { panel8.setLayout( new FormLayout( new ColumnSpec[] { new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW), FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("fill:default"))); // ---- freebusyTextField ---- freebusyTextField.setColumns(20); panel8.add(freebusyTextField, cc.xy(1, 1)); // ---- freebusyButton ---- panel8.add(freebusyButton, cc.xy(3, 1)); } personalInfoPanel.add(panel8, cc.xywh(3, 9, 5, 1)); personalInfoPanel.add(jobSeparator, cc.xywh(1, 13, 7, 1)); // ---- professionLabel ---- professionLabel.setText(bundle.getString("professionLabel.text")); professionLabel.setLabelFor(professionTextField); personalInfoPanel.add(professionLabel, cc.xywh(1, 15, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ---- professionTextField ---- professionTextField.setColumns(20); personalInfoPanel.add(professionTextField, cc.xy(3, 15)); // ---- titleLabel ---- titleLabel.setText(bundle.getString("titleLabel.text")); titleLabel.setLabelFor(titleTextField); personalInfoPanel.add(titleLabel, cc.xywh(5, 15, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ---- titleTextField ---- titleTextField.setColumns(20); personalInfoPanel.add(titleTextField, cc.xy(7, 15)); // ---- companyLabel ---- companyLabel.setText(bundle.getString("companyLabel.text")); companyLabel.setLabelFor(companyTextField); personalInfoPanel.add(companyLabel, cc.xywh(1, 17, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ---- companyTextField ---- companyTextField.setColumns(20); personalInfoPanel.add(companyTextField, cc.xy(3, 17)); // ---- departmentLabel ---- departmentLabel.setText(bundle.getString("departmentLabel.text")); departmentLabel.setLabelFor(departmentTextField); personalInfoPanel.add(departmentLabel, cc.xywh(5, 17, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ---- departmentTextField ---- departmentTextField.setColumns(20); personalInfoPanel.add(departmentTextField, cc.xy(7, 17)); // ---- managerLabel ---- managerLabel.setText(bundle.getString("managerLabel.text")); managerLabel.setLabelFor(managerTextField); personalInfoPanel.add(managerLabel, cc.xywh(1, 19, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ---- managerTextField ---- managerTextField.setColumns(20); personalInfoPanel.add(managerTextField, cc.xy(3, 19)); // ---- officeLabel ---- officeLabel.setText(bundle.getString("officeLabel.text")); officeLabel.setLabelFor(officeTextField); personalInfoPanel.add(officeLabel, cc.xywh(5, 19, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ---- officeTextField ---- officeTextField.setColumns(10); personalInfoPanel.add(officeTextField, cc.xy(7, 19)); personalInfoPanel.add(miscellaneousSeparator, cc.xywh(1, 23, 7, 1)); // ---- birthdayLabel ---- birthdayLabel.setText(bundle.getString("birthdayLabel.text")); personalInfoPanel.add(birthdayLabel, cc.xywh(1, 25, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ======== panel9 ======== { panel9.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.DEFAULT_COLSPEC, FormFactory.LABEL_COMPONENT_GAP_COLSPEC, FormFactory.DEFAULT_COLSPEC }, RowSpec.decodeSpecs("fill:default"))); // ---- birthdayCheckBox ---- birthdayCheckBox.setSelected(false); panel9.add(birthdayCheckBox, cc.xy(1, 1)); // ---- birthdayDatePicker ---- birthdayDatePicker.setEnabled(false); panel9.add(birthdayDatePicker, cc.xy(3, 1)); } personalInfoPanel.add(panel9, cc.xywh(3, 25, 5, 1)); birthdayLabel.setLabelFor(panel9); // ---- notesLabel ---- notesLabel.setText(bundle.getString("notesLabel.text")); notesLabel.setLabelFor(notesTextArea); personalInfoPanel.add(notesLabel, cc.xywh(1, 27, 1, 1, CellConstraints.RIGHT, CellConstraints.TOP)); // ======== scrollPane3 ======== { scrollPane3.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); // ---- notesTextArea ---- notesTextArea.setRows(5); notesTextArea.setColumns(20); notesTextArea.setTabSize(4); scrollPane3.setViewportView(notesTextArea); } personalInfoPanel.add(scrollPane3, cc.xywh(3, 27, 5, 1)); } tabbedPane2.addTab(bundle.getString("personalInfoPanel.tab.title"), personalInfoPanel); // ======== mailingAddressPanel ======== { mailingAddressPanel.setBorder(Borders.DIALOG_BORDER); mailingAddressPanel.setLayout(new FormLayout( new ColumnSpec[] { 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, new ColumnSpec(ColumnSpec.FILL, Sizes.DEFAULT, FormSpec.DEFAULT_GROW) }, new RowSpec[] { FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC, FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, new RowSpec(RowSpec.FILL, Sizes.DEFAULT, FormSpec.NO_GROW), FormFactory.LINE_GAP_ROWSPEC, FormFactory.DEFAULT_ROWSPEC })); mailingAddressPanel.add(privateSeparator, cc.xywh(1, 1, 7, 1)); // ---- privateAddressLabel ---- privateAddressLabel.setText(bundle.getString("privateAddressLabel.text")); privateAddressLabel.setLabelFor(privateAddressTextArea); mailingAddressPanel.add(privateAddressLabel, cc.xywh(1, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ======== scrollPane1 ======== { scrollPane1.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); scrollPane1.setViewportView(privateAddressTextArea); } mailingAddressPanel.add(scrollPane1, cc.xywh(3, 3, 1, 3)); // ---- privateCityLabel ---- privateCityLabel.setText(bundle.getString("privateCityLabel.text")); privateCityLabel.setLabelFor(privateCityTextField); mailingAddressPanel.add(privateCityLabel, cc.xywh(5, 3, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ---- privateCityTextField ---- privateCityTextField.setColumns(5); mailingAddressPanel.add(privateCityTextField, cc.xy(7, 3)); // ---- privateZipPostalCodeLabel ---- privateZipPostalCodeLabel.setText(bundle.getString("privateZipPostalCodeLabel.text")); privateZipPostalCodeLabel.setLabelFor(privateZipPostalCodeTextField); mailingAddressPanel.add(privateZipPostalCodeLabel, cc.xywh(5, 5, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); mailingAddressPanel.add(privateZipPostalCodeTextField, cc.xy(7, 5)); // ---- label1 ---- label1.setText(bundle.getString("streetLabel.text")); label1.setLabelFor(privateStreetTextField); mailingAddressPanel.add(label1, cc.xywh(1, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); mailingAddressPanel.add(privateStreetTextField, cc.xy(3, 7)); // ---- privateStateProvinceCountyLabel ---- privateStateProvinceCountyLabel .setText(bundle.getString("privateStateProvinceCountyLabel.text")); privateStateProvinceCountyLabel.setLabelFor(privateStateProvinceCountyTextField); mailingAddressPanel.add(privateStateProvinceCountyLabel, cc.xywh(5, 7, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); mailingAddressPanel.add(privateStateProvinceCountyTextField, cc.xy(7, 7)); // ---- privatePOBoxLabel ---- privatePOBoxLabel.setText(bundle.getString("privatePOBoxLabel.text")); privatePOBoxLabel.setLabelFor(privatePOBoxTextField); mailingAddressPanel.add(privatePOBoxLabel, cc.xywh(1, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); mailingAddressPanel.add(privatePOBoxTextField, cc.xy(3, 9)); // ---- privateCountryLabel ---- privateCountryLabel.setText(bundle.getString("privateCountryLabel.text")); privateCountryLabel.setLabelFor(privateCountryTextField); mailingAddressPanel.add(privateCountryLabel, cc.xywh(5, 9, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); mailingAddressPanel.add(privateCountryTextField, cc.xy(7, 9)); mailingAddressPanel.add(workSeparator, cc.xywh(1, 13, 7, 1)); // ---- workAddressLabel ---- workAddressLabel.setText(bundle.getString("workAddressLabel.text")); workAddressLabel.setLabelFor(workAddressTextArea); mailingAddressPanel.add(workAddressLabel, cc.xywh(1, 15, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ======== scrollPane2 ======== { scrollPane2.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); scrollPane2.setViewportView(workAddressTextArea); } mailingAddressPanel.add(scrollPane2, cc.xywh(3, 15, 1, 3)); // ---- workCityLabel ---- workCityLabel.setText(bundle.getString("workCityLabel.text")); workCityLabel.setLabelFor(workCityTextField); mailingAddressPanel.add(workCityLabel, cc.xywh(5, 15, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ---- workCityTextField ---- workCityTextField.setColumns(5); mailingAddressPanel.add(workCityTextField, cc.xy(7, 15)); // ---- workZipPostalCodeLabel ---- workZipPostalCodeLabel.setText(bundle.getString("workZipPostalCodeLabel.text")); workZipPostalCodeLabel.setLabelFor(workZipPostalCodeTextField); mailingAddressPanel.add(workZipPostalCodeLabel, cc.xywh(5, 17, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); mailingAddressPanel.add(workZipPostalCodeTextField, cc.xy(7, 17)); // ---- label2 ---- label2.setText(bundle.getString("streetLabel.text")); label2.setLabelFor(workStreetTextField); mailingAddressPanel.add(label2, cc.xywh(1, 19, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); mailingAddressPanel.add(workStreetTextField, cc.xy(3, 19)); // ---- workStateProvinceCountyLabel ---- workStateProvinceCountyLabel.setText(bundle.getString("workStateProvinceCountyLabel.text")); workStateProvinceCountyLabel.setLabelFor(workStateProvinceCountyTextField); mailingAddressPanel.add(workStateProvinceCountyLabel, cc.xywh(5, 19, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); mailingAddressPanel.add(workStateProvinceCountyTextField, cc.xy(7, 19)); // ---- workPOBoxLabel ---- workPOBoxLabel.setText(bundle.getString("workPOBoxLabel.text")); workPOBoxLabel.setLabelFor(workPOBoxTextField); mailingAddressPanel.add(workPOBoxLabel, cc.xywh(1, 21, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); mailingAddressPanel.add(workPOBoxTextField, cc.xy(3, 21)); // ---- workCountryLabel ---- workCountryLabel.setText(bundle.getString("workCountryLabel.text")); workCountryLabel.setLabelFor(workCountryTextField); mailingAddressPanel.add(workCountryLabel, cc.xywh(5, 21, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); mailingAddressPanel.add(workCountryTextField, cc.xy(7, 21)); mailingAddressPanel.add(otherSeparator, cc.xywh(1, 25, 7, 1)); // ---- otherAddressLabel ---- otherAddressLabel.setLabelFor(otherAddressTextArea); mailingAddressPanel.add(otherAddressLabel, cc.xywh(1, 27, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); // ======== scrollPane4 ======== { scrollPane4.setVerticalScrollBarPolicy(JScrollPane.VERTICAL_SCROLLBAR_ALWAYS); scrollPane4.setViewportView(otherAddressTextArea); } mailingAddressPanel.add(scrollPane4, cc.xywh(3, 27, 1, 3)); // ---- otherCityLabel ---- otherCityLabel.setText(bundle.getString("otherCityLabel.text")); otherCityLabel.setLabelFor(otherCityTextField); mailingAddressPanel.add(otherCityLabel, cc.xywh(5, 27, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); mailingAddressPanel.add(otherCityTextField, cc.xy(7, 27)); // ---- otherZipPostalCodeLabel ---- otherZipPostalCodeLabel.setText(bundle.getString("otherZipPostalCodeLabel.text")); otherZipPostalCodeLabel.setLabelFor(otherZipPostalCodeTextField); mailingAddressPanel.add(otherZipPostalCodeLabel, cc.xywh(5, 29, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); mailingAddressPanel.add(otherZipPostalCodeTextField, cc.xy(7, 29)); // ---- label3 ---- label3.setText(bundle.getString("streetLabel.text")); label3.setLabelFor(otherStreetTextField); mailingAddressPanel.add(label3, cc.xywh(1, 31, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); mailingAddressPanel.add(otherStreetTextField, cc.xy(3, 31)); // ---- otherStateProvinceCountyLabel ---- otherStateProvinceCountyLabel .setText(bundle.getString("otherStateProvinceCountyLabel.text")); otherStateProvinceCountyLabel.setLabelFor(otherStateProvinceCountyTextField); mailingAddressPanel.add(otherStateProvinceCountyLabel, cc.xywh(5, 31, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); mailingAddressPanel.add(otherStateProvinceCountyTextField, cc.xy(7, 31)); // ---- otherPOBoxLabel ---- otherPOBoxLabel.setText(bundle.getString("otherPOBoxLabel.text")); otherPOBoxLabel.setLabelFor(otherPOBoxTextField); mailingAddressPanel.add(otherPOBoxLabel, cc.xywh(1, 33, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); mailingAddressPanel.add(otherPOBoxTextField, cc.xy(3, 33)); // ---- otherCountryLabel ---- otherCountryLabel.setText(bundle.getString("otherCountryLabel.text")); otherCountryLabel.setLabelFor(otherCountryTextField); mailingAddressPanel.add(otherCountryLabel, cc.xywh(5, 33, 1, 1, CellConstraints.RIGHT, CellConstraints.DEFAULT)); mailingAddressPanel.add(otherCountryTextField, cc.xy(7, 33)); } tabbedPane2.addTab(bundle.getString("mailingAddressPanel.tab.title"), mailingAddressPanel); } contentPane.add(tabbedPane2, BorderLayout.NORTH); } dialogPane.add(contentPane, BorderLayout.CENTER); // ======== buttonBar ======== { buttonBar.setBorder(Borders.BUTTON_BAR_GAP_BORDER); buttonBar.setLayout(new FormLayout( new ColumnSpec[] { FormFactory.GLUE_COLSPEC, FormFactory.BUTTON_COLSPEC, FormFactory.RELATED_GAP_COLSPEC, FormFactory.BUTTON_COLSPEC }, RowSpec.decodeSpecs("pref"))); // ---- okButton ---- okButton.setText(bundle.getString("okButton.text")); buttonBar.add(okButton, cc.xy(2, 1)); // ---- cancelButton ---- cancelButton.setText(bundle.getString("cancelButton.text")); buttonBar.add(cancelButton, cc.xy(4, 1)); } dialogPane.add(buttonBar, BorderLayout.SOUTH); } contentPane2.add(dialogPane, BorderLayout.CENTER); }
From source file:org.eclipse.wb.internal.swing.FormLayout.gef.header.edit.ColumnHeaderEditPart.java
License:Open Source License
@Override protected Figure createFigure() { Figure newFigure = new Figure() { @Override// w w w . j a v a 2 s.c om protected void paintClientArea(Graphics graphics) { Rectangle r = getClientArea(); // draw rectangle graphics.setForegroundColor(IColorConstants.buttonDarker); graphics.drawLine(r.x, r.y, r.x, r.bottom()); graphics.drawLine(r.right() - 1, r.y, r.right() - 1, r.bottom()); // draw column index int titleLeft; int titleRight; { String title = "" + (1 + getIndex()); Dimension textExtents = graphics.getTextExtent(title); if (r.width < 3 + textExtents.width + 3) { return; } // draw title titleLeft = r.x + (r.width - textExtents.width) / 2; titleRight = titleLeft + textExtents.width; int y = r.y + (r.height - textExtents.height) / 2; graphics.setForegroundColor(IColorConstants.black); graphics.drawText(title, titleLeft, y); } // draw alignment indicator if (titleLeft - r.x > 3 + 7 + 3) { Image image; if (m_column.getAlignment() == ColumnSpec.LEFT) { image = getImage("left.gif"); } else if (m_column.getAlignment() == ColumnSpec.RIGHT) { image = getImage("right.gif"); } else if (m_column.getAlignment() == ColumnSpec.CENTER) { image = getImage("center.gif"); } else { image = getImage("fill.gif"); } // int x = r.x + 2; drawCentered(graphics, image, x); } // draw grow indicator if (m_column.hasGrow()) { if (titleRight + 3 + 7 + 3 < r.right()) { Image image = getImage("grow.gif"); drawCentered(graphics, image, r.right() - 3 - image.getBounds().width); } } } private Image getImage(String name) { return ColumnHeaderEditPart.this.getImage("alignment/h/" + name); } private void drawCentered(Graphics graphics, Image image, int x) { int y = (getBounds().height - image.getBounds().height) / 2; graphics.drawImage(image, x, y); } }; // newFigure.setFont(DEFAULT_FONT); newFigure.setOpaque(true); return newFigure; }
From source file:org.eclipse.wb.internal.swing.FormLayout.gef.header.edit.ColumnHeaderEditPart.java
License:Open Source License
public void buildContextMenu(IMenuManager manager) { if (!m_layout.canChangeDimensions()) { return;//from w w w . j ava 2s.c om } // operations { manager.add( new DimensionHeaderAction<FormColumnInfo>(this, GefMessages.ColumnHeaderEditPart_insertColumn) { @Override protected void run(FormColumnInfo dimension) throws Exception { int index = m_layout.getColumns().indexOf(dimension); m_layout.insertColumn(index); } }); manager.add( new DimensionHeaderAction<FormColumnInfo>(this, GefMessages.ColumnHeaderEditPart_appendColumn) { @Override protected void run(FormColumnInfo dimension) throws Exception { int index = m_layout.getColumns().indexOf(dimension); m_layout.insertColumn(index + 1); } }); manager.add( new DimensionHeaderAction<FormColumnInfo>(this, GefMessages.ColumnHeaderEditPart_deleteColumn) { @Override protected void run(FormColumnInfo dimension) throws Exception { int index = m_layout.getColumns().indexOf(dimension); m_layout.deleteColumn(index); } }); manager.add(new DimensionHeaderAction<FormColumnInfo>(this, GefMessages.ColumnHeaderEditPart_DeleteContents) { @Override protected void run(FormColumnInfo dimension) throws Exception { int index = m_layout.getColumns().indexOf(dimension); m_layout.deleteColumnContents(index); } }); manager.add( new DimensionHeaderAction<FormColumnInfo>(this, GefMessages.ColumnHeaderEditPart_splitColumn) { @Override protected void run(FormColumnInfo dimension) throws Exception { int index = m_layout.getColumns().indexOf(dimension); m_layout.splitColumn(index); } }); } // alignment { manager.add(new Separator()); manager.add(new SetAlignmentAction<FormColumnInfo>(this, GefMessages.ColumnHeaderEditPart_haLeft, Activator.getImageDescriptor("alignment/h/menu/left.gif"), ColumnSpec.LEFT)); manager.add(new SetAlignmentAction<FormColumnInfo>(this, GefMessages.ColumnHeaderEditPart_haFill, Activator.getImageDescriptor("alignment/h/menu/fill.gif"), ColumnSpec.FILL)); manager.add(new SetAlignmentAction<FormColumnInfo>(this, GefMessages.ColumnHeaderEditPart_haCenter, Activator.getImageDescriptor("alignment/h/menu/center.gif"), ColumnSpec.CENTER)); manager.add(new SetAlignmentAction<FormColumnInfo>(this, GefMessages.ColumnHeaderEditPart_haRight, Activator.getImageDescriptor("alignment/h/menu/right.gif"), ColumnSpec.RIGHT)); } // grow { manager.add(new Separator()); manager.add(new SetGrowAction<FormColumnInfo>(this, GefMessages.ColumnHeaderEditPart_grow, Activator.getImageDescriptor("alignment/h/menu/grow.gif"))); } // templates { manager.add(new Separator()); addTemplateActions(manager, m_dimension.getTemplates(true)); { IMenuManager otherManager = new MenuManager(GefMessages.ColumnHeaderEditPart_otherTemplates); manager.add(otherManager); addTemplateActions(otherManager, m_dimension.getTemplates(false)); } } // group { manager.add(new Separator()); { DimensionHeaderAction<FormColumnInfo> action = new DimensionHeaderAction<FormColumnInfo>(this, GefMessages.ColumnHeaderEditPart_group) { @Override protected void run(List<FormColumnInfo> dimensions) throws Exception { m_layout.groupColumns(dimensions); } }; action.setEnabled(getViewer().getSelectedEditParts().size() >= 2); manager.add(action); } { DimensionHeaderAction<FormColumnInfo> action = new DimensionHeaderAction<FormColumnInfo>(this, GefMessages.ColumnHeaderEditPart_unGroup) { @Override protected void run(List<FormColumnInfo> dimensions) throws Exception { m_layout.unGroupColumns(dimensions); } }; manager.add(action); // check if there is grouped dimension selected boolean hasGroup = false; for (EditPart editPart : getViewer().getSelectedEditParts()) { ColumnHeaderEditPart headerEditPart = (ColumnHeaderEditPart) editPart; if (m_layout.getColumnGroup(headerEditPart.m_column) != null) { hasGroup = true; break; } } // enable action action.setEnabled(hasGroup); } } // properties { manager.add(new Separator()); manager.add(new ObjectInfoAction(m_layout, GefMessages.ColumnHeaderEditPart_properties) { @Override protected void runEx() throws Exception { editDimension(); } }); } }
From source file:org.eclipse.wb.internal.swing.FormLayout.model.FormDimensionInfo.java
License:Open Source License
/** * @return the source for {@link #m_alignment}. *//*from w w w . j av a 2 s .c o m*/ private static String getAlignmentSource(boolean horizontal, DefaultAlignment alignment) { if (horizontal) { String source; if (alignment == ColumnSpec.LEFT) { source = "LEFT"; } else if (alignment == ColumnSpec.CENTER) { source = "CENTER"; } else if (alignment == ColumnSpec.RIGHT) { source = "RIGHT"; } else { Assert.isTrue(alignment == ColumnSpec.FILL); source = "FILL"; } return "com.jgoodies.forms.layout.ColumnSpec." + source; } else { String source; if (alignment == RowSpec.TOP) { source = "TOP"; } else if (alignment == RowSpec.CENTER) { source = "CENTER"; } else if (alignment == RowSpec.BOTTOM) { source = "BOTTOM"; } else { Assert.isTrue(alignment == RowSpec.FILL); source = "FILL"; } return "com.jgoodies.forms.layout.RowSpec." + source; } }
From source file:org.eclipse.wb.tests.designer.swing.model.layout.FormLayout.FormDimensionInfoTest.java
License:Open Source License
public void test_sourceBounded_column() throws Exception { check_getAlignmentSource(true, ColumnSpec.LEFT, "com.jgoodies.forms.layout.ColumnSpec.LEFT"); check_getAlignmentSource(true, ColumnSpec.CENTER, "com.jgoodies.forms.layout.ColumnSpec.CENTER"); check_getAlignmentSource(true, ColumnSpec.RIGHT, "com.jgoodies.forms.layout.ColumnSpec.RIGHT"); check_getAlignmentSource(true, ColumnSpec.FILL, "com.jgoodies.forms.layout.ColumnSpec.FILL"); }