Examples of MapHost


Examples of net.gridshield.nexsm.entityclasses.MapHost

        if (edge && tag.equals("first")) { first = true; }
        if (edge && tag.equals("second")) { second = true; }
        if (edge && tag.equals("color")) { color = true; }
       
        if (tag.equals("host")) { host = true;
            htmp = new MapHost();
            if (h.containsKey("hidden")) {
                htmp.setHidden(Boolean.parseBoolean((String)h.get("hidden")));
            }
            if (h.containsKey("locked")) {
                htmp.lock(Boolean.parseBoolean((String)h.get("locked")));
View Full Code Here

Examples of net.gridshield.nexsm.entityclasses.MapHost

            }
        }
    }
               
    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);
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.