Search in sources :

Example 1 with ObjEntityDisplayListener

use of org.apache.cayenne.modeler.event.ObjEntityDisplayListener in project cayenne by apache.

the class ObjEntityCallbackMethodsTab method initController.

/**
 * listeners initialization
 */
protected void initController() {
    super.initController();
    addComponentListener(new ComponentAdapter() {

        public void componentShown(ComponentEvent e) {
            rebuildTables();
        }
    });
    mediator.addObjEntityDisplayListener(new ObjEntityDisplayListener() {

        public void currentObjEntityChanged(EntityDisplayEvent e) {
            if (ObjEntityCallbackMethodsTab.this.isVisible()) {
                rebuildTables();
            }
        }
    });
}
Also used : EntityDisplayEvent(org.apache.cayenne.modeler.event.EntityDisplayEvent) ComponentEvent(java.awt.event.ComponentEvent) ComponentAdapter(java.awt.event.ComponentAdapter) ObjEntityDisplayListener(org.apache.cayenne.modeler.event.ObjEntityDisplayListener)

Aggregations

ComponentAdapter (java.awt.event.ComponentAdapter)1 ComponentEvent (java.awt.event.ComponentEvent)1 EntityDisplayEvent (org.apache.cayenne.modeler.event.EntityDisplayEvent)1 ObjEntityDisplayListener (org.apache.cayenne.modeler.event.ObjEntityDisplayListener)1