Package ch.fork.AdHocRailway.domain.routes

Examples of ch.fork.AdHocRailway.domain.routes.Route


    }

    private void parseRoute(String qName, Attributes attributes) {
        String name = attributes.getValue("name");
        int number = Integer.parseInt(attributes.getValue("number"));
        actualRoute = new Route(0, actualRouteGroup, number, name);
        actualRouteGroup.getRoutes().add(actualRoute);
        routePersistence.addRoute(actualRoute);
    }
View Full Code Here


                    Object obj = historyStack.removeFirst();
                    if (obj instanceof Turnout) {
                        Turnout t = (Turnout) obj;
                        turnoutControl.setDefaultState(t);
                    } else if (obj instanceof Route) {
                        Route r = (Route) obj;
                        routeControl.disableRoute(r);
                    } else {
                        return;
                    }
                    historyWidgets.removeFirst();
View Full Code Here

            updateHistory(searchedTurnout);
        }

        private void handleRouteChange(ActionEvent e, int enteredNumber)
                throws TurnoutException, RouteException {
            Route searchedRoute = null;

            RouteControlIface routeControl = AdHocRailway.getInstance()
                    .getRouteControl();
            RoutePersistenceIface routePersistence = AdHocRailway.getInstance()
                    .getRoutePersistence();
View Full Code Here

    }

    private void parseRoute(String qName, Attributes attributes) {
        String name = attributes.getValue("name");
        int number = Integer.parseInt(attributes.getValue("number"));
        actualRoute = new Route(0, actualRouteGroup, number, name);
        actualRouteGroup.getRoutes().add(actualRoute);
        routePersistence.addRoute(actualRoute);
    }
View Full Code Here

        type.getTurnouts().remove(turnout);

        Set<RouteItem> routeItems = turnout.getRouteItems();
        for (RouteItem ri : routeItems) {

            Route route = ri.getRoute();
            route.getRouteItems().remove(ri);

        }

        turnoutCache.remove(turnout);
        numberToTurnoutCache.values().remove(turnout);
View Full Code Here

        type.getTurnouts().remove(turnout);

        Set<RouteItem> routeItems = turnout.getRouteItems();
        for (RouteItem ri : routeItems) {

            Route route = ri.getRoute();
            route.getRouteItems().remove(ri);
            em.remove(ri);

        }
        try {
            em.remove(turnout);
View Full Code Here

TOP

Related Classes of ch.fork.AdHocRailway.domain.routes.Route

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.