Package java.awt.event

Examples of java.awt.event.ComponentEvent


                setNETWMState(net_wm_state);
            }


            if (!bounds.getSize().equals(oldBounds.getSize())) {
                postEventToEventQueue(new ComponentEvent(getEventSource(), ComponentEvent.COMPONENT_RESIZED));
            }
            if (!bounds.getLocation().equals(oldBounds.getLocation())) {
                postEventToEventQueue(new ComponentEvent(getEventSource(), ComponentEvent.COMPONENT_MOVED));
            }
        } finally {
            XToolkit.awtUnlock();
        }
    }
View Full Code Here


            else if (windowEvent.getID() == WindowEvent.WINDOW_CLOSED)
                topLevelWindowDestroyed(windowEvent.getWindow());
            else if (windowEvent.getID() == WindowEvent.WINDOW_GAINED_FOCUS)
                setWindowWithFocus(windowEvent.getWindow());
        } else if (event instanceof ComponentEvent) {
            ComponentEvent componentEvent = (ComponentEvent) event;
            if (componentEvent.getID() == ComponentEvent.COMPONENT_HIDDEN) {
                componentHidden(componentEvent);
            } else if (componentEvent.getID() == ComponentEvent.COMPONENT_SHOWN) {
                componentShown(componentEvent);
            }
        }
    }
View Full Code Here

            }
            prepare4HierarchyChange();
            visible = false;
            moveFocusOnHide();
            behaviour.setVisible(false);
            postEvent(new ComponentEvent(this, ComponentEvent.COMPONENT_HIDDEN));
            finishHierarchyChange(this, parent, 0);
            notifyInputMethod(null);
            invalidateRealParent();
        } finally {
            toolkit.unlockAWT();
View Full Code Here

        int oldH = this.h;
        setBoundsFields(x, y, w, h, bMask);
        // Moved
        if ((oldX != this.x) || (oldY != this.y)) {
            invalidateRealParent();
            postEvent(new ComponentEvent(this, ComponentEvent.COMPONENT_MOVED));
            spreadHierarchyBoundsEvents(this, HierarchyEvent.ANCESTOR_MOVED);
        }
        // Resized
        if ((oldW != this.w) || (oldH != this.h)) {
            invalidate();
            postEvent(new ComponentEvent(this, ComponentEvent.COMPONENT_RESIZED));
            spreadHierarchyBoundsEvents(this, HierarchyEvent.ANCESTOR_RESIZED);
        }
        if (updateBehavior) {
            behaviour.setBounds(this.x, this.y, this.w, this.h, bMask);
        }
View Full Code Here

            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

            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

            }
            prepare4HierarchyChange();
            visible = false;
            moveFocusOnHide();
            behaviour.setVisible(false);
            postEvent(new ComponentEvent(this, ComponentEvent.COMPONENT_HIDDEN));
            finishHierarchyChange(this, parent, 0);
            notifyInputMethod(null);
            invalidateRealParent();
        } finally {
            toolkit.unlockAWT();
View Full Code Here

        int oldH = this.h;
        setBoundsFields(x, y, w, h, bMask);
        // Moved
        if ((oldX != this.x) || (oldY != this.y)) {
            invalidateRealParent();
            postEvent(new ComponentEvent(this, ComponentEvent.COMPONENT_MOVED));
            spreadHierarchyBoundsEvents(this, HierarchyEvent.ANCESTOR_MOVED);
        }
        // Resized
        if ((oldW != this.w) || (oldH != this.h)) {
            invalidate();
            postEvent(new ComponentEvent(this, ComponentEvent.COMPONENT_RESIZED));
            spreadHierarchyBoundsEvents(this, HierarchyEvent.ANCESTOR_RESIZED);
        }
        if (updateBehavior) {
            behaviour.setBounds(this.x, this.y, this.w, this.h, bMask);
        }
View Full Code Here

            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

                setNETWMState(net_wm_state);
            }


            if (!bounds.getSize().equals(oldBounds.getSize())) {
                postEventToEventQueue(new ComponentEvent(getEventSource(), ComponentEvent.COMPONENT_RESIZED));
            }
            if (!bounds.getLocation().equals(oldBounds.getLocation())) {
                postEventToEventQueue(new ComponentEvent(getEventSource(), ComponentEvent.COMPONENT_MOVED));
            }
        } finally {
            XToolkit.awtUnlock();
        }
    }
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.