Package java.awt.event

Examples of java.awt.event.ComponentListener


        if (comp instanceof ResizersScrollPane) {
          final JComponent parent = (JComponent) comp.getParent();
          JComponent[] children = ((ResizersScrollPane) comp).getResizers();
          for (JComponent child : children) {
            if (child.getComponentListeners().length == 0) {
              child.addComponentListener(new ComponentListener() {
                @Override
                public void componentResized(ComponentEvent e) {
                  parent.revalidate();
                }
 
View Full Code Here


        if (comp instanceof ResizersScrollPane) {
          final JComponent parent = (JComponent) comp.getParent();
          JComponent[] children = ((ResizersScrollPane) comp).getResizers();
          for (JComponent child : children) {
            if (child.getComponentListeners().length == 0) {
              child.addComponentListener(new ComponentListener() {
                @Override
                public void componentResized(ComponentEvent e) {
                  parent.revalidate();
                }
 
View Full Code Here

//            nameHeaderPanel.add(picLabel);
//        } catch (IOException e) {
//            //pass
//        }

        addComponentListener(new ComponentListener() {

            public void componentResized(ComponentEvent componentEvent) {
                revalidate();
                repaint();
            }
View Full Code Here

            }
        };
        addMouseListener(childDelegation);
        addMouseMotionListener(childDelegation);

        addComponentListener(new ComponentListener() {
            @Override
            public void componentResized(ComponentEvent e) {
                controlPanel.componentResized(e);
                if (secondPanel != null) secondPanel.componentResized(e);
            }
View Full Code Here

        }

        if (automatedMode) {
            // Create a listener to begin refactoring as soon as the dialog is
            // shown.
            ComponentListener componentListener = new ComponentListener() {
                public void componentHidden(ComponentEvent e) {
                }

                public void componentMoved(ComponentEvent e) {
                }
View Full Code Here

  }

  protected abstract boolean init();

  public void install(final Component component) {
    final ComponentListener listener = new ComponentListener() {
      @Override
      public void componentResized(ComponentEvent e) {
        impl();
      }
View Full Code Here

        builder.add(typeManagerPane, cc.xywh(1, 13, 7, 1));

        add(builder.getPanel(), BorderLayout.CENTER);

        this.addComponentListener(new ComponentListener() {

            int height;

            public void componentHidden(ComponentEvent e) {
            }
View Full Code Here

    public void testAncestorAddedEventWhenComponentAdded() throws Exception {
        frame = createVisibleFrameWithAncestor();
        ancestor.remove(component);
        waitForIdle();
        listener.reset();
        ComponentListener compListener = addComponentListener(component);
        ancestor.add(component);
        waitForIdle();
        synchronized (compListener) {
            compListener.wait(1000);
        }
        assertTrue(listener.getNumEvents() >= 1);
        performChecksInQueue(component, ancestor, AncestorEvent.ANCESTOR_ADDED);
    }
View Full Code Here

        frame = createVisibleFrameWithAncestor();
        ancestor.setBounds(10, 10, 10, 10);
        ancestor.setVisible(false);
        waitForIdle();
        listener.reset();
        ComponentListener compListener = addComponentListener(component);
        ancestor.setBounds(20, 20, 20, 20);
        waitForIdle();
        synchronized (compListener) {
            compListener.wait(1000);
        }
        assertTrue(listener.getNumEvents() >= 1);
        performChecksInQueue(ancestor, frame.getContentPane(), AncestorEvent.ANCESTOR_MOVED);
    }
View Full Code Here

        frame = createVisibleFrameWithAncestor();
        ancestor.setBounds(10, 10, 10, 10);
        component.setVisible(false);
        waitForIdle();
        listener.reset();
        ComponentListener compListener = addComponentListener(component);
        ancestor.setBounds(20, 20, 20, 20);
        waitForIdle();
        synchronized (compListener) {
            compListener.wait(1000);
        }
        assertEquals(0, listener.getNumEvents());
    }
View Full Code Here

TOP

Related Classes of java.awt.event.ComponentListener

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.