@@ -0,0 +1,1737 @@
+package com.ui;%0A%0Aimport java.util.*;%0Aimport java.awt.*;%0Aimport java.awt.event.*;%0Aimport javax.swing.*;%0A%0Aimport com.Context;%0A//import com.serial.Serial;%0A%0A/**%0A * @author Chris Park @ Infinetix Corp.%0A * Date: 1-26-21%0A * Description: Dashboard Widget child class used to display contextual vehicle %0A * information in an easy to interpret visual format. Example use cases would be%0A * displaying a units current decision state, or perhaps a visual warning level%0A * indication related to a vehicle sensor or other data processing part over%0A * serial communication.%0A */%0Apublic class StatusBarWidget extends UIWidget %7B%0A%09%0A%09//Constants%0A%09protected static final int MIN_BAR_WIDTH%09= 100;%0A%09protected static final int BAR_HEIGHT %09%09= 25;%0A%09%0A%09protected JLabel statusLabel;%0A%09%0A%09//Class Constructor%0A%09public StatusBarWidget(Context ctx, String barType) %7B%0A%09%09super(ctx, barType + %22StatusBar%22);%0A%09%09%0A%09%09statusLabel.setText(%22Undefined%22);%0A%09%09statusLabel.setBackground(Color.white);%0A%09%09%0A%09%09statusLabel.setMinimumSize(new Dimension(MIN_BAR_WIDTH, BAR_HEIGHT));%0A%09%09statusLabel.setPreferredSize(new Dimension(MIN_BAR_WIDTH, BAR_HEIGHT));%0A%09%7D%0A%09%0A%09/**%0A%09 * Updates the status bar text display to the given string parameter.%0A%09 * @param text - The text to update the label to.%0A%09 */%0A%09public void setLabel(String text) %7B%0A%09%09statusLabel.setText(text);%0A%09%7D%0A%09%0A%09/**%0A%09 * Updates the status bar background color to the given Color parameter%0A%09 * @param color - The color to set the background do%0A%09 */%0A%09public void setColor(Color color) %7B%0A%09%09statusLabel.setBackground(color);%0A%09%7D%0A%09%0A%09/**%0A%09 * Updates the preferred size of the status bar%0A%09 * @param size - the Dimensional size (Width, Height) to set the bar to.%0A%09 */%0A%09public void setSize(Dimension size) %7B%0A%09%09statusLabel.setPreferredSize(size);%0A%09%7D%0A%7D%0A

Create StatusBarWidget class