use of org.freeplane.features.styles.LogicalStyleController in project freeplane by freeplane.
the class MUIFactory method changeToolbar.
private void changeToolbar(final NodeModel node) {
final Controller controller = Controller.getCurrentController();
final MNodeStyleController styleController = (MNodeStyleController) controller.getModeController().getExtension(NodeStyleController.class);
selectFontSize(Integer.toString(styleController.getFontSize(node)));
selectFontName(styleController.getFontFamilyName(node));
final LogicalStyleController logicalStyleController = LogicalStyleController.getController();
ignoreChangeEvent = true;
styles.setSelectedItem(logicalStyleController.getFirstStyle(node));
ignoreChangeEvent = false;
}
use of org.freeplane.features.styles.LogicalStyleController in project freeplane by freeplane.
the class NodeStyleController method getBorderColorMatchesEdgeColor.
public Boolean getBorderColorMatchesEdgeColor(NodeModel node) {
final MapModel map = node.getMap();
final LogicalStyleController styleController = LogicalStyleController.getController(modeController);
final Collection<IStyle> style = styleController.getStyles(node);
final Boolean borderColorMatchesEdgeColor = getBorderColorMatchesEdgeColor(map, style);
return borderColorMatchesEdgeColor;
}
use of org.freeplane.features.styles.LogicalStyleController in project freeplane by freeplane.
the class NodeStyleController method getBorderColor.
public Color getBorderColor(NodeModel node) {
final MapModel map = node.getMap();
final LogicalStyleController styleController = LogicalStyleController.getController(modeController);
final Collection<IStyle> style = styleController.getStyles(node);
final Color borderColor = getBorderColor(map, style);
return borderColor;
}
use of org.freeplane.features.styles.LogicalStyleController in project freeplane by freeplane.
the class NodeStyleController method getBorderWidthMatchesEdgeWidth.
public Boolean getBorderWidthMatchesEdgeWidth(NodeModel node) {
final MapModel map = node.getMap();
final LogicalStyleController styleController = LogicalStyleController.getController(modeController);
final Collection<IStyle> style = styleController.getStyles(node);
final Boolean borderWidthMatchesEdgeWidth = getBorderWidthMatchesEdgeWidth(map, style);
return borderWidthMatchesEdgeWidth;
}
use of org.freeplane.features.styles.LogicalStyleController in project freeplane by freeplane.
the class StyleControlGroup method setStyle.
@Override
public void setStyle(NodeModel node) {
internalChange = true;
try {
final LogicalStyleController logicalStyleController = LogicalStyleController.getController();
if (addStyleBox) {
final boolean isStyleSet = LogicalStyleModel.getStyle(node) != null;
mSetStyle.setValue(isStyleSet);
setStyleList(mMapStyleButton, logicalStyleController.getMapStyleNames(node, "\n"));
}
setStyleList(mNodeStyleButton, logicalStyleController.getNodeStyleNames(node, "\n"));
if (mAutomaticLayoutComboBox != null) {
final ModeController modeController = Controller.getCurrentModeController();
AutomaticLayoutController al = modeController.getExtension(AutomaticLayoutController.class);
IExtension extension = al.getExtension(node);
if (extension == null)
mAutomaticLayoutComboBox.setSelectedItem(AUTOMATIC_LAYOUT_DISABLED);
else
mAutomaticLayoutComboBox.setSelectedIndex(((AutomaticLayout) extension).ordinal());
}
if (mAutomaticEdgeColorComboBox != null) {
final ModeController modeController = Controller.getCurrentModeController();
AutomaticEdgeColorHook al = (AutomaticEdgeColorHook) modeController.getExtension(AutomaticEdgeColorHook.class);
final AutomaticEdgeColor extension = (AutomaticEdgeColor) al.getExtension(node);
if (extension == null) {
mAutomaticEdgeColorComboBox.setSelectedItem(AUTOMATIC_LAYOUT_DISABLED);
mEditEdgeColorsBtn.setEnabled(false);
} else {
mAutomaticEdgeColorComboBox.setSelectedIndex(extension.rule.ordinal());
mEditEdgeColorsBtn.setEnabled(true);
}
}
} finally {
internalChange = false;
}
}
Aggregations