use of net.parostroj.timetable.model.events.Event 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)));
}
use of net.parostroj.timetable.model.events.Event 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)));
}
use of net.parostroj.timetable.model.events.Event 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)));
}
use of net.parostroj.timetable.model.events.Event in project grafikon by jub77.
the class GTVButtonPanel method setTrainDiagram.
protected void setTrainDiagram(TrainDiagram td) {
this.td = td;
fill();
if (td != null) {
td.addListener(new Listener() {
@Override
public void changed(Event event) {
if (event.getType() == Type.ADDED || event.getType() == Type.REMOVED && event.getObject() instanceof Route) {
fill();
}
}
});
}
}
use of net.parostroj.timetable.model.events.Event 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)));
}
}
Aggregations