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();
}
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);
}
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);
}
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);
}
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);
}
Aggregations