DockableFrameFactory/DockableBarFactory in one class?

This forum is used by users to request and discuss new product features. Please do not use this forum for technical support including bug reports.

Moderator: JIDE Support

Forum rules
Product suggestions only. Please do not use this forum for technical support including bug reports.

DockableFrameFactory/DockableBarFactory in one class?

Postby rhinosoft » Thu Apr 23, 2009 8:52 am

Is there a way to implement "DockableFrameFactory" and "DockableBarFactory" in one class? Currently, I cannot due to compile time errors in the NetBeans IDE.

Example:
[code]
public class DockFactory implements DockableFrameFactory, DockableBarFactory
{
public DockFactory()
{
}

@Override
public DockableFrame create(String sKey)
{
DockableFrame frame = null;
return (frame);
}

@Override
public DockableBar create(String sKey)
{
DockableBar bar = null;
return (bar);
}
}
[/code]
rhinosoft
 
Posts: 19
Joined: Fri May 16, 2008 8:43 am

Re: DockableFrameFactory/DockableBarFactory in one class?

Postby JIDE Support » Thu Apr 23, 2009 9:30 am

You cannot do that as both method names are the same.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am

Re: DockableFrameFactory/DockableBarFactory in one class?

Postby rhinosoft » Thu Apr 23, 2009 10:13 am

I can do this alternative, but I prefer the other method. I understand that it would be too much trouble to change the interface b/c then all customers would have to change their code. But I thought I would ask in any case. Thanks.

[code]
public class DockFactory
{
public DockFactory()
{
DockableFrameFactory frameFactory = new DockFrameFactory() {
@Override
public DockableFrame create(String sKey)
{
DockableFrame frame = null;
return (frame);
}
};

DockableBarFactory barFactory = new DockBaractory() {
@Override
public DockableBar create(String sKey)
{
DockableBar bar = null;
return (bar);
}
};
}
}
[/code]
rhinosoft
 
Posts: 19
Joined: Fri May 16, 2008 8:43 am

Re: DockableFrameFactory/DockableBarFactory in one class?

Postby JIDE Support » Thu Apr 23, 2009 10:30 am

That's true. We probably should give a different method name initially but now it is too late to change.

Thanks,
JIDE Software Technical Support Team
JIDE Support
Site Admin
 
Posts: 37219
Joined: Sun Sep 14, 2003 10:49 am


Return to Product Suggestions

Who is online

Users browsing this forum: No registered users and 7 guests

cron