public void fire(GUI gui, long globalClock) {
        this.globalClock = globalClock;

        // Highlight places ON
        gui.getCanvas().highlightPlaces(Global.petriNet.getInputArcs(), id, true, false);

        // Highlight inputArcs ON
        gui.getCanvas().highlightArcs(Global.petriNet.getInputArcs(), id, true, true);

        //remove all tokens from places
        Iterator it = Global.petriNet.getInputArcs().iterator();
        while (it.hasNext()) {
            InputArc arc = (InputArc) it.next();
            if (arc.getTransition().getId().equals(getId())) {
                arc.getPlace().removeTokens(arc.execute());
                gui.getJTextArea1().append("- " + arc.getExecuteText() + "\n");
                gui.getJTextArea1().setCaretPosition(gui.getJTextArea1().getText().length());
            }
        }

        // Highlight places OFF
        gui.getCanvas().highlightPlaces(Global.petriNet.getInputArcs(), id, false, false);

        // Highlight inputArcs OFF
        gui.getCanvas().highlightArcs(Global.petriNet.getInputArcs(), id, false, false);

        // Highlight transition ON
        gui.getCanvas().highlightTransition(id, true, true);
        if (!this.getLabel().equals(this.getId())) {
            gui.getJTextArea1().append(this.getLabel() + " (" + this.getId() + ") fired!\n");
        } else {
            gui.getJTextArea1().append(this.getId() + " fired.\n");
        }
        gui.getJTextArea1().setCaretPosition(gui.getJTextArea1().getText().length());


        // Highlight transition OFF
        gui.getCanvas().highlightTransition(id, false, false);

        // Highlight outputArcs ON
        gui.getCanvas().highlightArcs(Global.petriNet.getOutputArcs(), id, true, false);


        // Highlight places ON
        gui.getCanvas().highlightPlaces(Global.petriNet.getOutputArcs(), id, true, true);

        //create all tokens to output places
        it = Global.petriNet.getOutputArcs().iterator();
        while (it.hasNext()) {
            OutputArc arc = (OutputArc) it.next();
            if (arc.getTransition().getId().equals(getId())) {
                TokenSet tokenSet = arc.execute();
                tokenSet.incrementTime(globalClock);// set time of all new tokens of the tokenSet
                arc.getPlace().addToken(tokenSet);

                gui.getJTextArea1().append("+ " + arc.getExecuteText() + "\n");
                gui.getJTextArea1().setCaretPosition(gui.getJTextArea1().getText().length());

            }
        }

        // Highlight outputArcs OFF
        gui.getCanvas().highlightArcs(Global.petriNet.getOutputArcs(), id, false, false);

        // Highlight places OFF
        gui.getCanvas().highlightPlaces(Global.petriNet.getOutputArcs(), id, false, false);

        gui.getJTextArea1().append("----------------------------\n");
        gui.getCanvas().repaint();
    }