예제 #1
0
 // this table listens for changes to a location and it's interchanges
 @Override
 public void propertyChange(PropertyChangeEvent e) {
   if (Control.SHOW_PROPERTY) {
     log.debug(
         "Property change: ({}) old: ({}) new: ({})",
         e.getPropertyName(),
         e.getOldValue(),
         e.getNewValue());
   }
   super.propertyChange(e);
   if (e.getSource().getClass().equals(Track.class)) {
     Track track = ((Track) e.getSource());
     if (track.getTrackType().equals(Track.INTERCHANGE)) {
       int row = tracksList.indexOf(track);
       if (Control.SHOW_PROPERTY) {
         log.debug("Update interchange table row: {} track: {}", row, track.getName());
       }
       if (row >= 0) {
         fireTableRowsUpdated(row, row);
       }
     }
   }
 }
예제 #2
0
 public void initTable(JTable table, Location location) {
   super.initTable(table, location, Track.INTERCHANGE);
 }