GraphStream Users

Archives de la liste Aide


Chronologique Discussions 
  • From: <mahmoudmubarak AT>
  • To: graphstream-users AT
  • Subject: view.getCamera().isVisible(GraphicElement)
  • Date: Tue, 23 Feb 2016 15:18:56 +0100 (CET)

I've defined my objects like that:

Graph graph = new SingleGraph("CLA");
Viewer CLAgraphViewer = new Viewer(graph,
View view = CLAgraphViewer.addDefaultView(true);
Node a = graph.addNode("a");
Node b = graph.addNode("b");
and so on.

After doing lots of zooming and setting new center with
view.getCamera().setViewPercent, and view.getCamera().setViewCenter
respectively, I've tried to check if a specific node is in the view so I want
to do something like that:


But, it seems that I should pass GraphicElement variable to isVisible() to
work. I've tried to cast Node to GraphicELement, but error appeared in
"org.graphstream.graph.implementations.SingleNode cannot be cast to

So, how should I get a GraphicElement from Node?

Thank you in advance.

  • view.getCamera().isVisible(GraphicElement), mahmoudmubarak, 23/02/2016

Archives gérées par MHonArc 2.6.16.

Top of page