Esempio n. 1
0
  protected JComponent createMasterPanel() {
    final FormLayout layout =
        new FormLayout(
            "l:p,2dlu,f:max(p;50dlu):g(.3) ,3dlu " + "l:p,2dlu,f:max(p;50dlu):g(.3) ", "");
    final DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.setDefaultDialogBorder();
    builder.setRowGroupingEnabled(true);
    builder.append("Fecha", fecha);
    builder.append("F. Pago", formaDePago, true);
    builder.append("Banco", bancoOrigen);
    builder.append("Referencia", referencia, true);
    builder.append("Cuenta Depósito", cuentaDeposito, true);
    builder.append("Importe", importe);
    builder.append("Pago", buildPagosbox(model.getPagoMPModel().getModel("depositoRow")), true);
    builder.append("Disponible", disponible);
    builder.append("Por pagar", saldoTotal);
    builder.append("Pendiente", saldoPendiente, true);

    final CellConstraints cc = new CellConstraints();
    builder.append("Comentario");
    builder.appendRow(new RowSpec("17dlu"));
    builder.add(new JScrollPane(comentario), cc.xywh(builder.getColumn(), builder.getRow(), 5, 2));
    builder.nextLine(2);
    builder.append("Condonar", condonar);
    builder.append("Tipo de Facturas", tipoDoctos, true);
    ComponentUtils.decorateSpecialFocusTraversal(builder.getPanel());
    return builder.getPanel();
  }
  ApplicationDetailsDialog(final Root root) {
    super(root.getCoordinator().getMainFrame(), "Application Details - IceGrid Admin", true);
    setDefaultCloseOperation(JDialog.HIDE_ON_CLOSE);
    _mainFrame = root.getCoordinator().getMainFrame();

    _name.setEditable(false);
    _uuid.setEditable(false);
    _createTime.setEditable(false);
    _createUser.setEditable(false);
    _updateTime.setEditable(false);
    _updateUser.setEditable(false);
    _revision.setEditable(false);

    FormLayout layout = new FormLayout("right:pref, 3dlu, pref", "");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.setDefaultDialogBorder();
    builder.setRowGroupingEnabled(true);
    builder.setLineGapSize(LayoutStyle.getCurrent().getLinePad());

    builder.append("Name", _name);
    builder.nextLine();
    builder.append("UUID", _uuid);
    builder.nextLine();
    builder.append("Created", _createTime);
    builder.nextLine();
    builder.append("Created by", _createUser);
    builder.nextLine();
    builder.append("Last Update", _updateTime);
    builder.nextLine();
    builder.append("Updated by", _updateUser);
    builder.nextLine();
    builder.append("Revision", _revision);
    builder.nextLine();

    Container contentPane = getContentPane();
    contentPane.add(builder.getPanel());

    pack();
    setResizable(false);
  }
Esempio n. 3
0
  Date[] getDates() {

    Date start = new Date();
    start = DateUtils.subtractYear(start);

    JDateField startField = new JDateField();
    JDateField endField = new JDateField();

    startField.setValue(start);

    FormLayout layout = new FormLayout("right:p, 4dlu, p:g", "");
    DefaultFormBuilder builder = new DefaultFormBuilder(layout);
    builder.setRowGroupingEnabled(true);

    builder.append(rb.getString("Label.StartDate"), startField);
    builder.append(rb.getString("Label.EndDate"), endField);
    builder.nextLine();
    builder.appendUnrelatedComponentsGapRow();
    builder.nextLine();

    JPanel panel = builder.getPanel();

    int option =
        JOptionPane.showConfirmDialog(
            null,
            new Object[] {panel},
            rb.getString("Message.StartEndDate"),
            JOptionPane.OK_CANCEL_OPTION,
            JOptionPane.PLAIN_MESSAGE);

    if (option == JOptionPane.OK_OPTION) {
      return getLastDays(startField.dateValue(), endField.dateValue());
    }

    return null;
  }