Package org.freeplane.core.resources

Examples of org.freeplane.core.resources.NamedObject


    add(periodComponent);
    add(periodUnitBox);
  }
 
  PeriodUnit getPeriodUnit(){
    final NamedObject selectedItem = (NamedObject)periodUnitBox.getSelectedItem();
    final PeriodUnit period = (PeriodUnit)selectedItem.getObject();
    return period;
  }
View Full Code Here


    editorSelector = new JComboBox();
    editorSelector.setEditable(false);
    editorSelector.setRenderer(NamedObject.getIconRenderer());
    editorSelector.addActionListener(new ActionListener() {
      public void actionPerformed(ActionEvent e) {
        final NamedObject key = (NamedObject) editorSelector.getSelectedItem();
        editor = editors.get(key);
        final CardLayout layout = (CardLayout) editorPanel.getLayout();       
        layout.show(editorPanel,  key.getObject().toString());
        editor.getEditorComponent().requestFocusInWindow();
          final ActionEvent actionEvent = new ActionEvent(editor, 0, null);
          for (final ActionListener l : actionListeners) {
            l.actionPerformed(actionEvent);
          }
View Full Code Here

    }
    for(Entry<NamedObject, ComboBoxEditor> editorEntry: editors.entrySet()){
      final ComboBoxEditor editor = editorEntry.getValue();
      editor.setItem(anObject);
      final Object item = editor.getItem();
      NamedObject key = editorEntry.getKey();
      if(anObject.equals(item) && ! key.equals(editorSelector.getSelectedItem())){
        editorSelector.setSelectedItem(key);
        return;
      }
    }
  }
View Full Code Here

      return null;
    final int depth = node.depth();
    final MapModel map = node.getMap();
    final MapStyleModel extension = MapStyleModel.getExtension(map);
    final String name = depth == 0 ? "AutomaticLayout.level.root" : "AutomaticLayout.level," + depth;
    final NamedObject obj = NamedObject.format(name);
    final IStyle style = StyleFactory.create(obj);
    if (extension.getStyleNode(style) != null) {
      return style;
    }
    return null;
View Full Code Here

  public boolean canHandle(final Object selectedItem) {
    if (!(selectedItem instanceof NamedObject)) {
      return false;
    }
    final NamedObject namedObject = (NamedObject) selectedItem;
    return namedObject.objectEquals(LogicalStyleFilterController.FILTER_STYLE);
  }
View Full Code Here

    }

  public StyleNamedObject(String string) {
    if(string == null)
      throw new NullPointerException();
    namedObject = new NamedObject(string);
    }
View Full Code Here

  private void setValuesEditor() {
    final Object selectedProperty = filteredPropertiesComponent.getSelectedItem();
    final IElementaryConditionController conditionController = filterController.getConditionFactory()
        .getConditionController(selectedProperty);
    final NamedObject selectedCondition = (NamedObject) elementaryConditions.getSelectedItem();
    final boolean canSelectValues = conditionController
        .canSelectValues(selectedProperty, selectedCondition);
    values.setEnabled(canSelectValues);
    values.setEditable(false);
    values.setModel(conditionController.getValuesForProperty(selectedProperty, selectedCondition));
View Full Code Here

      value = values.getSelectedItem();
    }
    if (value == null) {
      value = "";
    }
    final NamedObject simpleCond = (NamedObject) elementaryConditions.getSelectedItem();
    final boolean matchCase = caseSensitive.isSelected();
    final boolean matchApproximately = approximateMatching.isSelected();
    ResourceController.getResourceController().setProperty(PROPERTY_FILTER_MATCH_CASE, matchCase);
    final Object selectedItem = filteredPropertiesComponent.getSelectedItem();
    newCond = filterController.getConditionFactory().createCondition(selectedItem, simpleCond, value, matchCase, matchApproximately);
View Full Code Here

        public void actionPerformed(ActionEvent e) {
          if(internalChange)
            return;
          final ModeController modeController = Controller.getCurrentModeController();
          AutomaticLayoutController al = modeController.getExtension(AutomaticLayoutController.class);
          NamedObject selectedItem = (NamedObject)mAutomaticLayoutComboBox.getSelectedItem();
          al.undoableDeactivateHook(Controller.getCurrentController().getMap().getRootNode());
          if(!selectedItem.equals(AUTOMATIC_LAYOUT_DISABLED)){
            al.undoableActivateHook(Controller.getCurrentController().getMap().getRootNode(), (AutomaticLayout) selectedItem.getObject());
          }
        }
      });
    }
      final String label = TextUtils.getText("AutomaticLayoutAction.text");
View Full Code Here

  public boolean canHandle(final Object selectedItem) {
    if (!(selectedItem instanceof NamedObject)) {
      return false;
    }
    final NamedObject namedObject = (NamedObject) selectedItem;
    return namedObject.objectEquals(FILTER_LINK) || namedObject.objectEquals(CONNECTOR_LABEL)
            || namedObject.objectEquals(CONNECTOR);
  }
View Full Code Here

TOP

Related Classes of org.freeplane.core.resources.NamedObject

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.