Decorators and Filtering

  • strubby

    strubby - 2013-09-25

    Hello Björn,
    Your are rellay a good helper when encountering prefuse-oriented problem.
    These days I come with another problem about decorators and filtering. I use decorators for edge labelling, the main code is as follows:

        private static final String EDGE_DECORATORS = "edge_decorators";
        public static Schema DECORATOR_SCHEMA = PrefuseLib.getVisualItemSchema();
        static { 
        DECORATOR_SCHEMA.setDefault(VisualItem.INTERACTIVE, false); 
        DECORATOR_SCHEMA.setDefault(VisualItem.TEXTCOLOR, ColorLib.rgb(0, 0, 0)); 
        DECORATOR_SCHEMA.setDefault(VisualItem.FONT, FontLib.getFont("Sanserif",10)); //Tahoma
        DefaultRendererFactory dr = new DefaultRendererFactory(tr);
        dr.add(new InGroupPredicate(EDGE_DECORATORS),  er);
        m_vis.addDecorators(EDGE_DECORATORS, edges, DECORATOR_SCHEMA);
        animate.add(new LabelLayout(EDGE_DECORATORS));
        The above code is also delivered by you in somewhere. I user GraphDistanceFilter in my GraphView demo for filtering, but i find when some edge items are invisible(they have been filtered), there edge label is still in the display. I do not know how to slove this problem .I appreciate for your help. Thank you.
        I can deliver my codes if possible. 
    Last edit: strubby 2013-09-25
  • Björn Kruse

    Björn Kruse - 2013-10-01


    usually the decorator inherits the visibility of its decorated item. When the visibility changes, maybe the action/actionlist that draws the decorator is just not re-run?

    I hope this late answer is still helpful...

    best regards,


Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:

No, thanks