Package javax.swing.event

Examples of javax.swing.event.InternalFrameListener


        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i] == InternalFrameListener.class) {
                if (e == null) {
                    e = new InternalFrameEvent(this, id);
                }
                InternalFrameListener l = (InternalFrameListener) listeners[i + 1];
                switch (id) {
                    case InternalFrameEvent.INTERNAL_FRAME_ACTIVATED:
                        l.internalFrameActivated(e);
                        break;
                    case InternalFrameEvent.INTERNAL_FRAME_DEACTIVATED:
                        l.internalFrameDeactivated(e);
                        break;
                    case InternalFrameEvent.INTERNAL_FRAME_ICONIFIED:
                        l.internalFrameIconified(e);
                        break;
                    case InternalFrameEvent.INTERNAL_FRAME_DEICONIFIED:
                        l.internalFrameDeiconified(e);
                        break;
                    case InternalFrameEvent.INTERNAL_FRAME_CLOSING:
                        l.internalFrameClosing(e);
                        break;
                    case InternalFrameEvent.INTERNAL_FRAME_OPENED:
                        l.internalFrameOpened(e);
                        break;
                    case InternalFrameEvent.INTERNAL_FRAME_CLOSED:
                        l.internalFrameClosed(e);
                        break;
                }
            }
        }
    }
View Full Code Here


        for (int i = listeners.length - 2; i >= 0; i -= 2) {
            if (listeners[i] == InternalFrameListener.class) {
                if (e == null) {
                    e = new InternalFrameEvent(this, id);
                }
                InternalFrameListener l = (InternalFrameListener) listeners[i + 1];
                switch (id) {
                    case InternalFrameEvent.INTERNAL_FRAME_ACTIVATED:
                        l.internalFrameActivated(e);
                        break;
                    case InternalFrameEvent.INTERNAL_FRAME_DEACTIVATED:
                        l.internalFrameDeactivated(e);
                        break;
                    case InternalFrameEvent.INTERNAL_FRAME_ICONIFIED:
                        l.internalFrameIconified(e);
                        break;
                    case InternalFrameEvent.INTERNAL_FRAME_DEICONIFIED:
                        l.internalFrameDeiconified(e);
                        break;
                    case InternalFrameEvent.INTERNAL_FRAME_CLOSING:
                        l.internalFrameClosing(e);
                        break;
                    case InternalFrameEvent.INTERNAL_FRAME_OPENED:
                        l.internalFrameOpened(e);
                        break;
                    case InternalFrameEvent.INTERNAL_FRAME_CLOSED:
                        l.internalFrameClosed(e);
                        break;
                }
            }
        }
    }
View Full Code Here

     *     void addInternalFrameListener(InternalFrameListener)
     *     removeInternalFrameListener(InternalFrameListener)
     *     InternalFrameListener[] getInternalFrameListeners()
     */
    public void testAddRemoveGetInternalFrameListener() {
        InternalFrameListener l = new MyInternalFrameListener();
        frame.addInternalFrameListener(l);
        InternalFrameListener[] listeners = frame.getInternalFrameListeners();
        assertTrue("listener was added", contains(listeners, l));
        frame.removeInternalFrameListener(l);
        listeners = frame.getInternalFrameListeners();
View Full Code Here

        JInternalFrame internalFrame = pane.createInternalFrame( contentPane,
                                                                 "xxx title" );
        internalFrame.setVisible( true );
        pane.show();
        internalFrame.addInternalFrameListener( new InternalFrameListener() {

            public void internalFrameOpened(InternalFrameEvent e) {
            }

            public void internalFrameIconified(InternalFrameEvent e) {
View Full Code Here

        JInternalFrame internalFrame = pane.createInternalFrame( contentPane,
                                                                 "xxx title" );
        internalFrame.setVisible( true );
        pane.show();
        internalFrame.addInternalFrameListener( new InternalFrameListener() {

            public void internalFrameOpened(InternalFrameEvent e) {
            }

            public void internalFrameIconified(InternalFrameEvent e) {
View Full Code Here

      throw new PluginRequiresVisualizationException();
    }

    setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);

    addInternalFrameListener(new InternalFrameListener() {
      public void internalFrameClosing(InternalFrameEvent e) {
        gui.removePlugin(VisPlugin.this, true);
      }
      public void internalFrameClosed(InternalFrameEvent e) { }
      public void internalFrameOpened(InternalFrameEvent e) { }
View Full Code Here

    /* GUI components */
    pluginGUI = new JInternalFrame(
        "Contiki Test Editor",
        true, true, true, true);
    pluginGUI.addInternalFrameListener(new InternalFrameListener() {
      public void internalFrameClosing(InternalFrameEvent e) {
        ScriptRunner.this.gui.removePlugin(ScriptRunner.this, true);
      }
      public void internalFrameClosed(InternalFrameEvent e) { }
      public void internalFrameOpened(InternalFrameEvent e) { }
View Full Code Here

    /* GUI components */
    if (GUI.isVisualized()) {
      pluginGUI = new JInternalFrame(
          "Native IP Gateway (" + mote + ")",
          true, true, true, true);
      pluginGUI.addInternalFrameListener(new InternalFrameListener() {
        public void internalFrameClosing(InternalFrameEvent e) {
          gui.removePlugin(NativeIPGateway.this, true);
        }
        public void internalFrameClosed(InternalFrameEvent e) { }
        public void internalFrameOpened(InternalFrameEvent e) { }
View Full Code Here

            container.add(serviceUIPanel);
        display();
    }

    private void display() {
        InternalFrameListener l = new InternalFrameListener() {
            public void internalFrameOpened(InternalFrameEvent event) {
            }

            public void internalFrameClosing(InternalFrameEvent event) {
            }
View Full Code Here

TOP

Related Classes of javax.swing.event.InternalFrameListener

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.