static DashboardFrame()
 {
   JFrame.__\u003Cclinit\u003E();
   DashboardFrame.\u0024assertionsDisabled = !((Class) ClassLiteral<DashboardFrame>.Value).desiredAssertionStatus();
   DashboardFrame.NETBOOK_SIZE = new Dimension(1024, 400);
   DashboardFrame.MINIMUM_SIZE = new Dimension(300, 200);
   DashboardFrame.LW_SAVE = new StringBuilder().append("_").append(Robot.getLiveWindow().getSubTable("~STATUS~").getString("Robot", "LiveWindow")).append(".xml").toString();
   DashboardFrame.INSTANCE = (DashboardFrame) null;
 }
示例#2
0
 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 DashboardPanel(DashboardFrame frame, ITable table)
 {
   base.\u002Ector();
   DashboardPanel dashboardPanel = this;
   this.backPane = new JPanel();
   this.elements = new LinkedList();
   this.fields = (Map) new HashMap();
   this.hiddenFields = (Set) new HashSet();
   this.editable = false;
   this.listener = new DashboardPanel.RobotListener(this, (DashboardPanel.\u0031) null);
   this.subsystems = new ArrayList();
   this.frame = frame;
   this.table = table;
   this.glassPane = new GlassPane(frame, this);
   ((Container) this).add((Component) this.glassPane);
   ((Container) this).add((Component) this.backPane);
   ((Container) this.backPane).setLayout((LayoutManager) new DashboardPanel.DashboardLayout(this, (DashboardPanel.\u0031) null));
   ((Component) this.backPane).setFocusable(true);
   ((Container) this).setLayout((LayoutManager) new DashboardPanel.DashboardLayout(this, (DashboardPanel.\u0031) null));
   this.setEditable(this.editable);
   table.addTableListener((ITableListener) this.listener, true);
   table.addSubTableListener((ITableListener) this.listener);
 }
示例#4
0
 internal static DashboardFrame access\u0024002([In] DashboardFrame obj0)
 {
   return main.frame = obj0;
 }
示例#5
0
 public LogToCSV(DashboardFrame frame)
 {
   base.\u002Ector();
   LogToCSV logToCsv = this;
   this.frame = frame;
 }
 public DashboardPrefs(DashboardFrame frame)
 {
   base.\u002Ector();
   DashboardPrefs dashboardPrefs = this;
   this.properties = (Map) new LinkedHashMap();
   this.__\u003C\u003Eteam = new IntegerProperty((PropertyHolder) this, "Team Number", 0);
   this.__\u003C\u003EhideMenu = new BooleanProperty((PropertyHolder) this, "Hide Menu", false);
   this.__\u003C\u003EautoShowWidgets = new BooleanProperty((PropertyHolder) this, "Automatically Show Widgets", true);
   string name1 = "Grid Cell Width(s)";
   int[] numArray1 = new int[1];
   int index1 = 0;
   int num1 = 16;
   numArray1[index1] = num1;
   this.__\u003C\u003Egrid_widths = new IntegerListProperty((PropertyHolder) this, name1, numArray1);
   string name2 = "Grid Cell Height(s)";
   int[] numArray2 = new int[1];
   int index2 = 0;
   int num2 = 16;
   numArray2[index2] = num2;
   this.__\u003C\u003Egrid_heights = new IntegerListProperty((PropertyHolder) this, name2, numArray2);
   this.__\u003C\u003Ex = new IntegerProperty((PropertyHolder) this, "Window X Position", 0);
   this.__\u003C\u003Ey = new IntegerProperty((PropertyHolder) this, "Window Y Position", 0);
   this.__\u003C\u003Ewidth = new IntegerProperty((PropertyHolder) this, "Window Width", 640);
   this.__\u003C\u003Eheight = new IntegerProperty((PropertyHolder) this, "Window Height", 480);
   string name3 = "Save File";
   File.__\u003Cclinit\u003E();
   string absolutePath1 = new File(DashboardPrefs.USER_SMARTDASHBOARD_HOME, "save.xml").getAbsolutePath();
   this.__\u003C\u003EsaveFile = new FileProperty((PropertyHolder) this, name3, absolutePath1);
   this.__\u003C\u003ElogToCSV = new BooleanProperty((PropertyHolder) this, "Log to CSV", false);
   string name4 = "CSV File";
   File.__\u003Cclinit\u003E();
   string absolutePath2 = new File(DashboardPrefs.USER_SMARTDASHBOARD_HOME, "csv.txt").getAbsolutePath();
   this.__\u003C\u003EcsvFile = new FileProperty((PropertyHolder) this, name4, absolutePath2);
   this.frame = frame;
   this.node = Preferences.userNodeForPackage((Class) ClassLiteral<main>.Value);
   Iterator iterator = this.properties.values().iterator();
   while (iterator.hasNext())
   {
     Property property = (Property) iterator.next();
     if (property != this.__\u003C\u003ElogToCSV)
       this.load(property);
   }
 }
 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;
 }
 public void setDisplayMode(DashboardFrame.DisplayMode mode)
 {
   this.displayMode = mode;
   ((CardLayout) ((Container) this.mainPanel).getLayout()).show((Container) this.mainPanel, mode.toString());
 }