OpenConcerto

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

svn://code.openconcerto.org/openconcerto

Rev

Rev 151 | Show entire file | Regard whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 151 Rev 156
Line 122... Line 122...
122
                if (!e.getValueIsAdjusting()) {
122
                if (!e.getValueIsAdjusting()) {
123
                    final Object selectedValue = TicketPanel.this.list.getSelectedValue();
123
                    final Object selectedValue = TicketPanel.this.list.getSelectedValue();
124
                    if (selectedValue != null) {
124
                    if (selectedValue != null) {
125
                        final Article a = ((Pair<Article, Integer>) selectedValue).getFirst();
125
                        final Article a = ((Pair<Article, Integer>) selectedValue).getFirst();
126
                        controler.setArticleSelected(a);
126
                        controler.setArticleSelected(a);
127
                        // If the category of the selected article does not match the current category of the categories list,
127
                        // If the category of the selected article does not match the current
-
 
128
                        // category of the categories list,
128
                        // then the corresponding article is not selected.
129
                        // then the corresponding article is not selected.
129
                        controler.setArticleSelected(a);  // Dirty fix : use two refresh
130
                        controler.setArticleSelected(a); // Dirty fix : use two refresh
130
                    }
131
                    }
131
                }
132
                }
132
 
133
 
Line 139... Line 140...
139
    protected void paintComponent(final Graphics g) {
140
    protected void paintComponent(final Graphics g) {
140
        g.drawImage(this.bg, 0, 0, null);
141
        g.drawImage(this.bg, 0, 0, null);
141
        ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
142
        ((Graphics2D) g).setRenderingHint(RenderingHints.KEY_TEXT_ANTIALIASING, RenderingHints.VALUE_TEXT_ANTIALIAS_ON);
142
        try {
143
        try {
143
        	// Display caisse and Vendor ID
144
            // Display caisse and Vendor ID
144
        	String InfoCaisseVendeur = "Caisse "+POSConfiguration.getInstance().getPosID() + "  Vendeur " + POSConfiguration.getInstance().getUserID();
145
            String InfoCaisseVendeur = "Caisse " + this.controler.getPOSConf().getPosID() + "  Vendeur " + this.controler.getPOSConf().getUserID();
145
            g.setColor(new Color(230, 230, 230));
146
            g.setColor(new Color(230, 230, 230));
146
            g.setFont(getFont().deriveFont(28.0f));
147
            g.setFont(getFont().deriveFont(28.0f));
147
            g.drawString(InfoCaisseVendeur, 20, this.getHeight() - 50);
148
            g.drawString(InfoCaisseVendeur, 20, this.getHeight() - 50);
148
 
149
 
149
            g.setColor(Color.LIGHT_GRAY);
150
            g.setColor(Color.LIGHT_GRAY);