Package java.awt.event

Examples of java.awt.event.ComponentEvent


            prepare4HierarchyChange();
            mapToDisplay(true);
            validate();
            visible = true;
            behaviour.setVisible(true);
            postEvent(new ComponentEvent(this, ComponentEvent.COMPONENT_SHOWN));
            finishHierarchyChange(this, parent, 0);
            notifyInputMethod(new Rectangle(x, y, w, h));
            invalidateRealParent();
        } finally {
            toolkit.unlockAWT();
View Full Code Here


        assertNull(handler.scrollBar);
        assertSame(pane, handler.getScrollPane());
        ui.getPreferredSize(tree);
        assertTrue(ui.validCachedPreferredSize);
        handler.getScrollPane().getVerticalScrollBar().setValueIsAdjusting(true);
        handler.componentMoved(new ComponentEvent(tree, ComponentEvent.COMPONENT_MOVED));
        assertNotNull(handler.timer);
        assertSame(handler.scrollBar, pane.getVerticalScrollBar());
        assertEquals(200, handler.timer.getDelay());
        assertSame(handler, handler.timer.getActionListeners()[0]);
        assertTrue(handler.timer.isRunning());
View Full Code Here

            if (!fileDialog.isDisplayable()) {
                // make displayable together with owner
                fileDialog.addNotify();
            }
            ci.setVisibleFlag(fileDialog, true);
            postEvent(new ComponentEvent(fileDialog,
                                         ComponentEvent.COMPONENT_SHOWN));
            initOFN();
            boolean ok = false;
            Thread thread = Thread.currentThread();
            thread2fd.put(thread, fileDialog);

            switch (mode) {
            case FileDialog.LOAD:
                ok = (win32.GetOpenFileNameW(ofn) != 0);
                break;
            case FileDialog.SAVE:
                ok = (win32.GetSaveFileNameW(ofn) != 0);
                break;
            default:
                return;

            }
            setValues(ok);
            thread2fd.remove(thread);
            fd2win.remove(fileDialog);
            ci.setVisibleFlag(fileDialog, false);
            postEvent(new ComponentEvent(fileDialog,
                    ComponentEvent.COMPONENT_HIDDEN));
        }
    }
View Full Code Here

                handleException(e);
            }
        }
        if (jgvtListeners != null) {
            Iterator iter = jgvtListeners.iterator();
            ComponentEvent ce = new ComponentEvent
                (this, JGVTComponentListener.COMPONENT_TRANSFORM_CHANGED);
            while (iter.hasNext()) {
                JGVTComponentListener l = (JGVTComponentListener)iter.next();
                l.componentTransformChanged(ce);
            }
View Full Code Here

    }
    public void resize(ComponentOperator oper, int width, int height) {
  checkSupported(oper);
  ((WindowOperator)oper).setSize(width, height);
   eDriver.dispatchEvent(oper.getSource(),
            new ComponentEvent((Window)oper.getSource(),
                                                 ComponentEvent.COMPONENT_RESIZED));
    }
View Full Code Here

              w.validate();
              getRootPane().repaint();

            }
            getFrameWindow().dispatchEvent(
              new ComponentEvent(
                getMainWindow(),
                ComponentEvent.COMPONENT_RESIZED));
          }
        }
      }
View Full Code Here

              SkinRootPaneUI.Frame_MAXIMIZED_BOTH);
        } else if (!b) {
            SkinRootPaneUI.setExtendedState(frame,
                    Frame.NORMAL);
        }
        dispatchEvent(new ComponentEvent(frame,
            ComponentEvent.COMPONENT_RESIZED));
      } else if (dialog != null) {
        // not available for JDialog
      }
    }
View Full Code Here

                handleException(e);
            }
        }
        if (jgvtListeners != null) {
            Iterator iter = jgvtListeners.iterator();
            ComponentEvent ce = new ComponentEvent
                (this, JGVTComponentListener.COMPONENT_TRANSFORM_CHANGED);
            while (iter.hasNext()) {
                JGVTComponentListener l = (JGVTComponentListener)iter.next();
                l.componentTransformChanged(ce);
            }
View Full Code Here

                handleException(e);
            }
        }
        if (jgvtListeners != null) {
            Iterator iter = jgvtListeners.iterator();
            ComponentEvent ce = new ComponentEvent
                (this, JGVTComponentListener.COMPONENT_TRANSFORM_CHANGED);
            while (iter.hasNext()) {
                JGVTComponentListener l = (JGVTComponentListener)iter.next();
                l.componentTransformChanged(ce);
            }
View Full Code Here

            // Only post an event if this component actually has a listener
            // or has this event explicitly enabled.
            if (componentListener != null
                || (eventMask & AWTEvent.COMPONENT_EVENT_MASK) != 0)
              {
                ComponentEvent ce =
                  new ComponentEvent(this,ComponentEvent.COMPONENT_SHOWN);
                getToolkit().getSystemEventQueue().postEvent(ce);
              }
          }

        // Invalidate the parent if we have one. The component itself must
View Full Code Here

TOP

Related Classes of java.awt.event.ComponentEvent

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.