![]() |
ViewsOpenFlow GUI Extension - DisplayFrom OpenFlow WikiThe OpenFlow GUI provides default implementations to render common objects like switches, hosts, and links. How these objects are rendered can be changed. You can also display arbitrary graphics of your own choosing, including sophisticated elements like charts.
Adding Custom GraphicsYou can add your own
Custom Topology Element Graphics (Switches, etc.)You can access Custom Node GraphicsUsing this approach you can easily change the graphic used to represent each node: /** Adds the drawable as usual and then sets a custom switch graphic for some switch */
public void addDrawable(Drawable d) {
super.addDrawable(d);
// TODO: any custom processing when a Drawable is added
// example of drawing a particular switch specially
if(d instanceof OpenFlowSwitch) {
OpenFlowSwitch s = (OpenFlowSwitch)d;
if(s.getID() == 0x00ABCD00) {
s.setIcon(new ImageIcon("dgu.gif", 25, 25));
}
}
}
This code uses a special image to represent an Completely Custom DrawingAnother approach to modifying how objects are drawn is to change the implementation of the
ChartsCharts can provide a wealth of information and they are so frequently needed that the OpenFlow GUI makes it easy to create them with the JFreeChart library which is included. In addition to the many styles of graphs provided by that library, some extensions to it are provided in the org.openflow.gui.chart package (notably a helper class for creating multi-pointer dial charts). |
Quick NavigationOpenFlow White PaperOpenFlow Demo Video![]() Watch the Demo that received the best demo award at SIGCOMM 2008. About OpenFlow OpenFlow is supported bythe Stanford Clean Slate Program. Wiki ToolsPersonal toolsProjects |