Search in sources :

Example 1 with ReminderExtension

use of org.freeplane.view.swing.features.time.mindmapmode.ReminderExtension in project freeplane by freeplane.

the class NodeList method updateModel.

private void updateModel(final DefaultTableModel model, final NodeModel node) {
    final ReminderExtension hook = ReminderExtension.getExtension(node);
    Date date = null;
    if (hook != null) {
        date = new Date(hook.getRemindUserAt());
    }
    if (showAllNodes && node.isVisible() || hook != null) {
        model.addRow(new Object[] { date, new TextHolder(new CoreTextAccessor(node)), new IconsHolder(node), node.getHistoryInformation().getCreatedAt(), node.getHistoryInformation().getLastModifiedAt(), new TextHolder(new DetailTextAccessor(node)), new TextHolder(new NoteTextAccessor(node)) });
    }
    for (final NodeModel child : Controller.getCurrentModeController().getMapController().childrenUnfolded(node)) {
        updateModel(model, child);
    }
}
Also used : NodeModel(org.freeplane.features.map.NodeModel) ReminderExtension(org.freeplane.view.swing.features.time.mindmapmode.ReminderExtension) Date(java.util.Date)

Example 2 with ReminderExtension

use of org.freeplane.view.swing.features.time.mindmapmode.ReminderExtension in project freeplane by freeplane.

the class ReminderProxy method createOrReplace.

// Reminder
public void createOrReplace(Date remindAt, String periodUnit, Integer period) {
    final ReminderHook reminderHook = Controller.getCurrentModeController().getExtension(ReminderHook.class);
    removeOldReminder(reminderHook);
    final ReminderExtension reminder = newReminder(remindAt);
    reminder.setPeriodUnitAsString(periodUnit);
    reminder.setPeriod(period);
    reminderHook.add(getDelegate(), reminder);
}
Also used : ReminderExtension(org.freeplane.view.swing.features.time.mindmapmode.ReminderExtension) ReminderHook(org.freeplane.view.swing.features.time.mindmapmode.ReminderHook)

Example 3 with ReminderExtension

use of org.freeplane.view.swing.features.time.mindmapmode.ReminderExtension in project freeplane by freeplane.

the class ReminderProxy method setScript.

// Reminder
public void setScript(String scriptSource) {
    final ReminderExtension reminder = getDelegate().getExtension(ReminderExtension.class);
    if (reminder == null)
        throw new NullPointerException("no reminder defined for node " + this);
    reminder.setScript(scriptSource);
}
Also used : ReminderExtension(org.freeplane.view.swing.features.time.mindmapmode.ReminderExtension)

Example 4 with ReminderExtension

use of org.freeplane.view.swing.features.time.mindmapmode.ReminderExtension in project freeplane by freeplane.

the class ReminderProxy method newReminder.

private ReminderExtension newReminder(Date remindAt) {
    final ReminderExtension reminder = new ReminderExtension(getDelegate());
    reminder.setRemindUserAt(remindAt.getTime());
    return reminder;
}
Also used : ReminderExtension(org.freeplane.view.swing.features.time.mindmapmode.ReminderExtension)

Aggregations

ReminderExtension (org.freeplane.view.swing.features.time.mindmapmode.ReminderExtension)4 Date (java.util.Date)1 NodeModel (org.freeplane.features.map.NodeModel)1 ReminderHook (org.freeplane.view.swing.features.time.mindmapmode.ReminderHook)1