Search in sources :

Example 1 with Event

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

the class FreightNet method removeConnectionImpl.

private void removeConnectionImpl(FNConnection conn) {
    boolean removed = this.fromMap.remove(conn.getFrom(), conn);
    if (removed) {
        this.toMap.remove(conn.getTo(), conn);
        this.fromTrainMap.remove(conn.getFrom().getTrain(), conn);
        this.toTrainMap.remove(conn.getTo().getTrain(), conn);
        this.fireEvent(new Event(this, Event.Type.REMOVED, conn));
    }
}
Also used : Event(net.parostroj.timetable.model.events.Event)

Example 2 with Event

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

the class Region method fireSubRegionsEvent.

private void fireSubRegionsEvent(Set<Region> old) {
    Event event = new Event(diagram, this, new AttributeChange(ATTR_SUB_REGIONS, old, subRegions));
    fireEvent(event);
}
Also used : AttributeChange(net.parostroj.timetable.model.events.AttributeChange) Event(net.parostroj.timetable.model.events.Event)

Example 3 with Event

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

the class Region method fireNodesEvent.

private void fireNodesEvent(Set<Node> old) {
    Event event = new Event(diagram, this, new AttributeChange(ATTR_NODES, old, nodes));
    fireEvent(event);
}
Also used : AttributeChange(net.parostroj.timetable.model.events.AttributeChange) Event(net.parostroj.timetable.model.events.Event)

Example 4 with Event

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

the class LineClass method setName.

public void setName(String name) {
    if (!ObjectsUtil.compareWithNull(name, this.name)) {
        String oldName = this.name;
        this.name = name;
        listenerSupport.fireEvent(new Event(this, new AttributeChange(ATTR_NAME, oldName, this.name)));
    }
}
Also used : AttributeChange(net.parostroj.timetable.model.events.AttributeChange) Event(net.parostroj.timetable.model.events.Event)

Example 5 with Event

use of net.parostroj.timetable.model.events.Event 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)

Aggregations

Event (net.parostroj.timetable.model.events.Event)21 AttributeChange (net.parostroj.timetable.model.events.AttributeChange)12 Color (java.awt.Color)1 ActionEvent (java.awt.event.ActionEvent)1 ActionListener (java.awt.event.ActionListener)1 ItemEvent (java.awt.event.ItemEvent)1 MouseEvent (java.awt.event.MouseEvent)1 JComponent (javax.swing.JComponent)1 PopupMenuEvent (javax.swing.event.PopupMenuEvent)1 PopupMenuListener (javax.swing.event.PopupMenuListener)1 TCDetailsViewDialog (net.parostroj.timetable.gui.dialogs.TCDetailsViewDialog)1 TCDelegate (net.parostroj.timetable.gui.views.TCDelegate)1 Wrapper (net.parostroj.timetable.gui.wrappers.Wrapper)1 GTEventsReceiverColleague (net.parostroj.timetable.mediator.GTEventsReceiverColleague)1 Route (net.parostroj.timetable.model.Route)1 Train (net.parostroj.timetable.model.Train)1 TrainColorChooser (net.parostroj.timetable.output2.gt.TrainColorChooser)1 AbstractEventVisitor (net.parostroj.timetable.visitors.AbstractEventVisitor)1