コード例 #1
0
ファイル: StatusBar.java プロジェクト: todocompu/Shrimp
 public void cargarNuevosDatos() {
   jlblUsuario.setText(
       "<html><font color = WHITE>"
           + sisUsuarioEmpresaTO.getUsrNombre()
           + " "
           + sisUsuarioEmpresaTO.getUsrApellido()
           + "</font></html>");
   jlblModulo.setText("<html><font color = WHITE>" + "SISTEMA" + "</font></html>");
   jlblEmpresas.setText(
       "<html><font color = WHITE>" + sisUsuarioEmpresaTO.getEmpNombre() + "</font></html>");
 }
コード例 #2
0
ファイル: StatusBar.java プロジェクト: todocompu/Shrimp
  /**
   * This method is called from within the constructor to initialize the form. WARNING: Do NOT
   * modify this code. The content of this method is always regenerated by the Form Editor.
   */
  @SuppressWarnings("unchecked")
  // <editor-fold defaultstate="collapsed" desc="Generated Code">
  private void initComponents() {

    jPanel = new javax.swing.JPanel();
    lblTextEmpresa = new JLabel("Empresa");
    lblTextEmpresa =
        new JLabel(
            "<html><font face=Rechana color =#0E679F size=4>"
                + "&nbsp;&nbsp;&nbsp<b>Empresa</b>"
                + "</font></html>");
    // lblTextEmpresa.setSize(16, 2);
    // lblTextEmpresa.setVerticalTextPosition(SwingConstants.TOP);
    /// lblTextEmpresa.setLocation(lblTextEmpresa.getX(), 0);
    // lblTextEmpresa.setHorizontalTextPosition(SwingConstants.CENTER);
    //        lblTextEmpresa.setFont(new Font("Rechana", Font.BOLD, 8));
    lblTextEmpresa.setOpaque(true);

    lblTextEmpresa.setBackground(new Color(1, 1, 1));
    //        lblTextEmpresa.setAlignmentY(TOP_ALIGNMENT);

    // lblTextEmpresa.setF
    jlblEspacio = new javax.swing.JLabel();
    jlblHora = new javax.swing.JLabel("");
    jlblFecha = new javax.swing.JLabel("");
    jlblUsuario = new javax.swing.JLabel("");
    jlblHora = new javax.swing.JLabel("<html><font color = WHITE>" + "00:00:00" + "</font></html>");
    jlblFecha =
        new javax.swing.JLabel("<html><font color = WHITE>" + "01/01/2000" + "</font></html>");
    jlblUsuario =
        new javax.swing.JLabel(
            "<html><font color = WHITE>"
                + sisUsuarioEmpresaTO.getUsrNombre()
                + " "
                + sisUsuarioEmpresaTO.getUsrApellido()
                + "</font></html>");
    jlblModulo =
        new javax.swing.JLabel("<html><font color = WHITE>" + "SISTEMA" + "</font></html>");
    jlblEmpresas =
        new javax.swing.JLabel(
            "<html><font color = WHITE>" + sisUsuarioEmpresaTO.getEmpNombre() + "</font></html>");
    int index = sisUsuarioEmpresaTO.getEmpNombre().length() + 100;
    jProgressBar = new javax.swing.JProgressBar();
    jProgressBar.setIndeterminate(true);
    jlblInfo = new javax.swing.JLabel("<html><font color = WHITE>" + "" + "</font></html>");
    jProgressBar.setVisible(false);
    jlblInfo.setVisible(false);
    //        lblTextEmpresa.setVisible(false);
    //        jlblEmpresas.setVisible(false);
    HoraSistema hilo = new HoraSistema("StatusBar");
    hilo.start();

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(jPanel);
    jPanel.setLayout(layout);

    layout.setHorizontalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addComponent(
                                        jlblEspacio,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        100,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(
                                        jlblUsuario,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        270,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(
                                        jlblFecha,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        160,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(
                                        jlblHora,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        170,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(
                                        jlblModulo,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        170,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(
                                        jlblEspacio,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        25,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(
                                        lblTextEmpresa,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        110,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(
                                        jlblEspacio,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        18,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(
                                        jlblEmpresas,
                                        javax.swing.GroupLayout.PREFERRED_SIZE,
                                        index,
                                        javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jProgressBar)
                                    .addComponent(jlblInfo)))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    layout.setVerticalGroup(
        layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(
                layout
                    .createSequentialGroup()
                    .addContainerGap()
                    .addGroup(
                        layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(
                                layout
                                    .createSequentialGroup()
                                    .addGroup(
                                        layout
                                            .createParallelGroup(
                                                javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(jlblInfo)
                                            .addComponent(jProgressBar)
                                            .addComponent(jlblModulo)
                                            .addComponent(jlblHora)
                                            .addComponent(jlblFecha)
                                            .addComponent(jlblUsuario)
                                            .addComponent(jlblEspacio)
                                            .addComponent(lblTextEmpresa)
                                            .addComponent(jlblEmpresas))))
                    .addContainerGap(2, Short.MAX_VALUE)));

    jlblEmpresas.addMouseListener(this);

    jPanel.setBounds(350, 590, 980, 30);
    shrimp.validaciones.JPanelFondo jPanelFondoStatus =
        new shrimp.validaciones.JPanelFondo("/resources/StatusBar.png");
    jPanel.add(jPanelFondoStatus, java.awt.BorderLayout.CENTER);
  } // </editor-fold>