Search in sources :

Example 1 with XJRollOverButtonToggle

use of org.antlr.xjlib.appkit.swing.XJRollOverButtonToggle in project antlrworks by antlr.

the class GPanel method createShowCrossLinksButton.

private JToggleButton createShowCrossLinksButton() {
    XJRollOverButtonToggle button = XJRollOverButtonToggle.createMediumButton(IconManager.shared().getIconShowLinks());
    button.setSelected(true);
    button.setFocusable(false);
    button.setToolTipText("Show links between rules");
    button.addActionListener(new ActionListener() {

        public void actionPerformed(ActionEvent event) {
            for (Object o : view.getGraphs()) {
                GGraphGroup gg = (GGraphGroup) o;
                gg.getPathGroup().toggleShowRuleLinks();
            }
            view.cacheRerender();
            view.repaint();
        }
    });
    return button;
}
Also used : XJRollOverButtonToggle(org.antlr.xjlib.appkit.swing.XJRollOverButtonToggle) ActionListener(java.awt.event.ActionListener) ActionEvent(java.awt.event.ActionEvent) GGraphGroup(org.antlr.works.visualization.graphics.graph.GGraphGroup)

Aggregations

ActionEvent (java.awt.event.ActionEvent)1 ActionListener (java.awt.event.ActionListener)1 GGraphGroup (org.antlr.works.visualization.graphics.graph.GGraphGroup)1 XJRollOverButtonToggle (org.antlr.xjlib.appkit.swing.XJRollOverButtonToggle)1