Examples of MapEdge


Examples of net.gridshield.nexsm.entityclasses.MapEdge

        if (tag.equals("testingpuller")) {
            ctp = new ConfTestPuller();
            testingpuller = true; }
       
        if (tag.equals("edge")) { edge = true;
            metmp = new MapEdge();
            if (h.containsKey("hidden")) {
                metmp.setHidden(Boolean.parseBoolean((String)h.get("hidden")));
            }
        }
        if (edge && tag.equals("first")) { first = true; }
View Full Code Here

Examples of net.gridshield.nexsm.entityclasses.MapEdge

        }
    }
               
    private void takeConfigAction(LinkedList l) {
        MapHost mh = null;
        MapEdge medge = null;
        String viewName = "";
        boolean loadMap = false;
        boolean mapHostErrorSent = false;
        double translateX = 0.0;
        double translateY = 0.0;
        boolean dontSend = false;
        // by default activate default view
        boolean activateDefaultView = true;
        boolean isLoadDefaultViewsList = false;
        Vertex vertex = null;
        //boolean translateSet = false;
        ArrayList <String>views = new ArrayList<String>();
        for (Object n: l) {
            if (n instanceof ErrorMapper) {               
                MapperEvent me = new MapperEvent(this);
                me.setMapperType(MapperActionType.DisplayError);
                Date d = new Date(System.currentTimeMillis());
                NexsmLog nl = new NexsmLog(d, NexsmLogType.Critical, "Puller error",
                            ((ErrorMapper)n).getMessage());
                me.setParams(nl);
                fireMapperActionRequested(me);
            } else if (n instanceof LoggedInUser) {
                LoggedInUser li = (LoggedInUser)n;
                if (li.isLoggedIn() && li.isConfigAllowed()) {
                    MapperEvent me = new MapperEvent(this);
                    me.setMapperType(MapperActionType.DisplayToolbar);
                    me.setParams(true);
                    fireMapperActionRequested(me);
                }
                _li.setLoggedIn(li.isLoggedIn());
                _li.setConfigAllowed(li.isConfigAllowed());
            } else if (n instanceof MapHost) { // response to loadMap
                mh = (MapHost)n;
                // TODO change this to use the selected view in MapApplet
                vertex = _graphManager.getVertex(mh.getName());
                if (viewName.length() > 0 && loadMap) {
                    if (vertex != null) {
                        _graphManager.moveVertex(vertex, mh.getCoordinates(), viewName);
                        if (mh.isHidden()) {
                            _graphManager.hideVertex(vertex, viewName);
                        } else {
                            _graphManager.showVertex(vertex, viewName);
                        }
                        if (mh.isLocked()) {
                            _graphManager.lockVertex(vertex, viewName);
                        }
                        if (mh.getLabelLocation() != null) {
                            vertex.setUserDatum("labelLocation", mh.getLabelLocation(), UserData.REMOVE);
                        }
                    }
                } else {
                    if (!mapHostErrorSent) {
                        MapperEvent me = new MapperEvent(this);
                        me.setMapperType(MapperActionType.DisplayError);
                        ErrorMapper em = new ErrorMapper("I received a MapHost instance but\n"
                                + "I don't have a view name to load it in, maybe this is an error\n"
                                + "in the map xml file, a missing name attribute in\n"
                                + "the mapdefinition tag perhaps?"
                                );
                        me.setParams(em);
                        fireMapperActionRequested(me);
                        mapHostErrorSent = true;
                    }
                }
            } else if (n instanceof MapEdge) {
                medge = (MapEdge)n;
                if (medge.isHidden()) {
                    _graphManager.hideEdge(medge.getFirst(), medge.getSecond(), viewName);
                }
                if (medge.getColor() != null) {
                    _graphManager.setEdgeColor(medge.getFirst(), medge.getSecond(), viewName, medge.getColor());
                }
            } else if (n instanceof NexsmPaintable) {
                _graphManager.putRenderer(viewName, (NexsmPaintable)n);
            } else if (n instanceof ConfParam) {
                ConfParam parm = (ConfParam)n;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.