Search in sources :

Example 6 with AttributeChange

use of net.parostroj.timetable.model.events.AttributeChange in project grafikon by jub77.

the class PenaltyTableRow method setDeceleration.

public void setDeceleration(int deceleration) {
    if (this.deceleration != deceleration) {
        this.deceleration = deceleration;
        category.fireEvent(new Event(category, this, new AttributeChange("penalty.info", null, null)));
    }
}
Also used : AttributeChange(net.parostroj.timetable.model.events.AttributeChange) Event(net.parostroj.timetable.model.events.Event)

Example 7 with AttributeChange

use of net.parostroj.timetable.model.events.AttributeChange in project grafikon by jub77.

the class TrainNameDelegate method refreshName.

private void refreshName() {
    String oldName = _cachedName.getValue();
    String newName = this.getNameImpl(NameType.NORMAL);
    if (_cachedName.set(newName)) {
        train.fireEvent(new Event(train, new AttributeChange(ATTR_NAME, oldName, newName)));
    }
}
Also used : AttributeChange(net.parostroj.timetable.model.events.AttributeChange) Event(net.parostroj.timetable.model.events.Event)

Example 8 with AttributeChange

use of net.parostroj.timetable.model.events.AttributeChange in project grafikon by jub77.

the class TrainsData method setTrainSortPattern.

public void setTrainSortPattern(SortPattern trainSortPattern) {
    SortPattern oldValue = this.trainSortPattern;
    this.trainSortPattern = trainSortPattern;
    this.trainComparator = null;
    this.diagram.fireEvent(new Event(diagram, new AttributeChange(TrainDiagram.ATTR_TRAIN_SORT_PATTERN, oldValue, this.trainSortPattern)));
}
Also used : AttributeChange(net.parostroj.timetable.model.events.AttributeChange) Event(net.parostroj.timetable.model.events.Event)

Example 9 with AttributeChange

use of net.parostroj.timetable.model.events.AttributeChange in project grafikon by jub77.

the class TrainsData method setTrainCompleteNameTemplate.

public void setTrainCompleteNameTemplate(TextTemplate trainCompleteNameTemplate) {
    TextTemplate oldValue = this.trainCompleteNameTemplate;
    this.trainCompleteNameTemplate = trainCompleteNameTemplate;
    this.diagram.fireEvent(new Event(diagram, new AttributeChange(TrainDiagram.ATTR_TRAIN_COMPLETE_NAME_TEMPLATE, oldValue, this.trainCompleteNameTemplate)));
}
Also used : AttributeChange(net.parostroj.timetable.model.events.AttributeChange) Event(net.parostroj.timetable.model.events.Event)

Example 10 with AttributeChange

use of net.parostroj.timetable.model.events.AttributeChange in project grafikon by jub77.

the class TrainsData method setRunningTimeScript.

public void setRunningTimeScript(Script runningTimeScript) {
    Script oldValue = this.runningTimeScript;
    this.runningTimeScript = runningTimeScript;
    this.diagram.fireEvent(new Event(diagram, new AttributeChange(TrainDiagram.ATTR_RUNNING_SCRIPT, oldValue, this.runningTimeScript)));
}
Also used : AttributeChange(net.parostroj.timetable.model.events.AttributeChange) Event(net.parostroj.timetable.model.events.Event)

Aggregations

AttributeChange (net.parostroj.timetable.model.events.AttributeChange)18 Event (net.parostroj.timetable.model.events.Event)12