package com.ts3client.ui; import com.formdev.flatlaf.util.ScaledEmptyBorder; import javax.swing.JLabel; import javax.swing.JPanel; import java.awt.BorderLayout; /** The strip at the bottom of the window: connection status on the left, codec info on the right. */ final class StatusBar extends JPanel { private final JLabel statusLabel = new JLabel("Not connected"); private final JLabel codecLabel = new JLabel(); StatusBar() { super(new BorderLayout()); setBackground(Theme.statusBg()); setBorder(new ScaledEmptyBorder(3, 8, 3, 8)); statusLabel.setFont(Theme.uiFont()); codecLabel.setFont(Theme.uiFont()); codecLabel.setForeground(Theme.chatSystem()); add(statusLabel, BorderLayout.WEST); add(codecLabel, BorderLayout.EAST); } void setStatus(String text) { statusLabel.setText(text); } void setCodec(String text) { codecLabel.setText(text); } String codecText() { return codecLabel.getText(); } }