Search in sources :

Example 1 with ComboProperty

use of org.freeplane.core.resources.components.ComboProperty in project freeplane by freeplane.

the class StyleEditorPanel method addEdgeStyleControl.

private void addEdgeStyleControl(final List<IPropertyControl> controls) {
    mSetEdgeStyle = new BooleanProperty(StyleEditorPanel.SET_RESOURCE);
    controls.add(mSetEdgeStyle);
    mEdgeStyle = new ComboProperty(StyleEditorPanel.EDGE_STYLE, EDGE_STYLES);
    controls.add(mEdgeStyle);
    final EdgeStyleChangeListener listener = new EdgeStyleChangeListener(mSetEdgeStyle, mEdgeStyle);
    mSetEdgeStyle.addPropertyChangeListener(listener);
    mEdgeStyle.addPropertyChangeListener(listener);
    mEdgeStyle.fireOnMouseClick();
}
Also used : ComboProperty(org.freeplane.core.resources.components.ComboProperty) BooleanProperty(org.freeplane.core.resources.components.BooleanProperty)

Example 2 with ComboProperty

use of org.freeplane.core.resources.components.ComboProperty in project freeplane by freeplane.

the class EdgeStyleControlGroup method addControlGroup.

@Override
public void addControlGroup(DefaultFormBuilder formBuilder) {
    mSetEdgeStyle = new BooleanProperty(ControlGroup.SET_RESOURCE);
    mEdgeStyle = new ComboProperty(EDGE_STYLE, EDGE_STYLES);
    propertyChangeListener = new EdgeStyleChangeListener(mSetEdgeStyle, mEdgeStyle);
    mSetEdgeStyle.addPropertyChangeListener(propertyChangeListener);
    mEdgeStyle.addPropertyChangeListener(propertyChangeListener);
    mSetEdgeStyle.layout(formBuilder);
    mEdgeStyle.layout(formBuilder);
}
Also used : ComboProperty(org.freeplane.core.resources.components.ComboProperty) BooleanProperty(org.freeplane.core.resources.components.BooleanProperty)

Example 3 with ComboProperty

use of org.freeplane.core.resources.components.ComboProperty in project freeplane by freeplane.

the class NodeHorizontalTextAlignmentControlGroup method addControlGroup.

public void addControlGroup(DefaultFormBuilder formBuilder) {
    mSetNodeTextAlignment = new BooleanProperty(ControlGroup.SET_RESOURCE);
    final Vector<String> possibleTranslations = new Vector<String>(TEXT_ALIGNMENTS.length);
    for (int i = 0; i < TEXT_ALIGNMENTS.length; i++) {
        possibleTranslations.add(TextUtils.getText("TextAlignAction." + TEXT_ALIGNMENTS[i] + ".text"));
    }
    Vector<String> translations = possibleTranslations;
    mNodeTextAlignment = new ComboProperty(TEXT_ALIGNMENT, Arrays.asList(TEXT_ALIGNMENTS), translations);
    propertyChangeListener = new NodeTextAlignmentChangeListener(mSetNodeTextAlignment, mNodeTextAlignment);
    mSetNodeTextAlignment.addPropertyChangeListener(propertyChangeListener);
    mNodeTextAlignment.addPropertyChangeListener(propertyChangeListener);
    mSetNodeTextAlignment.layout(formBuilder);
    mNodeTextAlignment.layout(formBuilder);
}
Also used : ComboProperty(org.freeplane.core.resources.components.ComboProperty) BooleanProperty(org.freeplane.core.resources.components.BooleanProperty) Vector(java.util.Vector)

Example 4 with ComboProperty

use of org.freeplane.core.resources.components.ComboProperty in project freeplane by freeplane.

the class FontSizeControlGroup method addControlGroup.

@Override
public void addControlGroup(DefaultFormBuilder formBuilder) {
    mSetNodeFontSize = new BooleanProperty(ControlGroup.SET_RESOURCE);
    final List<String> sizesVector = new ArrayList<String>(Arrays.asList(MUIFactory.FONT_SIZES));
    mNodeFontSize = new ComboProperty(NODE_FONT_SIZE, sizesVector, sizesVector);
    mNodeFontSize.setEditable(true);
    propertyChangeListener = new FontSizeChangeListener(mSetNodeFontSize, mNodeFontSize);
    mSetNodeFontSize.addPropertyChangeListener(propertyChangeListener);
    mNodeFontSize.addPropertyChangeListener(propertyChangeListener);
    mSetNodeFontSize.layout(formBuilder);
    mNodeFontSize.layout(formBuilder);
}
Also used : ComboProperty(org.freeplane.core.resources.components.ComboProperty) BooleanProperty(org.freeplane.core.resources.components.BooleanProperty) ArrayList(java.util.ArrayList)

Example 5 with ComboProperty

use of org.freeplane.core.resources.components.ComboProperty in project freeplane by freeplane.

the class MFileManager method createPreferences.

private void createPreferences() {
    final MModeController modeController = (MModeController) Controller.getCurrentModeController();
    final OptionPanelBuilder optionPanelBuilder = modeController.getOptionPanelBuilder();
    optionPanelBuilder.addCreator("Environment/load", new IPropertyControlCreator() {

        public IPropertyControl createControl() {
            final Set<String> charsets = Charset.availableCharsets().keySet();
            final LinkedList<String> charsetList = new LinkedList<String>(charsets);
            charsetList.addFirst("JVMdefault");
            final LinkedList<String> charsetTranslationList = new LinkedList<String>(charsets);
            charsetTranslationList.addFirst(TextUtils.getText("OptionPanel.default"));
            return new ComboProperty("default_charset", charsetList, charsetTranslationList);
        }
    }, IndexedTree.AS_CHILD);
}
Also used : ComboProperty(org.freeplane.core.resources.components.ComboProperty) IPropertyControlCreator(org.freeplane.core.resources.components.IPropertyControlCreator) Set(java.util.Set) OptionPanelBuilder(org.freeplane.core.resources.components.OptionPanelBuilder) IPropertyControl(org.freeplane.core.resources.components.IPropertyControl) LinkedList(java.util.LinkedList) MModeController(org.freeplane.features.mode.mindmapmode.MModeController)

Aggregations

ComboProperty (org.freeplane.core.resources.components.ComboProperty)9 BooleanProperty (org.freeplane.core.resources.components.BooleanProperty)6 ArrayList (java.util.ArrayList)2 IPropertyControl (org.freeplane.core.resources.components.IPropertyControl)2 IPropertyControlCreator (org.freeplane.core.resources.components.IPropertyControlCreator)2 LinkedList (java.util.LinkedList)1 List (java.util.List)1 Set (java.util.Set)1 Vector (java.util.Vector)1 OptionPanelBuilder (org.freeplane.core.resources.components.OptionPanelBuilder)1 IndexedTree (org.freeplane.core.ui.IndexedTree)1 MModeController (org.freeplane.features.mode.mindmapmode.MModeController)1