public MainPanel(LayoutManager layout, DashboardPanel defaultPanel, params DashboardPanel[] panels)
 {
   base.\u002Ector(layout);
   DashboardPanel[] dashboardPanelArray = panels;
   int length = dashboardPanelArray.Length;
   for (int index = 0; index < length; ++index)
   {
     DashboardPanel dashboardPanel = dashboardPanelArray[index];
     MainPanel.__\u003C\u003Epanels.put((object) ((Component) dashboardPanel).getName(), (object) dashboardPanel);
   }
   MainPanel.currentPanel = defaultPanel;
 }
 public virtual void setCurrentPanel(DashboardPanel panel)
 {
   if (MainPanel.__\u003C\u003Epanels.containsValue((object) panel))
   {
     MainPanel.currentPanel = panel;
   }
   else
   {
     string str = "Not a valid panel";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
 }
 internal GlassPane([In] DashboardFrame obj0, [In] DashboardPanel obj1)
 {
   base.\u002Ector();
   GlassPane glassPane1 = this;
   this.dragType = -1;
   this.areas = (Map) new HashMap();
   this.showGrid = false;
   this.frame = obj0;
   this.panel = obj1;
   this.elementMenu = new JPopupMenu();
   JPopupMenu jpopupMenu1 = this.elementMenu;
   GlassPane glassPane2 = this;
   JMenu jmenu1 = new JMenu("Change to...");
   JMenu jmenu2 = jmenu1;
   this.changeToMenu = jmenu1;
   jpopupMenu1.add((JMenuItem) jmenu2);
   JPopupMenu jpopupMenu2 = this.elementMenu;
   JMenuItem.__\u003Cclinit\u003E();
   JMenuItem jmenuItem1 = new JMenuItem((Action) new GlassPane.PropertiesItemAction(this, "Properties...", (GlassPane\u00241) null));
   jpopupMenu2.add(jmenuItem1);
   JPopupMenu jpopupMenu3 = this.elementMenu;
   JMenuItem.__\u003Cclinit\u003E();
   JMenuItem jmenuItem2 = new JMenuItem((Action) new GlassPane.MoveToBackAction(this, "Send to Back", (GlassPane\u00241) null));
   jpopupMenu3.add(jmenuItem2);
   JPopupMenu jpopupMenu4 = this.elementMenu;
   GlassPane glassPane3 = this;
   JMenuItem.__\u003Cclinit\u003E();
   JMenuItem jmenuItem3 = new JMenuItem((Action) new GlassPane.ResetSizeAction(this, (GlassPane\u00241) null));
   JMenuItem jmenuItem4 = jmenuItem3;
   this.resizeMenu = jmenuItem3;
   jpopupMenu4.add(jmenuItem4);
   JPopupMenu jpopupMenu5 = this.elementMenu;
   JMenuItem.__\u003Cclinit\u003E();
   JMenuItem jmenuItem5 = new JMenuItem((Action) new GlassPane.DeleteItemAction(this));
   jpopupMenu5.add(jmenuItem5);
   ((Component) this).addComponentListener((ComponentListener) new GlassPane\u00241(this));
   ((Component) this).addKeyListener((KeyListener) new GlassPane\u00242(this));
   ((JComponent) this).setOpaque(false);
   ((Component) this).setFocusable(true);
   GlassPane.GlassMouseListener glassMouseListener = new GlassPane.GlassMouseListener(this, (GlassPane\u00241) null);
   ((Component) this).addMouseListener((MouseListener) glassMouseListener);
   ((Component) this).addMouseMotionListener((MouseMotionListener) glassMouseListener);
 }
 public virtual void addPanel(string name, DashboardPanel panel)
 {
   if (!MainPanel.__\u003C\u003Epanels.containsValue((object) panel))
   {
     MainPanel.__\u003C\u003Epanels.put((object) name, (object) panel);
   }
   else
   {
     string str = "That panel already exists";
     Throwable.__\u003CsuppressFillInStackTrace\u003E();
     throw new IllegalArgumentException(str);
   }
 }
 public DashboardFrame(bool competition)
 {
   int num = competition ? 1 : 0;
   base.\u002Ector("SmartDashboard - ");
   DashboardFrame dashboardFrame = this;
   this.prefs = new DashboardPrefs(this);
   this.displayMode = DashboardFrame.DisplayMode.__\u003C\u003ESmartDashboard;
   this.shouldHideMenu = ((Boolean) this.prefs.__\u003C\u003EhideMenu.getValue()).booleanValue();
   this.logger = new LogToCSV(this);
   this.setLayout((LayoutManager) new BorderLayout());
   DashboardPanel.__\u003Cclinit\u003E();
   this.smartDashboardPanel = new DashboardPanel(this, Robot.getTable());
   ((Component) this.smartDashboardPanel).setName("SmartDashboard");
   DashboardPanel.__\u003Cclinit\u003E();
   this.liveWindowPanel = new DashboardPanel(this, Robot.getLiveWindow());
   ((Component) this.liveWindowPanel).setName("LiveWindow");
   MainPanel.__\u003Cclinit\u003E();
   CardLayout cardLayout = new CardLayout();
   DashboardPanel defaultPanel = this.smartDashboardPanel;
   DashboardPanel[] dashboardPanelArray = new DashboardPanel[2];
   int index1 = 0;
   DashboardPanel dashboardPanel1 = this.liveWindowPanel;
   dashboardPanelArray[index1] = dashboardPanel1;
   int index2 = 1;
   DashboardPanel dashboardPanel2 = this.smartDashboardPanel;
   dashboardPanelArray[index2] = dashboardPanel2;
   this.mainPanel = new MainPanel((LayoutManager) cardLayout, defaultPanel, dashboardPanelArray);
   ((Container) this.mainPanel).add((Component) this.smartDashboardPanel, (object) DashboardFrame.DisplayMode.__\u003C\u003ESmartDashboard.toString());
   ((Container) this.mainPanel).add((Component) this.liveWindowPanel, (object) DashboardFrame.DisplayMode.__\u003C\u003ELiveWindow.toString());
   this.setDisplayMode(DashboardFrame.DisplayMode.__\u003C\u003ESmartDashboard);
   DashboardMenu.__\u003Cclinit\u003E();
   this.menuBar = (JMenuBar) new DashboardMenu(this, this.mainPanel);
   this.propEditor = new PropertyEditor((JFrame) this);
   if (!this.shouldHideMenu)
     ((Container) this).add((Component) this.menuBar, (object) "North");
   ((Container) this).add((Component) this.mainPanel, (object) "Center");
   DashboardFrame\u00241 dashboardFrame1 = new DashboardFrame\u00241(this);
   this.smartDashboardPanel.addMouseListener((MouseListener) dashboardFrame1);
   this.smartDashboardPanel.addMouseMotionListener((MouseMotionListener) dashboardFrame1);
   if (num != 0)
   {
     ((Component) this).setPreferredSize(DashboardFrame.NETBOOK_SIZE);
     ((Frame) this).setUndecorated(true);
     ((Window) this).setLocation(0, 0);
     ((Frame) this).setResizable(false);
   }
   else
   {
     ((Window) this).setMinimumSize(DashboardFrame.MINIMUM_SIZE);
     this.setDefaultCloseOperation(0);
     Dimension.__\u003Cclinit\u003E();
     ((Component) this).setPreferredSize(new Dimension(this.prefs.__\u003C\u003Ewidth.getValue().intValue(), this.prefs.__\u003C\u003Eheight.getValue().intValue()));
     ((Window) this).setLocation(this.prefs.__\u003C\u003Ex.getValue().intValue(), this.prefs.__\u003C\u003Ey.getValue().intValue());
   }
   ((Window) this).addWindowListener((WindowListener) new DashboardFrame\u00242(this));
   ((Component) this).addComponentListener((ComponentListener) new DashboardFrame\u00243(this));
   DashboardFrame.INSTANCE = this;
 }