package com.ts3client.ui; import javax.swing.BorderFactory; 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.STATUS_BG); setBorder(BorderFactory.createEmptyBorder(3, 8, 3, 8)); statusLabel.setFont(Theme.UI_FONT); codecLabel.setFont(Theme.UI_FONT); codecLabel.setForeground(Theme.CHAT_SYSTEM); 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(); } }