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.

Bug 93871 - Designer should rely only on design-time API for communicating size and position data to components
Summary: Designer should rely only on design-time API for communicating size and posit...
Status: NEW
Alias: None
Product: obsolete
Classification: Unclassified
Component: visualweb (show other bugs)
Version: 5.x
Hardware: PC All
: P2 blocker with 1 vote (vote)
Assignee: Winston Prakash
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-02-01 21:48 UTC by bugbridge
Modified: 2007-02-01 21:48 UTC (History)
2 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.