Example usage for java.awt Color green

List of usage examples for java.awt Color green

Introduction

In this page you can find the example usage for java.awt Color green.

Prototype

Color green

To view the source code for java.awt Color green.

Click Source Link

Document

The color green.

Usage

From source file:br.edu.unifei.mestrado.view.GraphPartitioningVisualization.java

private void createView(final int partitions) {

    clusterer = new PartitionClusterer(partitions);

    final Graph<NodeWrapper, EdgeWrapper> graph = getGraph();

    // Create a simple layout frame
    // specify the Fruchterman-Rheingold layout algorithm
    layout = new AggregateLayout<NodeWrapper, EdgeWrapper>(new FRLayout<NodeWrapper, EdgeWrapper>(graph));

    vv = new VisualizationViewer<NodeWrapper, EdgeWrapper>(layout);
    vv.setBackground(Color.white);

    if (vertexLabelTransformer == null) {
        vertexLabelTransformer = new Transformer<NodeWrapper, String>() {
            @Override//from  w w  w. j av a2  s .c  o m
            public String transform(NodeWrapper v) {
                // TODO: voltar o D quando necessrio
                return "V" + v.getId() + ":" + v.getWeight();// + ":" +
                // v.getD();
            }
        };
    }
    vv.getRenderContext().setVertexLabelTransformer(vertexLabelTransformer);

    // MapTransformer.<NodeWrapper, String>
    // getInstance(LazyMap.<NodeWrapper, String> decorate(
    // new HashMap<NodeWrapper, String>(), new
    // ToStringLabeller<NodeWrapper>())));
    vv.getRenderContext().setEdgeLabelTransformer(edgeLabelTransformer);

    // UTIL: Alguma coisa, talvez o LazyMap no estava repintando a aresta
    // com o peso alterado

    // MapTransformer.<EdgeWrapper, String>
    // getInstance(LazyMap.<EdgeWrapper, String> decorate(
    // new HashMap<EdgeWrapper, String>(), new
    // ToStringLabeller<EdgeWrapper>() {
    // @Override
    // public String transform(EdgeWrapper v) {
    // logger.warn("A:" + v.getId() + ":" + v.getWeight());
    // return "A:" + v.getId() + ":" + v.getWeight();
    // }
    // })));
    // Tell the renderer to use our own customized color rendering

    vv.getRenderContext().setEdgeShapeTransformer(new EdgeShape.Line<NodeWrapper, EdgeWrapper>());

    vv.getRenderContext().setVertexShapeTransformer(vertexShapeTransformer);
    vv.getRenderContext().setVertexFillPaintTransformer(vertexFillPaintTransformer);
    vv.getRenderContext().setVertexDrawPaintTransformer(vertexDrawPaintTransformer);
    vv.getRenderContext().setVertexStrokeTransformer(vertexStrokeTransformer);

    vv.getRenderContext().setEdgeDrawPaintTransformer(new Transformer<EdgeWrapper, Paint>() {

        // UTIL: Define as cores das arestas
        @Override
        public Paint transform(EdgeWrapper linkToProcess) {
            // if para mostrar arestas com as duas pontas no mesmo vertices
            if (linkToProcess.getStartNode().getId() == linkToProcess.getEndNode().getId()) {
                return Color.red;
            }
            Set<NodeWrapper> nodes = vv.getPickedVertexState().getPicked();
            for (NodeWrapper node : nodes) {
                for (EdgeWrapper link : node.getEdges()) {
                    if (link.getId() == linkToProcess.getId()) {
                        return Color.orange;
                    }
                }
            }
            if (linkToProcess.isEdgeOnCut()) {
                return Color.green;
            }
            return Color.blue;
        }
    });

    // MapTransformer.<EdgeWrapper, Paint> getInstance(edgePaints));

    vv.getRenderContext().setEdgeStrokeTransformer(new Transformer<EdgeWrapper, Stroke>() {
        protected final Stroke THIN = new BasicStroke(1);
        // protected final Stroke THICK = new BasicStroke(2);
        protected final Stroke STRONG_THICK = new BasicStroke(3);

        public Stroke transform(EdgeWrapper e) {
            // if para mostrar arestas com as duas pontas no mesmo vertices
            if (e.getStartNode().getId() == e.getEndNode().getId()) {
                return STRONG_THICK;
            }

            // Paint c = edgePaints.get(e);
            // if (c == Color.red)
            return THIN;
            // else
            // return THIN;
        }
    });

    DefaultModalGraphMouse gm = new DefaultModalGraphMouse();
    vv.setGraphMouse(gm);

    groupVertices = new JToggleButton("Group Clusters");
    groupVertices.setSelected(true);

    groupVertices.addItemListener(new ItemListener() {
        public void itemStateChanged(ItemEvent e) {
            clusterAndRecolor(layout, e.getStateChange() == ItemEvent.SELECTED,
                    getGroupCircleVertices().isSelected());
            vv.repaint();
        }
    });

    clusterAndRecolor(layout, groupVertices.isSelected(), getGroupCircleVertices().isSelected());

    Container content = getContentPane();
    content.add(new GraphZoomScrollPane(vv));
    JPanel south = new JPanel(new GridLayout(1, 4));
    JPanel grid1 = new JPanel(new GridLayout(2, 1));
    grid1.add(groupVertices);
    grid1.add(getGroupCircleVertices());
    south.add(grid1);

    final ScalingControl scaler = new CrossoverScalingControl();
    JButton plus = new JButton("+");
    plus.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            scaler.scale(vv, 1.1f, vv.getCenter());
        }
    });
    JButton minus = new JButton("-");
    minus.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
            scaler.scale(vv, 1 / 1.1f, vv.getCenter());
        }
    });

    JPanel grid2 = new JPanel(new GridLayout(2, 1));
    grid2.setBorder(BorderFactory.createTitledBorder("Scale"));
    south.add(grid2);
    grid2.add(plus);
    grid2.add(minus);
    JPanel grid3 = new JPanel(new GridLayout(1, 2));
    south.add(grid3);
    grid3.add(getIterationLabel());
    grid3.add(getCutLabel());

    JPanel p = new JPanel();
    p.setBorder(BorderFactory.createTitledBorder("Mouse Mode"));
    p.add(gm.getModeComboBox());
    south.add(p);
    content.add(south, BorderLayout.SOUTH);
    vv.repaint();
}

From source file:Simulator.java

private void plotPoints(String filePath) {
    DataSet ds = GetGPSData(filePath);/*from  w  ww. j  a  va 2  s.  c om*/

    Layer personOne = new Layer("Person One");
    Random random = new Random(System.currentTimeMillis());

    ArrayList<MapMarker> fenceLocations = new ArrayList<>(map().getMapMarkerList());

    for (int i = 0; i < ds.data.size() * .001; i++) {
        fenceLocations = new ArrayList<>(map().getMapMarkerList());
        int index = random.nextInt(ds.data.size());

        // Make sure none of the fences overlap
        if (fenceLocations.size() > 0) {
            while (GetDistanceToClosestFence(ds.data.get(index), fenceLocations) < 170) {
                index = random.nextInt(ds.data.size());
            }
        }

        map().addMapMarker(new MapMarkerCircle(personOne,
                new Coordinate(ds.data.get(index).getLat(), ds.data.get(index).getLon()),
                convertMilesToOSM(0.1)));
    }

    fenceLocations = new ArrayList<>(map().getMapMarkerList());

    for (Coordinate loc : ds.data) {
        if (GetDistanceToClosestFence(loc, fenceLocations) < 170) {
            MapMarkerDot newDot = new MapMarkerDot(Color.GREEN, loc.getLat(), loc.getLon());
            map().addMapMarker(newDot);
        } else {
            MapMarkerDot newDot = new MapMarkerDot(personOne, null, loc.getLat(), loc.getLon());
            map().addMapMarker(newDot);
        }
    }
    System.out.println(
            GetRoutedTravelTime(ds.data.get(0), GetClosestFenceCoordinate(ds.data.get(0), fenceLocations)));
}

From source file:com.icesoft.faces.component.outputchart.AbstractChart.java

public ColorMap() {
    this.put("black", Color.BLACK);
    this.put("blue", Color.BLUE);
    this.put("cyan", Color.CYAN);
    this.put("darkGray", Color.DARK_GRAY);
    this.put("gray", Color.GRAY);
    this.put("green", Color.GREEN);
    this.put("lightGray", Color.LIGHT_GRAY);
    this.put("magenta", Color.MAGENTA);
    this.put("orange", Color.ORANGE);
    this.put("pink", Color.PINK);
    this.put("red", Color.RED);
    this.put("white", Color.WHITE);
    this.put("yellow", Color.YELLOW);
}

From source file:edu.ucla.stat.SOCR.chart.SuperCategoryChart_vertical.java

/**
 * Creates a chart./* ww w  .  j  a v  a2 s .c o  m*/
 * 
 * @param dataset  the dataset.
 * 
 * @return a chart.
 */
protected JFreeChart createChart(CategoryDataset dataset) {
    // create the chart...
    JFreeChart chart = ChartFactory.createBarChart(chartTitle, // chart title
            domainLabel, // domain axis label
            rangeLabel, // range axis label
            dataset, // data
            PlotOrientation.VERTICAL, // orientation
            !legendPanelOn, // include legend
            true, // tooltips?
            false // URLs?
    );

    // NOW DO SOME OPTIONAL CUSTOMISATION OF THE CHART...

    // set the background color for the chart...
    chart.setBackgroundPaint(Color.white);

    // get a reference to the plot for further customisation...
    CategoryPlot plot = chart.getCategoryPlot();
    plot.setBackgroundPaint(Color.lightGray);
    plot.setDomainGridlinePaint(Color.white);
    plot.setDomainGridlinesVisible(true);
    plot.setRangeGridlinePaint(Color.white);

    // set the range axis to display integers only...
    NumberAxis rangeAxis = (NumberAxis) plot.getRangeAxis();
    rangeAxis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());

    // disable bar outlines...
    BarRenderer renderer = (BarRenderer) plot.getRenderer();
    renderer.setDrawBarOutline(false);

    // set up gradient paints for series...
    GradientPaint gp0 = new GradientPaint(0.0f, 0.0f, Color.blue, 0.0f, 0.0f, new Color(0, 0, 64));
    GradientPaint gp1 = new GradientPaint(0.0f, 0.0f, Color.green, 0.0f, 0.0f, new Color(0, 64, 0));
    GradientPaint gp2 = new GradientPaint(0.0f, 0.0f, Color.red, 0.0f, 0.0f, new Color(64, 0, 0));
    renderer.setSeriesPaint(0, gp0);
    renderer.setSeriesPaint(1, gp1);
    renderer.setSeriesPaint(2, gp2);

    CategoryAxis domainAxis = plot.getDomainAxis();
    domainAxis.setCategoryLabelPositions(CategoryLabelPositions.createUpRotationLabelPositions(Math.PI / 6.0));
    // OPTIONAL CUSTOMISATION COMPLETED.

    return chart;

}

From source file:net.sourceforge.atunes.kernel.controllers.stats.StatsDialogController.java

private void setAlbumsChart() {
    DefaultCategoryDataset dataset = getDataSet(HandlerProxy.getRepositoryHandler().getMostPlayedAlbums(10));
    JFreeChart chart = ChartFactory.createStackedBarChart3D(LanguageTool.getString("ALBUM_MOST_PLAYED"), null,
            null, dataset, PlotOrientation.HORIZONTAL, false, false, false);
    chart.getTitle().setFont(new Font(Font.SANS_SERIF, Font.PLAIN, 11));
    chart.setBackgroundPaint(new GradientPaint(0, 0, ColorDefinitions.GENERAL_NON_PANEL_TOP_GRADIENT_COLOR, 0,
            200, ColorDefinitions.GENERAL_NON_PANEL_BOTTOM_GRADIENT_COLOR));
    chart.setPadding(new RectangleInsets(5, 0, 0, 0));
    NumberAxis axis = new NumberAxis();
    axis.setStandardTickUnits(NumberAxis.createIntegerTickUnits());
    axis.setTickLabelFont(new Font(Font.SANS_SERIF, Font.PLAIN, 10));
    chart.getCategoryPlot().setRangeAxis(axis);
    chart.getCategoryPlot().setForegroundAlpha(0.6f);
    chart.getCategoryPlot().getRenderer().setPaint(Color.GREEN);

    ((StatsDialog) frameControlled).getAlbumsChart()
            .setIcon(new ImageIcon(chart.createBufferedImage(710, 250)));
}

From source file:convcao.com.agent.ConvcaoNeptusInteraction.java

@Override
public void paint(Graphics2D g2, StateRenderer2D renderer) {
    Graphics2D g = (Graphics2D) g2.create();

    Point2D center = renderer.getScreenPosition(coords.squareCenter);
    double width = renderer.getZoom() * coords.cellWidth * coords.numCols;
    double height = renderer.getZoom() * coords.cellWidth * coords.numRows;
    g.setColor(new Color(0, 0, 255, 64));
    g.translate(center.getX(), center.getY());
    g.rotate(-renderer.getRotation());/*  w w w  .ja v  a2s  . c  o m*/
    g.fill(new Rectangle2D.Double(-width / 2, -height / 2, width, height));
    g.rotate(renderer.getRotation());
    g.translate(-center.getX(), -center.getY());

    if (!active) {
        g.dispose();
        return;
    }

    g.setColor(Color.orange);
    int pos = 50;
    for (String v : nameTable.values()) {
        g.drawString(v + ": " + depths.get(v) + "m", 15, pos);
        pos += 20;
    }

    for (String vehicle : nameTable.values()) {
        LocationType src = positions.get(vehicle);
        LocationType dst = destinations.get(vehicle);

        if (!arrived.get(vehicle))
            g.setColor(Color.red.darker());
        else
            g.setColor(Color.green.darker());
        float dash[] = { 4.0f };
        g.setStroke(new BasicStroke(1.0f, BasicStroke.CAP_BUTT, BasicStroke.JOIN_MITER, 5.0f, dash, 0.0f));
        g.draw(new Line2D.Double(renderer.getScreenPosition(src), renderer.getScreenPosition(dst)));

        Point2D dstPt = renderer.getScreenPosition(dst);

        if (!arrived.get(vehicle))
            g.setColor(Color.red.darker());
        else
            g.setColor(Color.green.darker());

        g.fill(new Ellipse2D.Double(dstPt.getX() - 4, dstPt.getY() - 4, 8, 8));
    }

    g.dispose();
}

From source file:com.graphhopper.jsprit.analysis.toolbox.Plotter.java

private LegendTitle createLegend(final Collection<VehicleRoute> routes, final XYSeriesCollection shipments,
        final XYPlot plot) {
    LegendItemSource lis = new LegendItemSource() {

        @Override//from www.  j ava2 s  .c  o  m
        public LegendItemCollection getLegendItems() {
            LegendItemCollection lic = new LegendItemCollection();
            LegendItem vehLoc = new LegendItem("vehLoc", Color.RED);
            vehLoc.setShape(ELLIPSE);
            vehLoc.setShapeVisible(true);
            lic.add(vehLoc);
            if (containsServiceAct) {
                LegendItem item = new LegendItem("service", Color.BLUE);
                item.setShape(ELLIPSE);
                item.setShapeVisible(true);
                lic.add(item);
            }
            if (containsPickupAct) {
                LegendItem item = new LegendItem("pickup", Color.GREEN);
                item.setShape(ELLIPSE);
                item.setShapeVisible(true);
                lic.add(item);
            }
            if (containsDeliveryAct) {
                LegendItem item = new LegendItem("delivery", Color.BLUE);
                item.setShape(ELLIPSE);
                item.setShapeVisible(true);
                lic.add(item);
            }
            if (routes != null) {
                LegendItem item = new LegendItem("firstActivity", Color.BLACK);
                Shape upTriangle = ShapeUtilities.createUpTriangle(3.0f);
                item.setShape(upTriangle);
                item.setOutlinePaint(Color.BLACK);

                item.setLine(upTriangle);
                item.setLinePaint(Color.BLACK);
                item.setShapeVisible(true);

                lic.add(item);
            }
            if (!shipments.getSeries().isEmpty()) {
                lic.add(plot.getRenderer(1).getLegendItem(1, 0));
            }
            if (routes != null) {
                lic.addAll(plot.getRenderer(2).getLegendItems());
            }
            return lic;
        }
    };

    LegendTitle legend = new LegendTitle(lis);
    legend.setPosition(RectangleEdge.BOTTOM);
    return legend;
}

From source file:com.u2apple.tool.ui.MainFrame.java

/**
 * This method is called from within the constructor to initialize the form.
 * WARNING: Do NOT modify this code. The content of this method is always
 * regenerated by the Form Editor./*from  w w w  .  jav a  2 s  .c  o  m*/
 */
@SuppressWarnings("unchecked")
// <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
private void initComponents() {

    buttonGroup1 = new javax.swing.ButtonGroup();
    jPanel1 = new javax.swing.JPanel();
    jPanel4 = new javax.swing.JPanel();
    jPanel5 = new javax.swing.JPanel();
    productIdLabel = new javax.swing.JLabel();
    productIdTextField = new javax.swing.JTextField();
    brandLabel = new javax.swing.JLabel();
    brandTextField = new javax.swing.JTextField();
    productLabel = new javax.swing.JLabel();
    productTextField = new javax.swing.JTextField();
    aliasLabel = new javax.swing.JLabel();
    aliasTextField = new javax.swing.JTextField();
    typeComboBox = new javax.swing.JComboBox();
    jLabel2 = new javax.swing.JLabel();
    enBrandLabel = new javax.swing.JLabel();
    enBrandTextField = new javax.swing.JTextField();
    enProductLabel = new javax.swing.JLabel();
    enProductTextField = new javax.swing.JTextField();
    jLabel4 = new javax.swing.JLabel();
    enAliasTextField = new javax.swing.JTextField();
    jPanel12 = new javax.swing.JPanel();
    jScrollPane4 = new javax.swing.JScrollPane();
    resultTextArea = new javax.swing.JTextArea();
    jPanel13 = new javax.swing.JPanel();
    connectButton = new javax.swing.JButton();
    deviceButton = new javax.swing.JButton();
    modelButton = new javax.swing.JButton();
    testCaseButton = new javax.swing.JButton();
    knockOffButton = new javax.swing.JButton();
    knockOffCheckBox = new javax.swing.JCheckBox();
    productIdButton = new javax.swing.JButton();
    updateModelButton = new javax.swing.JButton();
    conditionCheckBox = new javax.swing.JCheckBox();
    detailButton = new javax.swing.JButton();
    queryLimitSpinner = new javax.swing.JSpinner();
    allCheckBox = new javax.swing.JCheckBox();
    googleButton = new javax.swing.JButton();
    baiduButton = new javax.swing.JButton();
    sortButton = new javax.swing.JButton();
    updateTestCaseButton = new javax.swing.JButton();
    deviceCountButton = new javax.swing.JButton();
    addButton = new javax.swing.JButton();
    updateButton = new javax.swing.JButton();
    flushButton = new javax.swing.JButton();
    jPanel14 = new javax.swing.JPanel();
    resolutionLabel = new javax.swing.JLabel();
    resolutionComboBox = new javax.swing.JComboBox();
    partitionLabel = new javax.swing.JLabel();
    partitionTextField = new javax.swing.JTextField();
    jPanel6 = new javax.swing.JPanel();
    modelLabel = new javax.swing.JLabel();
    modelTextField = new javax.swing.JTextField();
    vidLabel = new javax.swing.JLabel();
    vidTextField = new javax.swing.JTextField();
    conditionComboBox = new javax.swing.JComboBox();
    conditionTextField = new javax.swing.JTextField();
    jLabel3 = new javax.swing.JLabel();
    vid2TextField = new javax.swing.JTextField();
    condition2ComboBox = new javax.swing.JComboBox();
    condition2TextField = new javax.swing.JTextField();
    jScrollPane1 = new javax.swing.JScrollPane();
    deviceTable = new javax.swing.JTable();
    queryPanel = new javax.swing.JPanel();
    jLabel1 = new javax.swing.JLabel();
    daysSpinner = new javax.swing.JSpinner();
    deviceRankingButton = new javax.swing.JButton();
    errorRecognitionButton = new javax.swing.JButton();
    queryTextField = new javax.swing.JTextField();
    queryButton = new javax.swing.JButton();
    rootSpritButton = new javax.swing.JButton();
    filterButton = new javax.swing.JButton();
    unnormalDeviceFilterButton = new javax.swing.JButton();
    newDeviceFilterButton = new javax.swing.JButton();
    excludeFilterButton = new javax.swing.JButton();
    queryFilterButton = new javax.swing.JButton();
    removeDeviceButton = new javax.swing.JButton();
    othersDevicesButton = new javax.swing.JButton();
    fakeDetectionButton = new javax.swing.JButton();
    shuameMobileButton = new javax.swing.JButton();
    jPanel2 = new javax.swing.JPanel();
    jScrollPane2 = new javax.swing.JScrollPane();
    deviceDetailTable = new javax.swing.JTable();

    setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
    setTitle("Recognition Tool");

    jPanel1.setPreferredSize(new java.awt.Dimension(1900, 971));

    jPanel5.setBorder(javax.swing.BorderFactory.createTitledBorder("Device"));
    jPanel5.setFont(new java.awt.Font("", 0, 12)); // NOI18N

    productIdLabel.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    productIdLabel.setText("Product ID:");

    productIdTextField.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    productIdTextField.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            productIdTextFieldActionPerformed(evt);
        }
    });
    productIdTextField.addPropertyChangeListener(new java.beans.PropertyChangeListener() {
        public void propertyChange(java.beans.PropertyChangeEvent evt) {
            productIdTextFieldPropertyChange(evt);
        }
    });
    productIdTextField.getDocument().addDocumentListener(new DocumentListener() {
        public void changedUpdate(DocumentEvent e) {
        }

        public void removeUpdate(DocumentEvent e) {
            String productId = productIdTextField.getText();
            boolean exists = deviceDao.productIdExists(productId);
            if (exists) {
                productIdTextField.setBackground(Color.GREEN);
            } else {
                productIdTextField.setBackground(Color.WHITE);
            }
        }

        public void insertUpdate(DocumentEvent e) {
            String productId = productIdTextField.getText();
            boolean exists = deviceDao.productIdExists(productId);
            if (exists) {
                productIdTextField.setBackground(Color.GREEN);
            } else {
                productIdTextField.setBackground(Color.WHITE);
            }
        }
    });

    brandLabel.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    brandLabel.setText("Brand:");

    brandTextField.setFont(new java.awt.Font("", 0, 12)); // NOI18N

    productLabel.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    productLabel.setText("Product:");

    productTextField.setFont(new java.awt.Font("", 0, 12)); // NOI18N

    aliasLabel.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    aliasLabel.setText("Alias:");

    aliasTextField.setFont(new java.awt.Font("", 0, 12)); // NOI18N

    typeComboBox.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    typeComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Phone&Pad", "Box", "Watch" }));

    jLabel2.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    jLabel2.setText("Type:");

    enBrandLabel.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    enBrandLabel.setText("EN Brand:");

    enBrandTextField.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    enBrandTextField.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            enBrandTextFieldActionPerformed(evt);
        }
    });

    enProductLabel.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    enProductLabel.setText("EN Product:");

    enProductTextField.setFont(new java.awt.Font("", 0, 12)); // NOI18N

    jLabel4.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    jLabel4.setText("EN Alias:");

    enAliasTextField.setFont(new java.awt.Font("", 0, 12)); // NOI18N

    javax.swing.GroupLayout jPanel5Layout = new javax.swing.GroupLayout(jPanel5);
    jPanel5.setLayout(jPanel5Layout);
    jPanel5Layout.setHorizontalGroup(jPanel5Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup()
                    .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(enBrandLabel).addComponent(productIdLabel).addComponent(brandLabel))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(
                            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(brandTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 208,
                                            Short.MAX_VALUE)
                                    .addComponent(productIdTextField).addComponent(enBrandTextField))
                    .addGap(18, 18, 18)
                    .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addGroup(jPanel5Layout.createSequentialGroup().addGroup(jPanel5Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(productLabel).addComponent(jLabel2))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addGroup(jPanel5Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(typeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(productTextField,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 209,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)))
                            .addGroup(jPanel5Layout.createSequentialGroup().addComponent(enProductLabel)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(enProductTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            207, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addGap(23, 23, 23)
                    .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
                            .addComponent(aliasLabel).addComponent(jLabel4))
                    .addGap(18, 18, 18).addGroup(
                            jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(aliasTextField, javax.swing.GroupLayout.DEFAULT_SIZE, 208,
                                            Short.MAX_VALUE)
                                    .addComponent(enAliasTextField))));
    jPanel5Layout.setVerticalGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel5Layout.createSequentialGroup().addContainerGap().addGroup(jPanel5Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                    .addComponent(productIdLabel)
                    .addComponent(productIdTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel2).addComponent(typeComboBox, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(10, 10, 10)
                    .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(productLabel)
                            .addComponent(productTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(brandLabel)
                            .addComponent(brandTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(aliasLabel).addComponent(aliasTextField,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                            javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel5Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(enBrandLabel)
                            .addComponent(enBrandTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(enProductLabel)
                            .addComponent(enProductTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(jLabel4).addComponent(enAliasTextField,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap()));

    jPanel12.setBorder(javax.swing.BorderFactory.createTitledBorder("Result"));

    resultTextArea.setColumns(20);
    resultTextArea.setFont(new java.awt.Font("", 0, 13)); // NOI18N
    resultTextArea.setRows(5);
    jScrollPane4.setViewportView(resultTextArea);

    javax.swing.GroupLayout jPanel12Layout = new javax.swing.GroupLayout(jPanel12);
    jPanel12.setLayout(jPanel12Layout);
    jPanel12Layout
            .setHorizontalGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                            jPanel12Layout.createSequentialGroup()
                                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 864,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(35, 35, 35)));
    jPanel12Layout
            .setVerticalGroup(jPanel12Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING,
                            jPanel12Layout.createSequentialGroup()
                                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                    .addComponent(jScrollPane4, javax.swing.GroupLayout.PREFERRED_SIZE, 114,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(19, 19, 19)));

    jPanel13.setBorder(javax.swing.BorderFactory.createTitledBorder("Action"));
    jPanel13.setFont(new java.awt.Font("", 0, 12)); // NOI18N

    connectButton.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    connectButton.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/New Filled-32.png"))); // NOI18N
    connectButton.setToolTipText("Get the latest device information.");
    connectButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            connectButtonActionPerformed(evt);
        }
    });

    deviceButton.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    deviceButton.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/Android-32.png"))); // NOI18N
    deviceButton.setToolTipText("Add device");
    deviceButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            deviceButtonActionPerformed(evt);
        }
    });

    modelButton.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    modelButton.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/Ruler Filled-32.png"))); // NOI18N
    modelButton.setToolTipText("Add model to system mode and recovery mode");
    modelButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            modelButtonActionPerformed(evt);
        }
    });

    testCaseButton.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    testCaseButton.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/Checked Filled-32.png"))); // NOI18N
    testCaseButton.setToolTipText("Add test case");
    testCaseButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            testCaseButtonActionPerformed(evt);
        }
    });

    knockOffButton.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    knockOffButton.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/Biotech Filled-32.png"))); // NOI18N
    knockOffButton.setToolTipText("Generate Knock-Off configuration");
    knockOffButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            knockOffButtonActionPerformed(evt);
        }
    });

    knockOffCheckBox.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    knockOffCheckBox.setText("Knock-Off");

    productIdButton.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    productIdButton.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/RFID Signal-32.png"))); // NOI18N
    productIdButton.setToolTipText("Fullfill device information");
    productIdButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            productIdButtonActionPerformed(evt);
        }
    });

    updateModelButton.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    updateModelButton
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/Ruler-32.png"))); // NOI18N
    updateModelButton.setToolTipText("Add model to current vid");
    updateModelButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            updateModelButtonActionPerformed(evt);
        }
    });

    conditionCheckBox.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    conditionCheckBox.setText("Condition");

    detailButton.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    detailButton.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/com/u2apple/tool/icon/View Details Filled-32.png"))); // NOI18N
    detailButton.setToolTipText("Device detail");
    detailButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            detailButtonActionPerformed(evt);
        }
    });

    queryLimitSpinner.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    queryLimitSpinner.setModel(new javax.swing.SpinnerNumberModel(10, 1, 100, 10));

    allCheckBox.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    allCheckBox.setText("All");

    googleButton.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    googleButton.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/Google Logo-32.png"))); // NOI18N
    googleButton.setToolTipText("Google");
    googleButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            googleButtonActionPerformed(evt);
        }
    });

    baiduButton.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    baiduButton.setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/B-32.png"))); // NOI18N
    baiduButton.setToolTipText("Baidu");
    baiduButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            baiduButtonActionPerformed(evt);
        }
    });

    sortButton.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    sortButton.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/com/u2apple/tool/icon/Descending Sorting-32.png"))); // NOI18N
    sortButton.setToolTipText("Sort models under a vid");
    sortButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            sortButtonActionPerformed(evt);
        }
    });

    updateTestCaseButton.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    updateTestCaseButton.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/com/u2apple/tool/icon/Checkmark Filled-32.png"))); // NOI18N
    updateTestCaseButton.setToolTipText("Update test case");
    updateTestCaseButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            updateTestCaseButtonActionPerformed(evt);
        }
    });

    deviceCountButton.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    deviceCountButton
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/Sigma-32.png"))); // NOI18N
    deviceCountButton.setToolTipText("Device Count");
    deviceCountButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            deviceCountButtonActionPerformed(evt);
        }
    });

    addButton.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/Plus Math-32.png"))); // NOI18N
    addButton.setToolTipText("Add new device and model");
    addButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            addButtonActionPerformed(evt);
        }
    });

    updateButton.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/com/u2apple/tool/icon/Available Updates-32.png"))); // NOI18N
    updateButton.setToolTipText("Update");
    updateButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            updateButtonActionPerformed(evt);
        }
    });

    flushButton
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/Save-32.png"))); // NOI18N
    flushButton.setToolTipText("Flush devices to file");
    flushButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            flushButtonActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout jPanel13Layout = new javax.swing.GroupLayout(jPanel13);
    jPanel13.setLayout(jPanel13Layout);
    jPanel13Layout
            .setHorizontalGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel13Layout.createSequentialGroup().addContainerGap().addGroup(jPanel13Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addComponent(productIdButton, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(deviceButton, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(
                                    knockOffButton, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGap(18, 18, 18)
                            .addGroup(
                                    jPanel13Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addGroup(jPanel13Layout.createSequentialGroup()
                                                    .addComponent(detailButton).addGap(18, 18, 18)
                                                    .addComponent(queryLimitSpinner,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE, 65,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addGap(18, 18, 18)
                                                    .addComponent(allCheckBox,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE, 81,
                                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                                    .addGap(18, 18, 18).addComponent(connectButton)
                                                    .addGap(18, 18, 18).addComponent(deviceCountButton)
                                                    .addGap(18, 18, 18).addComponent(googleButton)
                                                    .addGap(18, 18, 18).addComponent(baiduButton))
                                            .addGroup(jPanel13Layout.createSequentialGroup()
                                                    .addGroup(jPanel13Layout
                                                            .createParallelGroup(
                                                                    javax.swing.GroupLayout.Alignment.TRAILING,
                                                                    false)
                                                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING,
                                                                    jPanel13Layout.createSequentialGroup()
                                                                            .addComponent(testCaseButton)
                                                                            .addGap(18, 18, 18)
                                                                            .addComponent(updateTestCaseButton)
                                                                            .addGap(18, 18, 18)
                                                                            .addComponent(knockOffCheckBox)
                                                                            .addGap(18, 18, 18).addComponent(
                                                                                    sortButton,
                                                                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                                                                    0, Short.MAX_VALUE))
                                                            .addGroup(javax.swing.GroupLayout.Alignment.LEADING,
                                                                    jPanel13Layout.createSequentialGroup()
                                                                            .addComponent(modelButton)
                                                                            .addGap(18, 18, 18)
                                                                            .addComponent(updateModelButton)
                                                                            .addGap(18, 18, 18)
                                                                            .addComponent(conditionCheckBox)
                                                                            .addGap(18, 18, 18)
                                                                            .addComponent(addButton)))
                                                    .addGap(18, 18, 18).addComponent(updateButton)
                                                    .addGap(18, 18, 18).addComponent(flushButton)))
                            .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jPanel13Layout.setVerticalGroup(jPanel13Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel13Layout.createSequentialGroup()
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel13Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(detailButton).addComponent(connectButton)
                                    .addGroup(jPanel13Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                            .addComponent(queryLimitSpinner,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE, 41,
                                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                                            .addComponent(allCheckBox, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    41, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addComponent(productIdButton, javax.swing.GroupLayout.Alignment.TRAILING)
                                    .addComponent(deviceCountButton).addComponent(googleButton))
                            .addComponent(baiduButton))
                    .addGap(18, 18, 18)
                    .addGroup(jPanel13Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel13Layout.createSequentialGroup().addGroup(jPanel13Layout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addGroup(jPanel13Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING,
                                                    false)
                                            .addComponent(deviceButton, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(modelButton, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(updateModelButton,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(addButton).addComponent(conditionCheckBox))
                                    .addComponent(updateButton)).addGap(18, 18, 18)
                                    .addGroup(jPanel13Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(testCaseButton).addComponent(knockOffButton)
                                            .addComponent(updateTestCaseButton).addComponent(sortButton)
                                            .addComponent(knockOffCheckBox)))
                            .addComponent(flushButton))));

    jPanel14.setBorder(javax.swing.BorderFactory.createTitledBorder("Knock-Off"));

    resolutionLabel.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    resolutionLabel.setText("Resolution:");

    resolutionComboBox.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    resolutionComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "320x480", "480x800",
            "480x854", "540x960", "720x1184", "720x1280", "800x1280", "1080x1776", "1080x1920", "1440x2392" }));
    resolutionComboBox.setSelectedIndex(5);

    partitionLabel.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    partitionLabel.setText("Partition:");

    partitionTextField.setFont(new java.awt.Font("", 0, 12)); // NOI18N

    javax.swing.GroupLayout jPanel14Layout = new javax.swing.GroupLayout(jPanel14);
    jPanel14.setLayout(jPanel14Layout);
    jPanel14Layout.setHorizontalGroup(jPanel14Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(resolutionLabel).addComponent(partitionLabel))
                    .addGap(18, 18, 18)
                    .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(resolutionComboBox, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(partitionTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 779,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addGap(24, 24, 24)));
    jPanel14Layout.setVerticalGroup(jPanel14Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel14Layout.createSequentialGroup()
                    .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(resolutionLabel).addComponent(resolutionComboBox,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                    .addGroup(jPanel14Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(partitionLabel).addComponent(partitionTextField,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));

    jPanel6.setBorder(javax.swing.BorderFactory.createTitledBorder("Model"));
    jPanel6.setFont(new java.awt.Font("", 0, 12)); // NOI18N

    modelLabel.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    modelLabel.setText("Model:");

    modelTextField.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    modelTextField.getDocument().addDocumentListener(new DocumentListener() {
        public void changedUpdate(DocumentEvent e) {
            checkModelExistence();
        }

        public void removeUpdate(DocumentEvent e) {
            checkModelExistence();
        }

        public void insertUpdate(DocumentEvent e) {
            checkModelExistence();
        }
    });

    vidLabel.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    vidLabel.setText("VID:");

    vidTextField.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    vidTextField.getDocument().addDocumentListener(new DocumentListener() {
        public void changedUpdate(DocumentEvent e) {
            checkModelExistence();
        }

        public void removeUpdate(DocumentEvent e) {
            checkModelExistence();
        }

        public void insertUpdate(DocumentEvent e) {
            checkModelExistence();
        }
    });

    conditionComboBox.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    conditionComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Board", "Brand", "Cpu",
            "Device", "Hardware", "Manufacturer", "Adb_Device", "Display_ID", "Product_Name" }));
    conditionComboBox.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            conditionComboBoxActionPerformed(evt);
        }
    });

    conditionTextField.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    conditionTextField.addFocusListener(new java.awt.event.FocusAdapter() {
        public void focusGained(java.awt.event.FocusEvent evt) {
            conditionTextFieldFocusGained(evt);
        }
    });

    jLabel3.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    jLabel3.setText("VID2:");

    vid2TextField.setFont(new java.awt.Font("", 0, 12)); // NOI18N

    condition2ComboBox.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    condition2ComboBox.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Board", "Brand", "Cpu",
            "Device", "Hardware", "Manufacturer", "Adb_Device", "Display_ID", "Product_Name" }));
    condition2ComboBox.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            condition2ComboBoxActionPerformed(evt);
        }
    });

    condition2TextField.setFont(new java.awt.Font("", 0, 12)); // NOI18N

    javax.swing.GroupLayout jPanel6Layout = new javax.swing.GroupLayout(jPanel6);
    jPanel6.setLayout(jPanel6Layout);
    jPanel6Layout.setHorizontalGroup(jPanel6Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(modelLabel)
                            .addComponent(vidLabel, javax.swing.GroupLayout.Alignment.TRAILING))
                    .addGap(18, 18, 18)
                    .addGroup(jPanel6Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                            .addGroup(jPanel6Layout.createSequentialGroup()
                                    .addComponent(vidTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 72,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18).addComponent(jLabel3)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(vid2TextField, javax.swing.GroupLayout.PREFERRED_SIZE, 72,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(modelTextField))
                    .addGap(54, 54, 54)
                    .addGroup(
                            jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                                    .addComponent(conditionComboBox, javax.swing.GroupLayout.PREFERRED_SIZE, 90,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(condition2ComboBox, 0, 1, Short.MAX_VALUE))
                    .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel6Layout.createSequentialGroup().addGap(4, 4, 4).addComponent(
                                    conditionTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 160,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addGroup(jPanel6Layout.createSequentialGroup()
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                                    .addComponent(condition2TextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            160, javax.swing.GroupLayout.PREFERRED_SIZE)))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    jPanel6Layout.setVerticalGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel6Layout.createSequentialGroup().addGroup(jPanel6Layout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE).addComponent(vidLabel)
                    .addComponent(vidTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(jLabel3)
                    .addComponent(vid2TextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(conditionComboBox, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addComponent(conditionTextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(jPanel6Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                            .addComponent(condition2ComboBox, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(condition2TextField, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(modelLabel).addComponent(modelTextField,
                                    javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))));

    javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
    jPanel4.setLayout(jPanel4Layout);
    jPanel4Layout
            .setHorizontalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(jPanel4Layout.createSequentialGroup().addContainerGap().addGroup(jPanel4Layout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING, false)
                            .addComponent(jPanel13, javax.swing.GroupLayout.Alignment.LEADING,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(jPanel14, javax.swing.GroupLayout.Alignment.LEADING,
                                    javax.swing.GroupLayout.PREFERRED_SIZE, 899, Short.MAX_VALUE)
                            .addComponent(jPanel6, javax.swing.GroupLayout.Alignment.LEADING,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(jPanel5, javax.swing.GroupLayout.Alignment.LEADING,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                                    Short.MAX_VALUE)
                            .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, 899,
                                    Short.MAX_VALUE))
                            .addContainerGap(88, Short.MAX_VALUE)));
    jPanel4Layout.setVerticalGroup(jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel4Layout.createSequentialGroup()
                    .addComponent(jPanel5, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(jPanel6, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(18, 18, 18)
                    .addComponent(jPanel14, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jPanel13, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addComponent(jPanel12, javax.swing.GroupLayout.PREFERRED_SIZE, 156,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));

    deviceTable.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    deviceTable.setModel(new DeviceTableModel(new ArrayList<AndroidDeviceRanking>()));
    initRowSelectionEvent();
    jScrollPane1.setViewportView(deviceTable);

    jLabel1.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    jLabel1.setText("Days:");

    daysSpinner.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    daysSpinner.setModel(new javax.swing.SpinnerNumberModel(1, 0, 10, 1));

    deviceRankingButton.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    deviceRankingButton.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/com/u2apple/tool/icon/Question Mark Filled-32.png"))); // NOI18N
    deviceRankingButton.setToolTipText("Unrecognized devices trend");
    deviceRankingButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            deviceRankingButtonActionPerformed(evt);
        }
    });

    errorRecognitionButton.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    errorRecognitionButton.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/Bug Filled-32.png"))); // NOI18N
    errorRecognitionButton.setToolTipText("Error detection");
    errorRecognitionButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            errorRecognitionButtonActionPerformed(evt);
        }
    });

    queryTextField.setFont(new java.awt.Font("", 0, 14)); // NOI18N
    queryTextField.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            queryTextFieldActionPerformed(evt);
        }
    });

    queryButton.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    queryButton.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/Search Filled-32.png"))); // NOI18N
    queryButton.setToolTipText("Query by model");
    queryButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            queryButtonActionPerformed(evt);
        }
    });

    rootSpritButton.setIcon(new javax.swing.ImageIcon(
            getClass().getResource("/com/u2apple/tool/icon/Restriction Shield Filled-32.png"))); // NOI18N
    rootSpritButton.setToolTipText("Mobile root spirit device ranking list");
    rootSpritButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            rootSpritButtonActionPerformed(evt);
        }
    });

    filterButton
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/Like-32.png"))); // NOI18N
    filterButton.setToolTipText("Pattern Filter");
    filterButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            filterButtonActionPerformed(evt);
        }
    });

    unnormalDeviceFilterButton.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/Define Location-32.png"))); // NOI18N
    unnormalDeviceFilterButton.setToolTipText("Unnormal device filter");
    unnormalDeviceFilterButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            unnormalDeviceFilterButtonActionPerformed(evt);
        }
    });

    newDeviceFilterButton
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/New-32.png"))); // NOI18N
    newDeviceFilterButton.setToolTipText("Brand new devices filter");
    newDeviceFilterButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            newDeviceFilterButtonActionPerformed(evt);
        }
    });

    excludeFilterButton.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/Not Equal-32.png"))); // NOI18N
    excludeFilterButton.setToolTipText("Exclude filter");
    excludeFilterButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            excludeFilterButtonActionPerformed(evt);
        }
    });

    queryFilterButton
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/Filter-32.png"))); // NOI18N
    queryFilterButton.setToolTipText("Query filter");
    queryFilterButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            queryFilterButtonActionPerformed(evt);
        }
    });

    removeDeviceButton
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/Delete-32.png"))); // NOI18N
    removeDeviceButton.setToolTipText("Remove row");
    removeDeviceButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            removeDeviceButtonActionPerformed(evt);
        }
    });

    othersDevicesButton
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/More-32.png"))); // NOI18N
    othersDevicesButton.setToolTipText("Others");
    othersDevicesButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            othersDevicesButtonActionPerformed(evt);
        }
    });

    fakeDetectionButton
            .setIcon(new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/Copy-32.png"))); // NOI18N
    fakeDetectionButton.setToolTipText("Fake detection");
    fakeDetectionButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            fakeDetectionButtonActionPerformed(evt);
        }
    });

    shuameMobileButton.setIcon(
            new javax.swing.ImageIcon(getClass().getResource("/com/u2apple/tool/icon/Question Mark-32.png"))); // NOI18N
    shuameMobileButton.setToolTipText("List unidentified devices of Shuame mobile");
    shuameMobileButton.addActionListener(new java.awt.event.ActionListener() {
        public void actionPerformed(java.awt.event.ActionEvent evt) {
            shuameMobileButtonActionPerformed(evt);
        }
    });

    javax.swing.GroupLayout queryPanelLayout = new javax.swing.GroupLayout(queryPanel);
    queryPanel.setLayout(queryPanelLayout);
    queryPanelLayout.setHorizontalGroup(queryPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(queryPanelLayout.createSequentialGroup().addGroup(queryPanelLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
                    .addGroup(queryPanelLayout.createSequentialGroup().addComponent(filterButton)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(othersDevicesButton)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(unnormalDeviceFilterButton)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(newDeviceFilterButton)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                            .addComponent(excludeFilterButton)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(queryFilterButton).addGap(18, 18, 18).addComponent(jLabel1)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(daysSpinner, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
                            .addComponent(deviceRankingButton, javax.swing.GroupLayout.PREFERRED_SIZE, 68,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED,
                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                            .addComponent(shuameMobileButton))
                    .addComponent(queryTextField, javax.swing.GroupLayout.PREFERRED_SIZE, 679,
                            javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                    .addGroup(queryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(queryPanelLayout.createSequentialGroup().addComponent(queryButton)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(removeDeviceButton))
                            .addGroup(queryPanelLayout.createSequentialGroup().addComponent(rootSpritButton)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(errorRecognitionButton)
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(fakeDetectionButton)))
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)));
    queryPanelLayout.setVerticalGroup(queryPanelLayout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(queryPanelLayout.createSequentialGroup().addContainerGap().addGroup(queryPanelLayout
                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                    .addGroup(queryPanelLayout.createSequentialGroup().addComponent(errorRecognitionButton)
                            .addGap(0, 0, Short.MAX_VALUE))
                    .addGroup(queryPanelLayout.createSequentialGroup().addGroup(queryPanelLayout
                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(fakeDetectionButton).addComponent(filterButton)
                            .addGroup(queryPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
                                    .addComponent(daysSpinner, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(jLabel1))
                            .addComponent(othersDevicesButton).addComponent(unnormalDeviceFilterButton)
                            .addComponent(newDeviceFilterButton).addComponent(excludeFilterButton)
                            .addComponent(queryFilterButton)
                            .addComponent(deviceRankingButton, javax.swing.GroupLayout.PREFERRED_SIZE, 41,
                                    javax.swing.GroupLayout.PREFERRED_SIZE)
                            .addComponent(rootSpritButton).addComponent(shuameMobileButton)).addPreferredGap(
                                    javax.swing.LayoutStyle.ComponentPlacement.RELATED, 12, Short.MAX_VALUE)))
                    .addGroup(queryPanelLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addComponent(queryButton)
                            .addGroup(queryPanelLayout
                                    .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                    .addComponent(queryTextField, javax.swing.GroupLayout.Alignment.TRAILING,
                                            javax.swing.GroupLayout.PREFERRED_SIZE, 41,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addComponent(removeDeviceButton)))
                    .addContainerGap()));

    deviceDetailTable.setFont(new java.awt.Font("", 0, 12)); // NOI18N
    deviceDetailTable.setModel(new DeviceDetailTableModel(new ArrayList<AndroidDevice>()));
    deviceDetailTable.setCellSelectionEnabled(true);
    jScrollPane2.setViewportView(deviceDetailTable);

    javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
    jPanel2.setLayout(jPanel2Layout);
    jPanel2Layout.setHorizontalGroup(jPanel2Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup().addComponent(jScrollPane2,
                    javax.swing.GroupLayout.PREFERRED_SIZE, 1839, javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addGap(0, 1, Short.MAX_VALUE)));
    jPanel2Layout.setVerticalGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel2Layout.createSequentialGroup()
                    .addComponent(jScrollPane2, javax.swing.GroupLayout.DEFAULT_SIZE, 219, Short.MAX_VALUE)
                    .addContainerGap()));

    javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
    jPanel1.setLayout(jPanel1Layout);
    jPanel1Layout.setHorizontalGroup(jPanel1Layout
            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addContainerGap()
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addComponent(jPanel2, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addGroup(jPanel1Layout
                                            .createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                                            .addComponent(queryPanel, javax.swing.GroupLayout.DEFAULT_SIZE,
                                                    javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                                            .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE,
                                                    903, javax.swing.GroupLayout.PREFERRED_SIZE))
                                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
                                    .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(18, 18, 18)))));
    jPanel1Layout.setVerticalGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(jPanel1Layout.createSequentialGroup().addGap(0, 0, 0)
                    .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
                            .addGroup(jPanel1Layout.createSequentialGroup()
                                    .addComponent(queryPanel, javax.swing.GroupLayout.PREFERRED_SIZE,
                                            javax.swing.GroupLayout.DEFAULT_SIZE,
                                            javax.swing.GroupLayout.PREFERRED_SIZE)
                                    .addGap(4, 4, 4).addComponent(jScrollPane1,
                                            javax.swing.GroupLayout.PREFERRED_SIZE, 600,
                                            javax.swing.GroupLayout.PREFERRED_SIZE))
                            .addComponent(jPanel4, javax.swing.GroupLayout.PREFERRED_SIZE,
                                    javax.swing.GroupLayout.DEFAULT_SIZE,
                                    javax.swing.GroupLayout.PREFERRED_SIZE))
                    .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED).addComponent(jPanel2,
                            javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE,
                            javax.swing.GroupLayout.PREFERRED_SIZE)));

    javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
    getContentPane().setLayout(layout);
    layout.setHorizontalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING).addGroup(
            javax.swing.GroupLayout.Alignment.TRAILING,
            layout.createSequentialGroup()
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, 1856,
                            javax.swing.GroupLayout.PREFERRED_SIZE)
                    .addContainerGap()));
    layout.setVerticalGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
            .addGroup(layout.createSequentialGroup()
                    .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE,
                            javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)));

    pack();
}

From source file:jspritTest.util.Plotter.java

private LegendTitle createLegend(final Collection<VehicleRoute> routes, final XYSeriesCollection shipments,
        final XYPlot plot) {
    LegendItemSource lis = new LegendItemSource() {

        public LegendItemCollection getLegendItems() {
            LegendItemCollection lic = new LegendItemCollection();
            LegendItem vehLoc = new LegendItem("vehLoc", Color.RED);
            vehLoc.setShape(ELLIPSE);//from ww  w .j a  v  a  2  s  .c o  m
            vehLoc.setShapeVisible(true);
            lic.add(vehLoc);
            if (containsServiceAct) {
                LegendItem item = new LegendItem("service", Color.BLUE);
                item.setShape(ELLIPSE);
                item.setShapeVisible(true);
                lic.add(item);
            }
            if (containsPickupAct) {
                LegendItem item = new LegendItem("pickup", Color.GREEN);
                item.setShape(ELLIPSE);
                item.setShapeVisible(true);
                lic.add(item);
            }
            if (containsDeliveryAct) {
                LegendItem item = new LegendItem("delivery", Color.BLUE);
                item.setShape(ELLIPSE);
                item.setShapeVisible(true);
                lic.add(item);
            }
            if (routes != null) {
                LegendItem item = new LegendItem("firstActivity", Color.BLACK);
                Shape upTriangle = ShapeUtilities.createUpTriangle(3.0f);
                item.setShape(upTriangle);
                item.setOutlinePaint(Color.BLACK);

                item.setLine(upTriangle);
                item.setLinePaint(Color.BLACK);
                item.setShapeVisible(true);

                lic.add(item);
            }
            if (!shipments.getSeries().isEmpty()) {
                lic.add(plot.getRenderer(1).getLegendItem(1, 0));
            }
            if (routes != null) {
                lic.addAll(plot.getRenderer(2).getLegendItems());
            }
            return lic;
        }
    };

    LegendTitle legend = new LegendTitle(lis);
    legend.setPosition(RectangleEdge.BOTTOM);
    return legend;
}

From source file:com.ctsim.dmi.MainFrame.java

private void drawCeillingSpeed() {
    int strWidth;
    String speedShow = df.format(App.ceilingSpeed);

    g2.setColor(Color.RED);//from w ww.  j  a  v  a  2 s  . c  o m
    g2.setFont(new Font("Loma", Font.BOLD, 50));
    FontMetrics metrics = g2.getFontMetrics();
    strWidth = metrics.stringWidth(speedShow);

    g2.drawString(String.valueOf(speedShow), 306 - strWidth / 2, 535);

    g2.setColor(Color.GREEN);
    g2.setStroke(new BasicStroke(15));

    int arc = (int) (App.ceilingSpeed * 2.76);
    g2.drawArc(90, 40, 430, 430, 228 - arc, arc);
}