Package org.freeplane.core.util.collection

Examples of org.freeplane.core.util.collection.SortedComboBoxModel


    }
    final MapModel map = Controller.getCurrentModeController().getController().getMap();
    final AttributeRegistry registry = AttributeRegistry.getRegistry(map);
    final int iOld = registry.getElements().indexOf(oldName);
    final AttributeRegistryElement oldElement = registry.getElement(iOld);
    final SortedComboBoxModel values = oldElement.getValues();
    final IActor registryActor = new RegistryAttributeActor(newName, oldElement.isManual(), oldElement.isVisible(),
        registry, map);
    Controller.getCurrentModeController().execute(registryActor, map);
    final AttributeRegistryElement newElement = registry.getElement(newName);
    for (int i = 0; i < values.getSize(); i++) {
      final IActor registryValueActor = new RegistryAttributeValueActor(newElement, values.getElementAt(i)
          .toString(), false);
      Controller.getCurrentModeController().execute(registryValueActor, map);
    }
    final IVisitor replacer = new AttributeRenamer(oldName, newName);
    final Iterator iterator = new Iterator(replacer);
View Full Code Here


  public boolean exist(final String attributeName, final Object element) {
    final int index = indexOf(attributeName);
    if (index == -1) {
      return false;
    }
    final SortedComboBoxModel values = getElement(index).getValues();
    for (int i = 0; i < values.getSize(); i++) {
      if (element.equals(values.getElementAt(i))) {
        return true;
      }
    }
    return false;
  }
View Full Code Here

  }

  private void createValueSubTrees(final DefaultMutableTreeNode attributeInfo,
                                   final AttributeRegistryElement element, final AttributeRegistry currentAttributes) {
    final String attributeName = element.getKey().toString();
    final SortedComboBoxModel values = element.getValues();
    for (int i = 0; i < values.getSize(); i++) {
      final Object nextElement = values.getElementAt(i);
      if (!currentAttributes.exist(attributeName, nextElement)) {
        final TreeNodeInfo treeNodeInfo = new TreeNodeInfo(nextElement.toString());
        final DefaultMutableTreeNode valueInfo = new DefaultMutableTreeNode(treeNodeInfo);
        attributeInfo.add(valueInfo);
      }
View Full Code Here

public class IconRegistry implements IExtension {
  final private SortedComboBoxModel mapIcons;

  public IconRegistry(final MapController mapController, final MapModel map) {
    super();
    mapIcons = new SortedComboBoxModel();
    final NodeModel rootNode = map.getRootNode();
    if(rootNode != null)
      registryNodeIcons(mapController, rootNode);
  }
View Full Code Here

    }
  }

  public void addIcons(final MapModel map) {
    final IconRegistry newRegistry = map.getIconRegistry();
    final SortedComboBoxModel newMapIcons = newRegistry.mapIcons;
    for (final Object uiIcon : newMapIcons) {
      mapIcons.add(uiIcon);
    }
  }
View Full Code Here

  public ComboBoxModel getValuesForProperty(final Object selectedItem, NamedObject simpleCond) {
    final MapModel map = Controller.getCurrentController().getMap();
    final AttributeRegistry registry = AttributeRegistry.getRegistry(map);
    try {
            final AttributeRegistryElement element = registry.getElement(selectedItem.toString());
            final SortedComboBoxModel list = element.getValues();
            SortedComboBoxModel linkedList = new SortedComboBoxModel();
            for(int i = 0; i < list.getSize();i++){
              final Object value = list.getElementAt(i);
              final Object transformedValue = new LinkTransformer(Controller.getCurrentModeController(), 1).transformContent(value, map);
              linkedList.add(transformedValue);
            }
            values.setExtensionList(linkedList);
        }
        catch (NoSuchElementException e) {
            values.setExtensionList(null);
View Full Code Here

TOP

Related Classes of org.freeplane.core.util.collection.SortedComboBoxModel

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.