OpenConcerto

Dépôt officiel du code source de l'ERP OpenConcerto
sonarqube

svn://code.openconcerto.org/openconcerto

Rev

Rev 174 | Rev 182 | Go to most recent revision | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 174 Rev 177
Line 45... Line 45...
45
    /**
45
    /**
46
     * Mode '+' ajout d'une quantité '*' multiplication '-' soustraction ' ' remplacement
46
     * Mode '+' ajout d'une quantité '*' multiplication '-' soustraction ' ' remplacement
47
     */
47
     */
48
    private char mode = ' ';
48
    private char mode = ' ';
49
    private boolean init = true;
49
    private boolean init = true;
-
 
50
    private CaissePanel caissePanel;
50
 
51
 
51
    public PaiementPanel(CaisseControler controller) {
52
    public PaiementPanel(CaissePanel caissePanel) {
52
        this.controller = controller;
53
        this.controller = caissePanel.getControler();
53
        this.controller.addCaisseListener(this);
54
        this.controller.addCaisseListener(this);
54
        this.controller.addBarcodeListener(this);
55
        this.controller.addBarcodeListener(this);
-
 
56
        this.caissePanel = caissePanel;
55
        this.setOpaque(false);
57
        this.setOpaque(false);
56
 
58
 
57
        this.addMouseListener(this);
59
        this.addMouseListener(this);
58
 
60
 
59
        this.setLayout(null);
61
        this.setLayout(null);
Line 554... Line 556...
554
        return null;
556
        return null;
555
    }
557
    }
556
 
558
 
557
    @Override
559
    @Override
558
    public void keyReceived(KeyEvent e) {
560
    public void keyReceived(KeyEvent e) {
559
        if (e.getID() == KeyEvent.KEY_TYPED) {
561
        if (!this.caissePanel.isModeSearch() && e.getID() == KeyEvent.KEY_TYPED) {
560
            System.out.println("PaiementPanel.keyPressed()" + e.getKeyChar());
562
            System.out.println("PaiementPanel.keyPressed()" + e.getKeyChar());
561
            handleCharacter(e.getKeyChar());
563
            handleCharacter(e.getKeyChar());
562
        }
564
        }
563
 
565
 
564
    }
566
    }