use of org.freeplane.features.text.mindmapmode.MTextController in project freeplane by freeplane.
the class NodeProxy method setDetailsText.
// Node: R/W
public void setDetailsText(String html) {
final MTextController textController = (MTextController) TextController.getController();
if (html == null) {
textController.setDetailsHidden(getDelegate(), false);
textController.setDetails(getDelegate(), null);
} else {
textController.setDetails(getDelegate(), html);
}
}
use of org.freeplane.features.text.mindmapmode.MTextController in project freeplane by freeplane.
the class NodeProxy method setDateTime.
// Node: R/W
public void setDateTime(final Date date) {
final MTextController textController = (MTextController) TextController.getController();
textController.setNodeObject(getDelegate(), ProxyUtils.createDefaultFormattedDateTime(date));
}
use of org.freeplane.features.text.mindmapmode.MTextController in project freeplane by freeplane.
the class NodeProxy method setHideDetails.
// Node: R/W
public void setHideDetails(boolean hide) {
MTextController controller = (MTextController) MTextController.getController();
controller.setDetailsHidden(getDelegate(), hide);
}
use of org.freeplane.features.text.mindmapmode.MTextController in project freeplane by freeplane.
the class AttributeTable method getCellEditor.
@SuppressWarnings("serial")
public TableCellEditor getCellEditor(final int row, final int col, EventObject e) {
if (dce != null) {
dce.stopCellEditing();
}
if (col == 1) {
final MTextController textController = (MTextController) TextController.getController();
if (e instanceof KeyEvent) {
final KeyEvent kev = (KeyEvent) e;
textController.getEventQueue().setFirstEvent(kev);
}
final IAttributeTableModel model = (IAttributeTableModel) getModel();
final String text = getValueForEdit(row, col);
final DialogTableCellEditor dialogTableCellEditor = new DialogTableCellEditor();
EditNodeBase base = textController.getEditNodeBase(model.getNode(), text, dialogTableCellEditor.getEditControl(), false);
if (base != null) {
dialogTableCellEditor.setEditBase(base);
return dialogTableCellEditor;
}
}
final JComboBox comboBox;
if (dce == null) {
comboBox = new JComboBoxWithBorder() {
// Workaround for bug introduced in Java 8: they use wrong component in DefaultCellEditor.EditorDelegate
@Override
public void actionPerformed(ActionEvent e) {
if (e != null && e.getSource() == dce) {
super.actionPerformed(new ActionEvent(getEditor(), e.getID(), e.getActionCommand(), e.getWhen(), e.getModifiers()));
} else
super.actionPerformed(e);
}
};
comboBox.addFocusListener(AttributeTable.focusListener);
comboBox.getEditor().getEditorComponent().addFocusListener(AttributeTable.focusListener);
comboBox.setRenderer(new TypedListCellRenderer());
dce = new DefaultCellEditor(comboBox) {
public Component getTableCellEditorComponent(JTable table, Object value, boolean isSelected, int row, int col) {
return super.getTableCellEditorComponent(table, ((AttributeTable) table).getValueForEdit(row, col), isSelected, row, col);
}
};
dce.setClickCountToStart(CLICK_COUNT_TO_START);
}
return dce;
}
use of org.freeplane.features.text.mindmapmode.MTextController in project freeplane by freeplane.
the class ImportExplorerFavoritesAction method addNode.
/**
*/
private NodeModel addNode(final NodeModel target, final String nodeContent) {
final NodeModel node = ((MMapController) Controller.getCurrentModeController().getMapController()).addNewNode(target, target.getChildCount(), target.isNewChildLeft());
((MTextController) TextController.getController()).setNodeText(node, nodeContent);
return node;
}
Aggregations