Package org.freeplane.core.ui.components

Examples of org.freeplane.core.ui.components.IconSelectionPopupDialog


    final List<String> descriptions = new ArrayList<String>();
    for (final MindIcon icon : mIcons) {
      icons.add(icon);
      descriptions.add(icon.getTranslationValueLabel());
    }
    final IconSelectionPopupDialog dialog = new IconSelectionPopupDialog(JOptionPane
        .getFrameForComponent((Component) e.getSource()), icons);
    dialog.setLocationRelativeTo(JOptionPane.getFrameForComponent((Component) e.getSource()));
    dialog.setModal(true);
    dialog.setVisible(true);
    final int result = dialog.getResult();
    if (result >= 0) {
      final MindIcon icon = mIcons.get(result);
      setValue(icon.getName());
      firePropertyChangeEvent();
    }
View Full Code Here


    actions.add((IIconInformation) modeController.getAction("RemoveIcon_0_Action"));
    actions.add((IIconInformation) modeController.getAction("RemoveIconAction"));
    actions.add((IIconInformation) modeController.getAction("RemoveAllIconsAction"));

    final ViewController viewController = controller.getViewController();
    final IconSelectionPopupDialog selectionDialog = new IconSelectionPopupDialog(viewController.getJFrame(),
        actions);
    final NodeModel selected = controller.getSelection().getSelected();
    controller.getMapViewManager().scrollNodeToVisible(selected);
    selectionDialog.pack();
    UITools.setDialogLocationRelativeTo(selectionDialog, selected);
    selectionDialog.setModal(true);
    selectionDialog.show();
    final int result = selectionDialog.getResult();
    if (result >= 0) {
      final Action action = (Action) actions.get(result);
      action.actionPerformed(new ActionEvent(action, 0, NodeModel.NODE_ICON, selectionDialog.getModifiers()));
    }
  }
View Full Code Here

TOP

Related Classes of org.freeplane.core.ui.components.IconSelectionPopupDialog

Copyright © 2018 www.massapicom. 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.