Skip to main content

API: 090: Proposed changes in LayoutManager3D and Container3D

2 replies [Last post]
hideya
Offline
Joined: 2003-07-22

Hi LG3D developers,

In order to implement some SceneManager feature, I'm considering the following API changes:

<br />
public class Container3D extends Component3D {<br />
    ...<br />
    public Object removeChild(int index);<br />
    ...<br />
}<br />

And accordingly,
<br />
public interface LayoutManager3D {<br />
    ...<br />
    public Object removeLayoutComponent(Component3D comp);<br />
    ...<br />
}<br />

Both methods' return type used to be "void". Now they return the "Constraints" object that represents the position of the removed comp3d in the container (i.e. if you call addChild() with the removed comp3d and the returned constraints, the comp3d is inserted back to the layout where it was).

Would it be OK with you folks?

A trickiness in this change is that it will break all the LayoutManager3D implementations. However, for those layouts that is not used by SceneManager internally, removeLayoutComponent() doesn't need to return a right value (i.e. it can just return "null").

So, when I change the API, I'll update the removeLayoutComponent() method of all the classes that implements LayoutManager3D to return "null" (including all the incubator apps) so that the CVS gets compiled successfully. For ordinally LG3D apps, no further change shouldn't be required at this moment (I'll make further announcement if it becomes mandatory in future).

Please let me know your thoughts by Aug. 7th (Mon).
Thanks in advance,

hideya

Reply viewing options

Select your preferred way to display the comments and click "Save settings" to activate your changes.
radeczka
Offline
Joined: 2004-05-12

Hi Hideya,

In BgManager I don;t usu right now removeChild() but in layout a litlle bit ;), for me everything sounds great. I feel drag'n'drop mechanism here a litlle.

Radek

hideya
Offline
Joined: 2003-07-22

Hi Radek,

Thanks for your reply!

> I feel drag'n'drop mechanism here a litlle.

Good guess ;-) I came up with the change when I was thinking a drag'n'drop like behavior in SceneManager :-)

hideya