Ejemplo n.º 1
0
  private void montaTela() {

    getTela().add(panelGeral, BorderLayout.CENTER);
    panelGeral.add(panelMaster, BorderLayout.NORTH);

    // ***** Cabeçalho

    if (comRef()) {
      panelMaster.adic(txtRefProd, 7, 20, 120, 20, "Referência");
    } else {
      panelMaster.adic(txtCodProd, 7, 20, 120, 20, "Cód.Prod.");
    }

    panelMaster.adic(txtDescProd, 130, 20, 400, 20, "Descrição do produto");

    panelMaster.adic(txtCodSecao, 7, 60, 120, 20, "Cód.Seção");
    panelMaster.adic(txtDescSecao, 130, 60, 400, 20, "Descrição da seção");

    //		panelFiltros.adic( cbPend, 4, 0, 100, 20 );
    //		panelFiltros.adic( cbEmProd, 4, 30, 100, 20 );
    //		panelFiltros.adic( cbProd, 114, 0, 100, 20 );

    //		panelMaster.adic( panelFiltros, 416, 0, 220, 82 );

    panelMaster.adic(btBuscar, 712, 10, 123, 30);

    // ***** Abas

    panelGeral.add(panelAbas, BorderLayout.CENTER);
    panelGeral.add(panelAbas);
    panelAbas.add(tabbedAbas);

    tabbedAbas.addTab("Detalhamento", panelDet);

    // ***** Detalhamento

    panelDet.add(panelTabDet, BorderLayout.NORTH);
    panelDet.add(panelGridDet, BorderLayout.CENTER);
    panelGridDet.add(panelTabDetItens);

    panelTabDet.adic(txtQtdRequisitada, 10, 25, 80, 20, "Requisitada");
    panelTabDet.adic(txtQtdEstoque, 93, 25, 80, 20, "Estoque");
    panelTabDet.adic(txtQtdProducao, 176, 25, 80, 20, "Produção");
    panelTabDet.adic(txtQtdProduzir, 259, 25, 80, 20, "Produzir");

    sepdet.setBorder(BorderFactory.createEtchedBorder());
    panelTabDet.adic(sepdet, 433, 4, 2, 48);
    panelTabDet.adic(btIniProdDet, 443, 4, 48, 48);

    panelTabDet.adic(btSelectAllDet, 743, 12, 30, 30);
    panelTabDet.adic(btDeselectAllDet, 774, 12, 30, 30);
    panelTabDet.adic(btLimparGridDet, 805, 12, 30, 30);

    panelTabDetItens.add(new JScrollPane(tabDet));

    // ***** Rodapé

    Color statusColor = new Color(111, 106, 177);
    Font statusFont = SwingParams.getFontpadmin();

    JLabelPad canceladas = new JLabelPad("Urgentes");
    canceladas.setForeground(statusColor);
    canceladas.setFont(statusFont);
    panelLegenda.adic(new JLabelPad(imgUrgente), 0, 5, 20, 15);
    panelLegenda.adic(canceladas, 20, 5, 100, 15);

    JLabelPad pedidos = new JLabelPad("Normal");
    pedidos.setForeground(statusColor);
    pedidos.setFont(statusFont);
    panelLegenda.adic(new JLabelPad(imgNormal), 60, 5, 20, 15);
    panelLegenda.adic(pedidos, 80, 5, 100, 15);

    panelLegenda.setBorder(null);

    panelGeral.add(panelSouth, BorderLayout.SOUTH);
    panelSouth.setBorder(BorderFactory.createEtchedBorder());
    panelSouth.add(adicBotaoSair());
    pnRod.add(panelLegenda, BorderLayout.CENTER);
  }
Ejemplo n.º 2
0
  public void execLogin(String sBanco, String sDriver, String sImg, int iCodEstP) {

    strBanco = sBanco;
    strDriver = sDriver;

    this.iCodEst = iCodEstP;

    c.add(pnMaster);

    pnMaster.add(pnSplash, BorderLayout.NORTH);
    pnMaster.add(pnCampos, BorderLayout.CENTER);
    pnMaster.add(pnVersao, BorderLayout.SOUTH);

    ImageIcon ic = Icone.novo(sImg);
    JLabelPad lbImg = new JLabelPad(Icone.novo(sImg));

    int iWidth = ic.getIconWidth();
    int iHeight = ic.getIconHeight();

    if (SystemFunctions.getOS() == SystemFunctions.OS_WINDOWS
        && SystemFunctions.getWindowsVersion() == SystemFunctions.OS_VERSION_WINDOWS_SEVEN) {
      setAtribos(iWidth + 17, iHeight + 203);
    } else {
      setAtribos(iWidth + 7, iHeight + 193);
    }

    lbImg.setHorizontalAlignment(javax.swing.SwingConstants.LEFT);

    pnSplash.add(lbImg, BorderLayout.CENTER);
    pnMaster.setBorder(new BevelBorder(BevelBorder.RAISED));

    pnCampos.setBackground(new Color(228, 228, 228));
    pnCampos.setBorder(BorderFactory.createLineBorder(new Color(200, 200, 200)));
    pnVersao.setBorder(BorderFactory.createEmptyBorder());
    pnVersao.setBackground(Color.WHITE);

    JLabelPad lbUsuario = new JLabelPad("Usuário");
    lbUsuario.setForeground(new Color(49, 49, 89));

    pnCampos.adic(lbUsuario, 7, 0, 180, 20);
    pnCampos.adic(txtUsuario, 7, 20, 180, 20);

    JLabelPad lbSenha = new JLabelPad("Senha");
    lbSenha.setForeground(new Color(49, 49, 89));

    pnCampos.adic(lbSenha, 190, 0, 100, 20);
    pnCampos.adic(txpSenha, 190, 20, 100, 20);

    JLabelPad lbFilial = new JLabelPad("Filial");
    lbFilial.setForeground(new Color(49, 49, 89));

    pnCampos.adic(lbFilial, 7, 40, 200, 20);
    pnCampos.adic(cbEmp, 7, 60, 283, 20);

    pnCampos.adic(lbInstrucoes, 7, 83, 300, 20);

    pnVersao.setPreferredSize(new Dimension(10, 20));

    versao = SystemFunctions.getVersionSis(this.getClass());

    lbVersao.setText("  Versão: " + versao);

    lbVersao.setFont(SwingParams.getFontpadmed());
    lbVersao.setForeground(Color.DARK_GRAY);

    pnVersao.adic(lbVersao, 0, 0, 300, 20);

    setVisible(true);
  }