use of org.freeplane.features.attribute.NodeAttributeTableModel in project freeplane by freeplane.
the class AttributesProxy method set.
public void set(final int index, final Object value) {
final NodeAttributeTableModel attributeTableModel = getAndCheckNodeAttributeTableModelForIndex(index, "set1:");
String oldPattern = getOldValueFormatPattern(attributeTableModel, index);
getAttributeController().performSetValueAt(attributeTableModel, ProxyUtils.transformObject(value, oldPattern), index, 1);
}
use of org.freeplane.features.attribute.NodeAttributeTableModel in project freeplane by freeplane.
the class AttributesProxy method setFormat.
public void setFormat(final int index, String pattern) {
final NodeAttributeTableModel attributeTableModel = getAndCheckNodeAttributeTableModelForIndex(index, "set1:");
final Object value = attributeTableModel.getAttribute(index).getValue();
getAttributeController().performSetValueAt(attributeTableModel, ProxyUtils.transformObject(value, pattern), index, 1);
}
use of org.freeplane.features.attribute.NodeAttributeTableModel in project freeplane by freeplane.
the class MAttributeController method addAttribute.
public int addAttribute(final NodeModel node, final Attribute pAttribute) {
createAttributeTableModel(node);
final NodeAttributeTableModel attributes = NodeAttributeTableModel.getModel(node);
final int rowCount = attributes.getRowCount();
performInsertRow(attributes, rowCount, pAttribute.getName(), pAttribute.getValue());
return rowCount;
}
use of org.freeplane.features.attribute.NodeAttributeTableModel in project freeplane by freeplane.
the class MAttributeController method performRegistrySubtreeAttributes.
@Override
public void performRegistrySubtreeAttributes(final NodeModel node) {
final NodeAttributeTableModel nodeAttributeTableModel = NodeAttributeTableModel.getModel(node);
for (int i = 0; i < nodeAttributeTableModel.getRowCount(); i++) {
final String name = nodeAttributeTableModel.getValueAt(i, 0).toString();
final String value = nodeAttributeTableModel.getValueAt(i, 1).toString();
performRegistryAttributeValue(name, value, false);
}
for (final NodeModel child : Controller.getCurrentModeController().getMapController().childrenUnfolded(node)) {
performRegistrySubtreeAttributes(child);
}
}
use of org.freeplane.features.attribute.NodeAttributeTableModel in project freeplane by freeplane.
the class MAttributeController method setAttribute.
public void setAttribute(final NodeModel pNode, final int pPosition, final Attribute pAttribute) {
createAttributeTableModel(pNode);
final NodeAttributeTableModel model = NodeAttributeTableModel.getModel(pNode);
performSetValueAt(model, pAttribute.getName(), pPosition, 0);
performSetValueAt(model, pAttribute.getValue(), pPosition, 1);
}
Aggregations