Package org.jdesktop.swingx.decorator

Examples of org.jdesktop.swingx.decorator.PainterHighlighter


                return ((CalendarAdapter) adapter).isUnselectable();
            }
           
        };
        textCross.setForeground(unselectableDayForeground);
        Highlighter painterHL = new PainterHighlighter(unselectable, textCross);
        highlighter.addHighlighter(painterHL);
       
    }
View Full Code Here


        return model;
    }

    private Highlighter createExtendedRolloverDecoration() {
        Color color = ColorUtil.setAlpha(Color.YELLOW, 100);
        final PainterHighlighter hl = new PainterHighlighter(HighlightPredicate.NEVER,
                new MattePainter(color));
        // <snip> JXList rollover support
        // listen to changes of cell-rollover property
        // and set a Highlighters custom predicate accordingly
        PropertyChangeListener l = new PropertyChangeListener() {

            @Override
            public void propertyChange(PropertyChangeEvent evt) {
                Point location = (Point) evt.getNewValue();
                int row = -1;
                if (location != null) {
                    row = location.y;
                }
                hl.setHighlightPredicate(new MeritRangeHighlightPredicate(
                        row < 0 ? null : list.getElementAt(row)));
            }
           
        };
        list.addPropertyChangeListener(RolloverProducer.ROLLOVER_KEY, l);
View Full Code Here

                new ColorBlendHighlighter(new Color(0, 180, 0, 80), null)));
        info.add(new HighlighterInfo("Green Orb Icon",
                new IconHighlighter(Application.getInstance().getContext()
                        .getResourceMap(HighlighterDemo.class).getIcon("greenOrb"))));
        info.add(new HighlighterInfo("Aerith Gradient Painter",
                new PainterHighlighter(new MattePainter(PaintUtils.AERITH, true))));
        info.add(new HighlighterInfo("Star Shape Painter",
                new PainterHighlighter(new ShapePainter(
                        ShapeUtils.generatePolygon(5, 10, 5, true), PaintUtils.NIGHT_GRAY_LIGHT))));
        info.add(new HighlighterInfo("10pt. Bold Dialog Font",
                new FontHighlighter(new Font("Dialog", Font.BOLD, 10))));
        info.add(new HighlighterInfo("Italic Font",
                new DerivedFontHighlighter(Font.ITALIC)));
View Full Code Here

TOP

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

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.