Package org.jdesktop.swingx.painter

Examples of org.jdesktop.swingx.painter.ShapePainter


                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


    private MutableTreeNode createShapePainterDemos() {
        DefaultMutableTreeNode node = createInfoNode("Shape Painter Demos", null);
       
        // build a star shape with 5 points and 30 degree angles
        Shape starShape = ShapeUtils.generatePolygon(5,30,15,true);
        ShapePainter sp = new ShapePainter(starShape, Color.RED);
        node.add(createInfoNode("Star style", sp));
       
        return node;
    }
View Full Code Here

        tp.setAreaEffects(effect);
        cp = new CompoundPainter<Object>(mp, tp);
        node.add(createInfoNode("A Cool Logo", cp));
       
        mp = new MattePainter(Color.GRAY);
        ShapePainter sp = new ShapePainter(
                ShapeUtils.generatePolygon(30, 50, 45, true), Color.RED);
        sp.setStyle(ShapePainter.Style.FILLED);
        sp.setBorderPaint(Color.BLUE);
        ShadowPathEffect starShadow = new ShadowPathEffect();
        starShadow.setOffset(new Point(1,1));
        starShadow.setEffectWidth(5);
        sp.setAreaEffects(starShadow);
        tp = new TextPainter("Coming Soon!", new Font("SansSerif", Font.PLAIN, 12), Color.WHITE);
        cp = new CompoundPainter<Object>(mp, sp, tp);
        node.add(createInfoNode("Coming Soon badge", cp));

        return node;
View Full Code Here

TOP

Related Classes of org.jdesktop.swingx.painter.ShapePainter

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.