Search in sources :

Example 6 with ComboProperty

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

the class StyleEditorPanel method addFontSizeControl.

private void addFontSizeControl(final List<IPropertyControl> controls) {
    mSetNodeFontSize = new BooleanProperty(StyleEditorPanel.SET_RESOURCE);
    controls.add(mSetNodeFontSize);
    final List<String> sizesVector = new ArrayList<String>(Arrays.asList(MUIFactory.FONT_SIZES));
    mNodeFontSize = new ComboProperty(StyleEditorPanel.NODE_FONT_SIZE, sizesVector, sizesVector);
    mNodeFontSize.setEditable(true);
    controls.add(mNodeFontSize);
    final FontSizeChangeListener listener = new FontSizeChangeListener(mSetNodeFontSize, mNodeFontSize);
    mSetNodeFontSize.addPropertyChangeListener(listener);
    mNodeFontSize.addPropertyChangeListener(listener);
    mNodeFontSize.fireOnMouseClick();
}
Also used : ComboProperty(org.freeplane.core.resources.components.ComboProperty) BooleanProperty(org.freeplane.core.resources.components.BooleanProperty) ArrayList(java.util.ArrayList)

Example 7 with ComboProperty

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

the class StyleEditorPanel method addCloudShapeControl.

private void addCloudShapeControl(final List<IPropertyControl> controls) {
    mCloudShape = new ComboProperty(StyleEditorPanel.CLOUD_SHAPE, CLOUD_SHAPES);
    controls.add(mCloudShape);
    final CloudShapeChangeListener listener = new CloudShapeChangeListener(mSetCloud, mCloudShape);
    mSetCloud.addPropertyChangeListener(listener);
    mCloudShape.addPropertyChangeListener(listener);
    mCloudShape.fireOnMouseClick();
}
Also used : ComboProperty(org.freeplane.core.resources.components.ComboProperty)

Example 8 with ComboProperty

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

the class StyleEditorPanel method addNodeShapeControl.

private void addNodeShapeControl(final List<IPropertyControl> controls) {
    mSetNodeShape = new BooleanProperty(StyleEditorPanel.SET_RESOURCE);
    controls.add(mSetNodeShape);
    mNodeShape = new ComboProperty(StyleEditorPanel.NODE_SHAPE, new String[] { "fork", "bubble", "as_parent", "combined" });
    controls.add(mNodeShape);
    final NodeShapeChangeListener listener = new NodeShapeChangeListener(mSetNodeShape, mNodeShape);
    mSetNodeShape.addPropertyChangeListener(listener);
    mNodeShape.addPropertyChangeListener(listener);
    mNodeShape.fireOnMouseClick();
}
Also used : ComboProperty(org.freeplane.core.resources.components.ComboProperty) BooleanProperty(org.freeplane.core.resources.components.BooleanProperty)

Example 9 with ComboProperty

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

the class MModeWorkspaceLinkController method prepareOptionPanelBuilder.

public void prepareOptionPanelBuilder(OptionPanelBuilder builder) {
    IndexedTree.Node node = (IndexedTree.Node) builder.getRoot();
    String path = "Environment/hyperlink_types/links";
    final IndexedTree.Node found = getNodeForPath(path, node);
    if (found != null) {
        found.setUserObject(new IPropertyControlCreator() {

            private final IPropertyControlCreator creator = (IPropertyControlCreator) found.getUserObject();

            public IPropertyControl createControl() {
                ComboProperty property = (ComboProperty) creator.createControl();
                List<String> list = property.getPossibleValues();
                list.add(MModeWorkspaceLinkController.LINK_RELATIVE_TO_PROJECT_PROPERTY);
                return new ComboProperty("links", list.toArray(new String[] {}));
            }
        });
    }
}
Also used : ComboProperty(org.freeplane.core.resources.components.ComboProperty) IPropertyControlCreator(org.freeplane.core.resources.components.IPropertyControlCreator) IndexedTree(org.freeplane.core.ui.IndexedTree) List(java.util.List) IPropertyControl(org.freeplane.core.resources.components.IPropertyControl)

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