Archived
0

add property list with none system and none station

This commit is contained in:
iMoHax
2015-01-07 14:33:29 +03:00
parent af06ab0914
commit 00d8f6e084
4 changed files with 41 additions and 27 deletions

View File

@@ -1,6 +1,8 @@
package ru.trader.model;
import javafx.beans.property.ReadOnlyStringProperty;
import javafx.collections.FXCollections;
import javafx.collections.ObservableList;
import ru.trader.core.*;
import ru.trader.graph.PathRoute;
@@ -30,7 +32,7 @@ public class ModelFabric {
}
public SystemModel get(Place system){
if (system == null) return null;
if (system == null) return NONE_SYSTEM;
SystemModel res=null;
WeakReference<SystemModel> ref = systems.get(system);
if (ref != null){
@@ -45,7 +47,7 @@ public class ModelFabric {
public StationModel get(Vendor station){
if (station == null) return null;
if (station == null) return NONE_STATION;
StationModel res=null;
WeakReference<StationModel> ref = stations.get(station);
if (ref != null){
@@ -160,6 +162,11 @@ public class ModelFabric {
throw new UnsupportedOperationException("Is fake system, change unsupported");
}
@Override
public ObservableList<StationModel> getStationsList() {
return FXCollections.observableArrayList(ModelFabric.NONE_STATION);
}
@Override
public List<StationModel> getStations(SERVICE_TYPE service) {
throw new UnsupportedOperationException("Is fake system, change unsupported");