Package org.jdesktop.swingx.decorator

Examples of org.jdesktop.swingx.decorator.PatternHighlighter


                HighlighterPipeline highlighters = new HighlighterPipeline();
                highlighters.addHighlighter(new AlternateRowHighlighter());
                highlighters.addHighlighter(new RolloverHighlighter(Color.BLACK, Color.WHITE));
               
                if (getCurrentObject().getClsId() == 160) {//for currency object                
                    PatternHighlighter pattern = new PatternHighlighter();
                    int columnIndex = -1;
                    for (int i = 0; i < objectTable.getColumnCount(false); i++) {
                        TableColumnExt tce = objectTable.getColumnExt(i);
                        String ccTitle = ObjectUtil.findColumnTxt(160, "C", "C");
                        if (ccTitle.equals(tce.getTitle())) {
                            columnIndex = i;
                            break;
                        }
                    }
                    if (columnIndex != -1) {
                        String lc = CurrencyPlugin.getInstance().getLc();
                        String regularExpr = lc;          
                        pattern.setPattern(regularExpr, columnIndex);
                        pattern.setBackground(Color.BLUE);
                        pattern.setForeground(Color.WHITE);
                        highlighters.addHighlighter(pattern);
                    }                   
                } else if (getCurrentObject().getClsId() == 140) {//for ruser object
                    PatternHighlighter pattern = new PatternHighlighter();
                    int columnIndex = -1;
                    for (int i = 0; i < objectTable.getColumnCount(false); i++) {
                        TableColumnExt tce = objectTable.getColumnExt(i);
                        String ccTitle = ObjectUtil.findColumnTxt(140, "RUSER", "RUSER");
                        if (ccTitle.equals(tce.getTitle())) {
                            columnIndex = i;
                            break;
                        }
                    }
                    if (columnIndex != -1) {                       
                        String regularExpr = GlobalValueManager.getValue("SESSION.LOGINUSER");          
                        pattern.setPattern(regularExpr, columnIndex);
                        pattern.setBackground(Color.BLUE);
                        pattern.setForeground(Color.WHITE);
                        highlighters.addHighlighter(pattern);
                    }                                       
                } else if (getCurrentObject().getClsId() == 120) {//for at object
                    PatternHighlighter pattern = new PatternHighlighter();
                    int columnIndex = -1;
                    for (int i = 0; i < objectTable.getColumnCount(false); i++) {
                        TableColumnExt tce = objectTable.getColumnExt(i);
                        String ccTitle = ObjectUtil.findColumnTxt(120, "AT", "AT");
                        if (ccTitle.equals(tce.getTitle())) {
                            columnIndex = i;
                            break;
                        }
                    }
                    if (columnIndex != -1) {                       
                        String regularExpr = GlobalValueManager.getValue("APPLICATION.AT");          
                        pattern.setPattern(regularExpr, columnIndex);
                        pattern.setBackground(Color.BLUE);
                        pattern.setForeground(Color.WHITE);
                        highlighters.addHighlighter(pattern);
                    }
                }
                objectTable.setHighlighters(highlighters);
               
View Full Code Here

TOP

Related Classes of org.jdesktop.swingx.decorator.PatternHighlighter

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.