Search in sources :

Example 11 with AttributeChange

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

the class TrainsData method setTrainNameTemplate.

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

Example 12 with AttributeChange

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

the class TrainNameDelegate method refreshCompleteName.

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

Example 13 with AttributeChange

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

the class WeightTableRow method setWeightInfo.

public void setWeightInfo(LineClass lineClass, Integer weight) {
    weights.put(lineClass, weight);
    engineClass.fireEvent(new Event(engineClass, this, new AttributeChange("weight.info", null, null)));
}
Also used : AttributeChange(net.parostroj.timetable.model.events.AttributeChange) Event(net.parostroj.timetable.model.events.Event)

Example 14 with AttributeChange

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

the class Track method setNumber.

/**
 * @param number track number to be set
 */
public void setNumber(String number) {
    String oldNumber = this.number;
    this.number = number;
    this.fireAttributeChanged(new AttributeChange(ATTR_NUMBER, oldNumber, number));
}
Also used : AttributeChange(net.parostroj.timetable.model.events.AttributeChange)

Example 15 with AttributeChange

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

the class NodeTrack method setPlatform.

/**
 * @param platform the platform to set
 */
public void setPlatform(boolean platform) {
    boolean oldPlatform = this.platform;
    if (oldPlatform != platform) {
        this.platform = platform;
        this.fireAttributeChanged(new AttributeChange(ATTR_PLATFORM, oldPlatform, platform));
    }
}
Also used : AttributeChange(net.parostroj.timetable.model.events.AttributeChange)

Aggregations

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