private void removeStyleData(Object key, NodeModel from, NodeModel which) {
if (!key.equals(LogicalStyleKeys.NODE_STYLE)) {
return;
}
final NodeStyleModel whichStyle = (NodeStyleModel) which.getExtension(NodeStyleModel.class);
if (whichStyle == null) {
return;
}
final NodeStyleModel fromStyle = (NodeStyleModel) from.getExtension(NodeStyleModel.class);
if (fromStyle == null) {
return;
}
if (null != whichStyle.isBold()) {
fromStyle.setBold(null);
}
if (null != whichStyle.isItalic()) {
fromStyle.setItalic(null);
}
if (null != whichStyle.getFontFamilyName()) {
fromStyle.setFontFamilyName(null);
}
if (null != whichStyle.getFontSize()) {
fromStyle.setFontSize(null);
}
if (null != whichStyle.getShape()) {
fromStyle.setShape(null);
}
if (null != whichStyle.getColor()) {
fromStyle.setColor(null);
}
if (null != whichStyle.getBackgroundColor()) {
fromStyle.setBackgroundColor(null);
}
if (null != whichStyle.getNodeFormat()) {
fromStyle.setNodeFormat(null);
}
if (null != whichStyle.getNodeNumbering()) {
fromStyle.setNodeNumbering(null);
}
}