Examples of LayoutModule


Examples of y.module.LayoutModule

     * Adds the layout chooser.
     */
    private void addLayoutChooser() {
        add(new JLabel("Layout: "));
        Map<String, LayoutModule> layoutModules = fPanel.getLayoutModules();
        LayoutModule selectedModule = fPanel.getGraph().getLayoutModule();

        JComboBox comboBox = new JComboBox(layoutModules.keySet().toArray());
        for (Map.Entry<String, LayoutModule> entry : layoutModules.entrySet()) {
            Class<? extends LayoutModule> type = entry.getValue().getClass();
            if (selectedModule.getClass() == type) {
                comboBox.setSelectedItem(entry.getKey());
            }
        }
        comboBox.addActionListener(new LayoutChangerAction(fPanel));

View Full Code Here

Examples of y.module.LayoutModule

    /**
     * {@inheritDoc}
     */
    public void actionPerformed(ActionEvent e) {
        LayoutModule layoutModule = fGraphPanel.getLayoutModules().get(((JComboBox) e
                .getSource()).getSelectedItem());

        fGraphPanel.getGraph().updateLayoutModule(layoutModule);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.