This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.
|Summary:||Designer should rely only on design-time API for communicating size and position data to components|
|Component:||visualweb||Assignee:||Winston Prakash <wjprakash>|
|Issue Type:||ENHANCEMENT||Exception Reporter:|
Description bugbridge 2007-02-01 21:48:01 UTC
Description: Currently, when a component is moved (in absolute positioning mode) or resized (in absolute or flow mode) on the designer, the designer translates the new size and position information into CSS settings, and adds these settings directly to the component's style property. This design is awkward. Components may not have a style property, but they may have other means of persisting this information (e.g. as separate size and position properties). Components may also need to know about these size and position change events, so that they can update the properties of child or faceted components. As an alternative, I propose that we enhance the design-time API with handler methods for these size and position change events. A few suggestions: 1). Extend DesignProperty to a new interface, StyleDesignProperty. This property must be of type string, and should contain only a series of CSS style declarations. The designer would use this property to store CSS settings. The component, in turn, could listen for changes on this property if it needed to take additional actions when size and position change events took place. 2). Add a new listener, DesignBoxListener, which contains methods that are invoked when the box size is changed or when the box is moved. Evaluation: Yes, sounds relevant, passing to designtime to provide such API first.