Exemplo n.º 1
0
 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;
 }
Exemplo n.º 2
0
 static DisplayMode()
 {
   DashboardFrame.DisplayMode[] displayModeArray = new DashboardFrame.DisplayMode[2];
   int index1 = 0;
   DashboardFrame.DisplayMode displayMode1 = DashboardFrame.DisplayMode.__\u003C\u003ESmartDashboard;
   displayModeArray[index1] = displayMode1;
   int index2 = 1;
   DashboardFrame.DisplayMode displayMode2 = DashboardFrame.DisplayMode.__\u003C\u003ELiveWindow;
   displayModeArray[index2] = displayMode2;
   DashboardFrame.DisplayMode.\u0024VALUES = displayModeArray;
 }
Exemplo n.º 3
0
 public void setDisplayMode(DashboardFrame.DisplayMode mode)
 {
   this.displayMode = mode;
   ((CardLayout) ((Container) this.mainPanel).getLayout()).show((Container) this.mainPanel, mode.toString());
 }