Package com.bbn.openmap.event

Examples of com.bbn.openmap.event.MapMouseListener


     */
    public synchronized boolean checkMouseMode() {
        // check the current MouseMode with the current layer
        coolMM = false;
        Layer layer = getAppropriateLayer();
        MapMouseListener mml = layer.getMapMouseListener();
        setCurrentLayerMapMouseListener(mml);
        if (mml != null) {
            String[] mmsl = mml.getMouseModeServiceList();
            for (int i = 0; i < mmsl.length; i++) {
                if (mmsl[i].intern() == mmID) {
                    coolMM = true;
                    break;
                }
View Full Code Here


    public String[] getMouseModeServiceList() {
        HashSet mmsl = new HashSet();
        Iterator it = getLayers().iterator();
        while (it.hasNext()) {
            Layer l = (Layer) it.next();
            MapMouseListener mml = l.getMapMouseListener();
            if (mml != null) {
                String[] llist = mml.getMouseModeServiceList();
                for (int i = 0; i < llist.length; i++) {
                    mmsl.add(llist[i].intern());
                }
            }
        }
View Full Code Here

     */
    public void setupMouseModeWithLayers(MapMouseMode mmm, Layer[] layers) {
        mmm.removeAllMapMouseListeners();
        for (int i = 0; i < layers.length; i++) {
            // Add the listeners from each layer to the mouse mode.
            MapMouseListener tempmml = null;

            if (layers[i] != null) {
                tempmml = layers[i].getMapMouseListener();
            }

            if (tempmml == null) {
                continue;
            }
            String[] services = tempmml.getMouseModeServiceList();
            if (services != null) {
                for (int k = 0; k < services.length; k++) {
                    if (mmm.getID().equals(services[k])) {
                        mmm.addMapMouseListener(tempmml);
                        if (Debug.debugging("mousemode")) {
View Full Code Here

     * Query asked from the MouseDelegator for interest in receiving
     * MapMouseEvents. This returns a MapMouseInterpreter that has been told to
     * listen for events from the MapMouseModes in setMouseModeIDsForEvents().
     */
    public MapMouseListener getMapMouseListener() {
        MapMouseListener mml = getMouseEventInterpreter();

        if (mml != null) {
            if (Debug.debugging("layer")) {

                String[] modes = mml.getMouseModeServiceList();
                StringBuffer sb = new StringBuffer();
                for (int i = 0; i < modes.length; i++) {
                    sb.append(modes[i] + ", ");
                }

                Debug.output("Layer " + getName() + " returning "
                        + mml.getClass().getName()
                        + " as map mouse listener that listens to: "
                        + sb.toString());
            }
        }

View Full Code Here

TOP

Related Classes of com.bbn.openmap.event.MapMouseListener

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.