Package java.awt.event

Examples of java.awt.event.ContainerEvent


                }
            }
            if (containerListener != null ||
                (eventMask & AWTEvent.CONTAINER_EVENT_MASK) != 0 ||
                Toolkit.enabledOnToolkit(AWTEvent.CONTAINER_EVENT_MASK)) {
                ContainerEvent e = new ContainerEvent(this,
                                                      ContainerEvent.COMPONENT_ADDED,
                                                      comp);
                dispatchEvent(e);
            }
            comp.createHierarchyEvents(HierarchyEvent.HIERARCHY_CHANGED, comp,
View Full Code Here


    }
      }
            if (containerListener != null ||
                (eventMask & AWTEvent.CONTAINER_EVENT_MASK) != 0 ||
                Toolkit.enabledOnToolkit(AWTEvent.CONTAINER_EVENT_MASK)) {
                ContainerEvent e = new ContainerEvent(this,
                                     ContainerEvent.COMPONENT_ADDED,
                                     comp);
                dispatchEvent(e);
            }
View Full Code Here

            invalidateIfValid();
            if (containerListener != null ||
                (eventMask & AWTEvent.CONTAINER_EVENT_MASK) != 0 ||
                Toolkit.enabledOnToolkit(AWTEvent.CONTAINER_EVENT_MASK)) {
                ContainerEvent e = new ContainerEvent(this,
                                     ContainerEvent.COMPONENT_REMOVED,
                                     comp);
                dispatchEvent(e);
            }
View Full Code Here

    }
    comp.parent = null;
                if (containerListener != null ||
                   (eventMask & AWTEvent.CONTAINER_EVENT_MASK) != 0 ||
                    Toolkit.enabledOnToolkit(AWTEvent.CONTAINER_EVENT_MASK)) {
                    ContainerEvent e = new ContainerEvent(this,
                                     ContainerEvent.COMPONENT_REMOVED,
                                     comp);
                    dispatchEvent(e);
                }
View Full Code Here

            if (layout != null) {
                layout.removeLayoutComponent(comp);
            }
            removeFromContainer(index);
            // container events are synchronous
            dispatchEvent(new ContainerEvent(this, ContainerEvent.COMPONENT_REMOVED, comp));
        } finally {
            toolkit.unlockAWT();
        }
    }
View Full Code Here

            // calculated preferred/minimum sizes should be reset
            // because they depend on inherited font
            comp.resetDefaultSize();
            // container events are synchronous
            dispatchEvent(new ContainerEvent(this, ContainerEvent.COMPONENT_ADDED, comp));
        } finally {
            toolkit.unlockAWT();
        }
    }
View Full Code Here

    }

    public void testToolBarContListener() {
        ContainerListener l = ui.createToolBarContListener();
        Border border = b.getBorder();
        ContainerEvent e = new ContainerEvent(toolBar, ContainerEvent.COMPONENT_ADDED, b);
        l.componentAdded(e);
        assertNotSame(border, b.getBorder());
        e = new ContainerEvent(toolBar, ContainerEvent.COMPONENT_REMOVED, b);
        l.componentRemoved(e);
        assertSame(border, b.getBorder());
    }
View Full Code Here

            if (layout != null) {
                layout.removeLayoutComponent(comp);
            }
            removeFromContainer(index);
            // container events are synchronous
            dispatchEvent(new ContainerEvent(this, ContainerEvent.COMPONENT_REMOVED, comp));
        } finally {
            toolkit.unlockAWT();
        }
    }
View Full Code Here

            // calculated preferred/minimum sizes should be reset
            // because they depend on inherited font
            comp.resetDefaultSize();
            // container events are synchronous
            dispatchEvent(new ContainerEvent(this, ContainerEvent.COMPONENT_ADDED, comp));
        } finally {
            toolkit.unlockAWT();
        }
    }
View Full Code Here

            if (layout != null) {
                layout.removeLayoutComponent(comp);
            }
            removeFromContainer(index);
            // container events are synchronous
            dispatchEvent(new ContainerEvent(this, ContainerEvent.COMPONENT_REMOVED, comp));
        } finally {
            toolkit.unlockAWT();
        }
    }
View Full Code Here

TOP

Related Classes of java.awt.event.ContainerEvent

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.