Package com.joshondesign.arduino.common

Examples of com.joshondesign.arduino.common.Device


            @Override
            public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
                Component comp = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
                if(comp instanceof JLabel && value instanceof Device) {
                    JLabel label = (JLabel) comp;
                    Device device = (Device) value;
                    label.setText(device.getName());
                }
                return comp;
            }
        });
       
        deviceList.addListSelectionListener(new ListSelectionListener() {
            @Override
            public void valueChanged(ListSelectionEvent e) {
                if(e.getValueIsAdjusting()) return;
                Device device = (Device) deviceList.getSelectedValue();
                deviceName.setText(device.getName());
                deviceMaxSize.setText(""+device.getMaxSize());
                deviceMaxSpeed.setText(""+device.getUploadSpeed());
                deviceCPUName.setText(device.getMCU());
            }
        });
    }
View Full Code Here


            for(File xml : new File(basedir,"hardware/boards/").listFiles()) {
                Util.p("parsing: " + xml.getCanonicalPath());
                try {
                    Doc doc = XMLParser.parse(xml);
                    Elem e = doc.xpathElement("/board");
                    Device d = new Device();
                    d.name = e.attr("name");
                    d.protocol = e.attr("protocol");
                    d.maximum_size = Integer.parseInt(e.attr("maximum-size"));
                    d.upload_speed = Integer.parseInt(e.attr("upload-speed"));
                    d.low_fuses = parseHex(e.attr("low-fuses"));
View Full Code Here

            @Override
            public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) {
                Component comp = super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus);
                if(comp instanceof JLabel && value instanceof Device) {
                    JLabel label = (JLabel) comp;
                    Device device = (Device) value;
                    label.setText(device.getName());
                }
                return comp;
            }
        });
        if(actions.sketch.getCurrentDevice() == null) {
View Full Code Here

TOP

Related Classes of com.joshondesign.arduino.common.Device

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.