public ProtocolElem(JFrame frame, String key, String type) {
        this.id = StringUtils.Md5("" + System.nanoTime());

        this.setText(key, type);
        this.setSize(type);
        this.addMouseListener(new MouseAdapter() {

            private void button1Clicked() {
                MessageBox.showPEInfoBox(frame, thisPE.key, thisPE.type, (String newKey, String newType) -> {
                    if (StringUtils.isEmpty(newKey)) {
                        MessageBox.showConfirmBox(frame, "Error", "键不能为空", null);
                        return;
                    }

                    if (StringUtils.isEmpty(newType)) {
                        MessageBox.showConfirmBox(frame, "Error", "类型不能为空", null);
                        return;
                    }

                    Debugger.debug(() -> {
                        System.out.println(String.format("%s:%s vs. %s:%s", thisPE.key, thisPE.type, newKey, newType));
                    });

                    thisPE.setText(newKey, newType);
                    thisPE.setSize(newType);
                    frame.repaint();
                });
            }

            private void button2Clicked() {
                thisPE.getParent().remove(thisPE);
                frame.paintComponents(frame.getGraphics());
            }

            @Override
            public void mousePressed(MouseEvent e) {
                Debugger.debug(() -> {
                    System.out.println(e.getButton() == MouseEvent.BUTTON1);
                    System.out.println(e.getButton() == MouseEvent.BUTTON3);
                });
                switch (e.getButton()) {
                    case MouseEvent.BUTTON1:
                        button1Clicked();
                        break;
                    case MouseEvent.BUTTON3:
                        button2Clicked();
                        break;
                    default:
                }
            }

        });
    }