/**
 *  Copyright © 2026, Luis Andrés Lange <https://javacomm.net>
 *
 *  This Source Code Form is subject to the terms of the Mozilla Public
 *  License, v. 2.0. If a copy of the MPL was not distributed with this
 *  file, You can obtain one at http://mozilla.org/MPL/2.0/.
 *
 *  ----------------------------------------------------------------------------
 *
 *  Exhibit B - "Incompatible With Secondary Licenses" Notice
 *
 *  This Source Code Form is "Incompatible With Secondary Licenses",
 *  as defined by the Mozilla Public License, v. 2.0.
 *
 */
package net.javacomm.client.chat;

import java.awt.GridBagConstraints;
import java.awt.GridBagLayout;
import java.awt.Insets;
import javax.swing.JLabel;
import javax.swing.JPanel;
import net.javacomm.client.resource.Resource;
import net.javacomm.multilingual.MultilingualLabel;
import net.javacomm.multilingual.schema.KEY;



class CountUserPanel extends JPanel {

  private static final long serialVersionUID = 8123825495408532218L;
  private JLabel labelNumber = new JLabel();
  private GridBagLayout gridbag = new GridBagLayout();
  private GridBagConstraints con = new GridBagConstraints();
  MultilingualLabel labelOnline = new MultilingualLabel(KEY.LABEL_ONLINE);

  public CountUserPanel() {
    setLayout(gridbag);
    setBackground(Resource.JQUERY_TEXTBRAUN);

    con.insets = new Insets(2, 2, 0, 2);
    con.gridwidth = GridBagConstraints.REMAINDER;
    gridbag.setConstraints(labelOnline, con);
    add(labelOnline);
    labelOnline.setForeground(Resource.JQUERY_HELLBLAU);

    con.insets = new Insets(1, 2, 2, 2);
    gridbag.setConstraints(labelNumber, con);
    labelNumber.setForeground(Resource.JQUERY_HELLBLAU);
    add(labelNumber);
    setBorder(null);
  }



  public void setCount(int c) {
    labelNumber.setText(String.valueOf(c));
  }

}