/** * Create a new instance of <code>FrameComponent</code>. * * @param name The component name. * @param view The view the frame encloses. * @param gui The event handler. */ public FrameComponent(String name, View2DCell view, Gui2D gui) { this.name = name; this.view = view; this.gui = gui; controlArb = view.getWindow().getApp().getControlArb(); initEntity(); }
/** Initialize this component's entity. */ protected void initEntity() { // Create this component's entity and parent it entity = new Entity("Entity for frame component " + name); // Create this component scene graph (l2c -> geometry) initSceneGraph(); // Make the entity pickable View2DCell.entityMakePickable(entity); // Attach gui event listeners for this component if (gui != null) { gui.attachEventListeners(entity); } attachToParentEntity(); }