animate = !animate;
animateMenuItem.setState(animate);
VisualGraph.config.setProperty(CONF_STYLE_ANIMATE, new Boolean(animate).toString());
}
});
this.param.userInterface.addMenuItem(new AMenuItem(animateMenuItem) {
public void update(Observable o, Object arg) {
}
}, "Edit");
JMenuItem changeLayoutMenuItem = new JMenuItem("Change layout");
changeLayoutMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
lm.updateLayouts(GraphLayoutManager.this.getInstalledLayouts(),
GraphLayoutManager.this.defaultLayout);
lm.setVisible(true);
}
});
this.param.userInterface.addMenuItem(new AMenuItem(changeLayoutMenuItem) {
public void update(Observable o, Object arg) {
}
}, "Edit");
JMenuItem executeLayoutMenuItem = new JMenuItem("Execute layout");
executeLayoutMenuItem.addActionListener(new ActionListener() {
public void actionPerformed(ActionEvent e) {
GraphLayoutManager.this.executeLayout();
}
});
executeLayoutMenuItem.setAccelerator(KeyStroke.getKeyStroke(KeyEvent.VK_X, KeyEvent.ALT_DOWN_MASK));
//---------------------------------------
this.param.userInterface.addMenuItem(new AMenuItem(executeLayoutMenuItem) {
public void update(Observable o, Object arg) {
changeView(arg);
}
}, "edit");
}