Package javax.swing.event

Examples of javax.swing.event.InternalFrameAdapter


    public XmlDocumentFrame(final MainWindow mainWindow, XmlFile file) {
        super(file.getName(), true, true, true, true);
        setDefaultCloseOperation(DISPOSE_ON_CLOSE);
        instanceNumber = getInstanceNumber();
        addInternalFrameListener(new InternalFrameAdapter() {

            @Override
            public void internalFrameClosed(InternalFrameEvent e) {
                frameInstanceNumbers.remove(Integer.valueOf(instanceNumber));
                mainWindow.onInternalFrameClosed(XmlDocumentFrame.this);
View Full Code Here


        iFrame.putClientProperty("JInternalFrame.frameType", "optionDialog");
        iFrame.putClientProperty("JInternalFrame.messageType",
                                 new Integer(getMessageType()));

        iFrame.addInternalFrameListener(new InternalFrameAdapter() {
            public void internalFrameClosing(InternalFrameEvent e) {
                if (getValue() == UNINITIALIZED_VALUE) {
                    setValue(null);
                }
            }
View Full Code Here

          public void componentShown(ComponentEvent Event)
          {
            PersistentConfiguration.setWindowVisible("matrix", true);
          }
        });
        m_MatrixWindow.addInternalFrameListener(new InternalFrameAdapter()
        {
          public void internalFrameActivated(InternalFrameEvent Event)
          {
            m_Configuration.setActiveWindow("Matrix");
          }
         
          public void internalFrameDeactivated(InternalFrameEvent Event)
          {
            m_Configuration.setActiveWindow("");
          }
        });
        m_MatrixWindow.getContentPane().setLayout(new BorderLayout());
       
        JScrollPane scrollPane = new JScrollPane(m_MatrixPanel, ScrollPaneConstants.VERTICAL_SCROLLBAR_AS_NEEDED, ScrollPaneConstants.HORIZONTAL_SCROLLBAR_AS_NEEDED);
       
        scrollPane.setBorder(BorderFactory.createEmptyBorder());
        m_MatrixWindow.getContentPane().add(_matrixControllerPanel, BorderLayout.WEST);
        m_MatrixWindow.getContentPane().add(scrollPane, BorderLayout.CENTER);
        m_MatrixWindow.setSize(PersistentConfiguration.getWindowWidth("matrix"), PersistentConfiguration.getWindowHeight("matrix"));
        m_MatrixWindow.setLocation(PersistentConfiguration.getWindowLeft("matrix"), PersistentConfiguration.getWindowTop("matrix"));
        m_MatrixWindow.setVisible(PersistentConfiguration.getWindowVisible("matrix"));
        m_MatrixWindow.setDefaultCloseOperation(JInternalFrame.HIDE_ON_CLOSE);
        m_MatrixWindow.getInputMap(JComponent.WHEN_ANCESTOR_OF_FOCUSED_COMPONENT).put(KeyStroke.getKeyStroke(KeyEvent.VK_T, 0), "transmit");
        m_MatrixWindow.getActionMap().put("transmit", new AbstractAction()
        {
          public void actionPerformed(ActionEvent Event)
          {
            m_Configuration.transmitNow();
            _matrixControllerPanel.transmitted();
          }
        });
      }
    }
    {
      if(m_PresetsWindow == null)
      {
        m_PresetsWindow = new ProgramsWindow(m_Configuration);
        m_PresetsWindow.addComponentListener(new ComponentListener()
        {
          public void componentHidden(ComponentEvent Event)
          {
            PersistentConfiguration.setWindowVisible("presets", false);
          }
         
          public void componentMoved(ComponentEvent Event)
          {
            PersistentConfiguration.setWindowLeft("presets", Event.getComponent().getLocation().x);
            PersistentConfiguration.setWindowTop("presets", Event.getComponent().getLocation().y);
          }
         
          public void componentResized(ComponentEvent Event)
          {
            PersistentConfiguration.setWindowWidth("presets", Event.getComponent().getSize().width);
            PersistentConfiguration.setWindowHeight("presets", Event.getComponent().getSize().height);
          }
         
          public void componentShown(ComponentEvent Event)
          {
            PersistentConfiguration.setWindowVisible("presets", true);
          }
        });
        m_PresetsWindow.addInternalFrameListener(new InternalFrameAdapter()
        {
          public void internalFrameActivated(InternalFrameEvent Event)
          {
            m_Configuration.setActiveWindow("Presets");
          }
         
          public void internalFrameDeactivated(InternalFrameEvent Event)
          {
            m_Configuration.setActiveWindow("");
          }
        });
        m_PresetsWindow.setSize(PersistentConfiguration.getWindowWidth("presets"), PersistentConfiguration.getWindowHeight("presets"));
        m_PresetsWindow.setLocation(PersistentConfiguration.getWindowLeft("presets"), PersistentConfiguration.getWindowTop("presets"));
        m_PresetsWindow.setVisible(PersistentConfiguration.getWindowVisible("presets"));
        m_PresetsWindow.setDefaultCloseOperation(JInternalFrame.HIDE_ON_CLOSE);
      }
    }
    {
      if(m_EditPresetNamesWindow == null)
      {
        m_EditPresetNamesWindow = new EditPresetNamesWindow(m_Configuration);
        m_EditPresetNamesWindow.addComponentListener(new ComponentListener()
        {
          public void componentHidden(ComponentEvent Event)
          {
            PersistentConfiguration.setWindowVisible("edit-preset-names", false);
          }
         
          public void componentMoved(ComponentEvent Event)
          {
            PersistentConfiguration.setWindowLeft("edit-preset-names", Event.getComponent().getLocation().x);
            PersistentConfiguration.setWindowTop("edit-preset-names", Event.getComponent().getLocation().y);
          }
         
          public void componentResized(ComponentEvent Event)
          {
            PersistentConfiguration.setWindowWidth("edit-preset-names", Event.getComponent().getSize().width);
            PersistentConfiguration.setWindowWidth("edit-preset-names", Event.getComponent().getSize().height);
          }
         
          public void componentShown(ComponentEvent Event)
          {
            PersistentConfiguration.setWindowVisible("edit-preset-names", true);
          }
        });
        m_EditPresetNamesWindow.addInternalFrameListener(new InternalFrameAdapter()
        {
          public void internalFrameActivated(InternalFrameEvent Event)
          {
            m_Configuration.setActiveWindow("EditPresetNames");
          }
         
          public void internalFrameDeactivated(InternalFrameEvent Event)
          {
            m_Configuration.setActiveWindow("");
          }
        });
        m_EditPresetNamesWindow.setSize(PersistentConfiguration.getWindowWidth("edit-preset-names"), PersistentConfiguration.getWindowHeight("edit-preset-names"));
        m_EditPresetNamesWindow.setLocation(PersistentConfiguration.getWindowLeft("edit-preset-names"), PersistentConfiguration.getWindowTop("edit-preset-names"));
        m_EditPresetNamesWindow.setVisible(PersistentConfiguration.getWindowVisible("edit-preset-names"));
        m_EditPresetNamesWindow.setDefaultCloseOperation(JInternalFrame.HIDE_ON_CLOSE);
      }
    }
    {
      if(_editDeviceNamesWindow == null)
      {
        _editDeviceNamesWindow = new EditDeviceNamesWindow(m_Configuration);
        _editDeviceNamesWindow.addComponentListener(new ComponentListener()
        {
          public void componentHidden(ComponentEvent Event)
          {
            PersistentConfiguration.setWindowVisible("edit-device-names", false);
          }
         
          public void componentMoved(ComponentEvent Event)
          {
            PersistentConfiguration.setWindowLeft("edit-device-names", Event.getComponent().getLocation().x);
            PersistentConfiguration.setWindowTop("edit-device-names", Event.getComponent().getLocation().y);
          }
         
          public void componentResized(ComponentEvent Event)
          {
            PersistentConfiguration.setWindowWidth("edit-device-names", Event.getComponent().getSize().width);
            PersistentConfiguration.setWindowWidth("edit-device-names", Event.getComponent().getSize().height);
          }
         
          public void componentShown(ComponentEvent Event)
          {
            PersistentConfiguration.setWindowVisible("edit-device-names", true);
          }
        });
        _editDeviceNamesWindow.addInternalFrameListener(new InternalFrameAdapter()
        {
          public void internalFrameActivated(InternalFrameEvent Event)
          {
            m_Configuration.setActiveWindow("EditDeviceNames");
          }
View Full Code Here

            }

      _browser.setFrameIcon(getIcon16());
      _browserOpen = true;

      _browser.addInternalFrameListener(new InternalFrameAdapter()
      {
        /**
         * Invoked when an internal frame has been closed.
         */
        public void internalFrameClosed(InternalFrameEvent e)
View Full Code Here

    main.add(ratioRX);

    rrFrame = new JInternalFrame("UDGM", false, true);
    rrFrame.setVisible(false);
    rrFrame.setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);
    rrFrame.addInternalFrameListener(new InternalFrameAdapter() {
      @Override
      public void internalFrameClosing(InternalFrameEvent ife) {
        super.internalFrameClosed(ife);
        rangeTX.setVisible(false);
        rangeINT.setVisible(false);
View Full Code Here

      throw new PluginRequiresVisualizationException();
    }

    setDefaultCloseOperation(DO_NOTHING_ON_CLOSE);

    addInternalFrameListener(new InternalFrameAdapter() {
      public void internalFrameClosing(InternalFrameEvent e) {
        gui.removePlugin(VisPlugin.this, true);
      }
      public void internalFrameActivated(InternalFrameEvent e) {
        /* Highlight mote in COOJA */
 
View Full Code Here

TOP

Related Classes of javax.swing.event.InternalFrameAdapter

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.