Package org.gephi.visualization.apiimpl

Examples of org.gephi.visualization.apiimpl.VizEventListener


        public NodeClickEventHandler(ToolEventListener toolListener) {
            this.toolEventListener = (NodeClickEventListener) toolListener;
        }

        public void select() {
            currentListener = new VizEventListener() {

                public void handleEvent(VizEvent event) {
                    toolEventListener.clickNodes((Node[]) event.getData());
                }
View Full Code Here


            this.toolEventListener = (NodePressingEventListener) toolListener;
        }

        public void select() {
            currentListeners = new VizEventListener[2];
            currentListeners[0] = new VizEventListener() {

                public void handleEvent(VizEvent event) {
                    toolEventListener.pressingNodes((Node[]) event.getData());
                }

                public Type getType() {
                    return VizEvent.Type.NODE_LEFT_PRESSING;
                }
            };
            currentListeners[1] = new VizEventListener() {

                public void handleEvent(VizEvent event) {
                    toolEventListener.released();
                }
View Full Code Here

            this.toolEventListener = (NodePressAndDraggingEventListener) toolListener;
        }

        public void select() {
            currentListeners = new VizEventListener[3];
            currentListeners[0] = new VizEventListener() {

                public void handleEvent(VizEvent event) {
                    toolEventListener.pressNodes((Node[]) event.getData());
                }

                public Type getType() {
                    return VizEvent.Type.NODE_LEFT_PRESS;
                }
            };
            currentListeners[1] = new VizEventListener() {

                public void handleEvent(VizEvent event) {
                    float[] mouseDrag = (float[]) event.getData();
                    toolEventListener.drag(mouseDrag[0], mouseDrag[1]);
                }

                public Type getType() {
                    return VizEvent.Type.DRAG;
                }
            };
            currentListeners[2] = new VizEventListener() {

                public void handleEvent(VizEvent event) {
                    toolEventListener.released();
                }
View Full Code Here

        public MouseClickEventHandler(ToolEventListener toolListener) {
            this.toolEventListener = (MouseClickEventListener) toolListener;
        }

        public void select() {
            currentListener = new VizEventListener() {

                public void handleEvent(VizEvent event) {
                    float[] data = (float[]) event.getData();
                    int[] viewport = new int[]{(int) data[0], (int) data[1]};
                    float[] threed = new float[]{data[2], data[3]};
View Full Code Here

        private synchronized void fireVizEvent(Object data) {
            VizEvent event = new VizEvent(this, type, data);
            for (int i = 0; i < listeners.size(); i++) {
                WeakReference<VizEventListener> weakListener = listeners.get(i);
                VizEventListener v = weakListener.get();
                v.handleEvent(event);
            }
        }
View Full Code Here

        private synchronized void fireVizEvent(Object data) {
            VizEvent event = new VizEvent(this, type, data);
            for (int i = 0; i < listeners.size(); i++) {
                WeakReference<VizEventListener> weakListener = listeners.get(i);
                VizEventListener v = weakListener.get();
                v.handleEvent(event);
            }
        }
View Full Code Here

        public NodeClickEventHandler(ToolEventListener toolListener) {
            this.toolEventListener = (NodeClickEventListener) toolListener;
        }

        public void select() {
            currentListener = new VizEventListener() {

                public void handleEvent(VizEvent event) {
                    toolEventListener.clickNodes((Node[]) event.getData());
                }
View Full Code Here

            this.toolEventListener = (NodePressingEventListener) toolListener;
        }

        public void select() {
            currentListeners = new VizEventListener[2];
            currentListeners[0] = new VizEventListener() {

                public void handleEvent(VizEvent event) {
                    toolEventListener.pressingNodes((Node[]) event.getData());
                }

                public Type getType() {
                    return VizEvent.Type.NODE_LEFT_PRESSING;
                }
            };
            currentListeners[1] = new VizEventListener() {

                public void handleEvent(VizEvent event) {
                    toolEventListener.released();
                }
View Full Code Here

            this.toolEventListener = (NodePressAndDraggingEventListener) toolListener;
        }

        public void select() {
            currentListeners = new VizEventListener[3];
            currentListeners[0] = new VizEventListener() {

                public void handleEvent(VizEvent event) {
                    toolEventListener.pressNodes((Node[]) event.getData());
                }

                public Type getType() {
                    return VizEvent.Type.NODE_LEFT_PRESS;
                }
            };
            currentListeners[1] = new VizEventListener() {

                public void handleEvent(VizEvent event) {
                    float[] mouseDrag = (float[]) event.getData();
                    toolEventListener.drag(mouseDrag[0], mouseDrag[1]);
                }

                public Type getType() {
                    return VizEvent.Type.DRAG;
                }
            };
            currentListeners[2] = new VizEventListener() {

                public void handleEvent(VizEvent event) {
                    toolEventListener.released();
                }
View Full Code Here

        public MouseClickEventHandler(ToolEventListener toolListener) {
            this.toolEventListener = (MouseClickEventListener) toolListener;
        }

        public void select() {
            currentListener = new VizEventListener() {

                public void handleEvent(VizEvent event) {
                    float[] data = (float[]) event.getData();
                    int[] viewport = new int[]{(int) data[0], (int) data[1]};
                    float[] threed = new float[]{data[2], data[3]};
View Full Code Here

TOP

Related Classes of org.gephi.visualization.apiimpl.VizEventListener

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.