Michael wrote: "About cloned tasks : I think they have been in
OpenJUMP for a long time.
OpenJUMP UI used to have some weird behaviour related to cloned windows,
but hopefully, this has been fixed. I do not think this is the most
important feature of OJ, but it may by useful in some situation, and it
should be cool to try to keep them (just my opinion)."

I know cloned windows is a popular feature. I will defintely work around it!

Michael wrote: "If you want to use the TaskFrame as the place to dock
everything, I
think every TaskFrameProxy will become a dockable of your TaskFrame, and
you'll have to find another name for what is actually called a TaskFrame
(ie a frame containing a LayerView, a LayerNamePanel...), and, if
possible, consider there may be several of those components in your main
TaskFrame"

I'm not sure if I quite understand this. I do want the TaskFrame to be
the parent window in the docking window tree. It will contain all of
the other windows related to the task. Right now, a lot of these
windows are added as internal frames. I don't know that I need to
change the name of the TaskFrame class. It will still be an internal
frame used to display a LayerViewPanel and a LayerNamePanel.

Michael wrote: "About Bing's method : using getTask() to compare seems
even better than
using getLayerManager as I suggested !
Just a word about the method name : as implemented, it do not really
return the "active" task, but the first TaskFrame task related to a
given plugin."

Yes, Bing's suggestion was great. Your suggestions have been helpful
to. That is one thing I really love about open source development and
our community in particular.

Michael wrote: "I would consider those methods as opssible
alternatives (just ideas to
think about)
getTaskFrameForTask(Task) if TaskFrame is the main container for every
frames related to a Task
getTaskFrameProxiesForTask(Task) to get all the actual Internal frames
related to a Task"

These are good suggestions. I will think about them.

Michael wrote: "Take my advice with caution, I do not know much about
how you want to
implement docking and I don't know InfoNode framework."

It sounds to me like you have a good handle on how things should work. :]

The Sunburned Surveyor

P.S. - I'll be making any changes tpo BizzJUMP, at least at first, so
nobody needs to worry that I'll break something in the OJ core.


On Tue, Nov 4, 2008 at 12:12 AM, Michael Michaud
<[EMAIL PROTECTED]> wrote:
> Landon,
>
> About cloned tasks : I think they have been in OpenJUMP for a long time.
> OpenJUMP UI used to have some weird behaviour related to cloned windows,
> but hopefully, this has been fixed. I do not think this is the most
> important feature of OJ, but it may by useful in some situation, and it
> should be cool to try to keep them (just my opinion).
>
> If you want to dock every frame related to a task, you should look
> javadoc of TaskFrameProxy which is the interface of components returning
> a TaskFrame :
> - TaskFrame
> - InfoFrame and PrimaryInfoFrame
> - ViewAttributePlugIn.ViewAttributeFrame
>
> If you want to use the TaskFrame as the place to dock everything, I
> think every TaskFrameProxy will become a dockable of your TaskFrame, and
> you'll have to find another name for what is actually called a TaskFrame
> (ie a frame containing a LayerView, a LayerNamePanel...), and, if
> possible, consider there may be several of those components in your main
> TaskFrame
>
> About Bing's method : using getTask() to compare seems even better than
> using getLayerManager as I suggested !
> Just a word about the method name : as implemented, it do not really
> return the "active" task, but the first TaskFrame task related to a
> given plugin.
>
> I'm not sure if you will consider TaskFrame as the Main container
> (eventually containing internal task frames, ViewAttributeFrame, InfoFrame)
> or as a dockable (taking place in a main DockingTaskFrame)
>
> I would consider those methods as opssible alternatives (just ideas to
> think about)
> getTaskFrameForTask(Task) if TaskFrame is the main container for every
> frames related to a Task
> getTaskFrameProxiesForTask(Task) to get all the actual Internal frames
> related to a Task
>
> Take my advice with caution, I do not know much about how you want to
> implement docking and I don't know InfoNode framework.
>
> Michaël
>
> Sunburned Surveyor a écrit :
>> Bing,
>>
>> All of your suggested modifications of my code are excellent, as are
>> your suggestions to add a reference to the active TaskFrame to the
>> WorkbenchContext via the internalFrameActivated callback.
>>
>> I'll wait to see if Michael and Larry have any comments. If they do
>> not, I'll create patches of my code that reflect your suggestions and
>> will ask the other programmers to review them before I commit.
>>
>> Thanks a lot for the help.
>>
>> The Sunburned Surveyor
>>
>> On Mon, Nov 3, 2008 at 8:57 PM, Bing Ran <[EMAIL PROTECTED]> wrote:
>>
>>> The PlugInContext has a reference to the task and so does the TaskFrame. So
>>> can you do this to find out the FIRST TaskFrame containing the concerned
>>> task and never worry about the titles?
>>>
>>>        public TaskFrame getTaskFrameForActiveTask(PlugInContext 
>>> pluginContext) {
>>>                WorkbenchFrame frame = 
>>> workbenchContext.getWorkbench().getFrame();
>>>                JInternalFrame[] internalFrames = frame.getInternalFrames();
>>>                for (JInternalFrame internalFrame : internalFrames) {
>>>                        if (internalFrame instanceof TaskFrame) {
>>>                                TaskFrame taskFrame = (TaskFrame) 
>>> internalFrame;
>>>                                if 
>>> (pluginContext.getTask().equals(taskFrame.getTask())) {
>>>                                        return taskFrame;
>>>                                }
>>>                        }
>>>                }
>>>                return null;
>>>        }
>>>
>>>
>>> Another thought is to make the WorkbenchContext to have a TaskFrame to keep
>>> track of the last active TaskFrame.
>>>
>>> In the InternalFrameListener in the TaskFrame constructor, add
>>>
>>>                                
>>> workbenchContext.setLastActiveTaskFrame(TaskFrame.this);
>>>
>>> in the internalFrameActivated() callback, and
>>>                                
>>> workbenchContext.setLastActiveTaskFrame(null);
>>> in the internalFrameClosed() callback.
>>>
>>> Now the WorkbenchContext will always know what the last TaskFrame is and the
>>> other existing none-TaskFrame internal frames won't interfere with this.
>>>
>>> This may also help with the TaskFrame cloning issue.
>>>
>>>
>>>
>>> Bing
>>>
>>>
>>> --------------------------------------------------
>>> From: "Sunburned Surveyor" <[EMAIL PROTECTED]>
>>> Sent: Tuesday, November 04, 2008 6:12 AM
>>> To: "OpenJump develop and use" <jump-pilot-devel@lists.sourceforge.net>
>>> Subject: [JPP-Devel] Proposal for new method of WorkbenchContext class.
>>>
>>>
>>>> I'd like to propose the attached code be added as a method of the
>>>> WorkbenchContext class. I sometimes find myself with a need to access
>>>> the active TaskFrame for the Workbench, especially when I work on the
>>>> docking window integration. Perhaps others have found a need to do
>>>> this as well.
>>>>
>>>> At any rate, any time I start to copy and paste code I get a little
>>>> nervous. This is usually a sign that I need to make a utility method.
>>>>
>>>> If people think this change is a bad idea, I'll move the method to one
>>>> of my own OpenJUMP utility classes. If you have changes or
>>>> improvements to my implementation of the method, please let me know.
>>>> If there are no objections, I will commit a patch adding the method.
>>>>
>>>> The Sunburned Surveyor
>>>>
>>>>
>>>
>>>
>>>> -------------------------------------------------------------------------
>>>> This SF.Net email is sponsored by the Moblin Your Move Developer's
>>>> challenge
>>>> Build the coolest Linux based applications with Moblin SDK & win great
>>>> prizes
>>>> Grand prize is a trip for two to an Open Source event anywhere in the
>>>> world
>>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>>>
>>>
>>>
>>>> _______________________________________________
>>>> Jump-pilot-devel mailing list
>>>> Jump-pilot-devel@lists.sourceforge.net
>>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>>>
>>>>
>>> -------------------------------------------------------------------------
>>> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
>>> Build the coolest Linux based applications with Moblin SDK & win great 
>>> prizes
>>> Grand prize is a trip for two to an Open Source event anywhere in the world
>>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>>> _______________________________________________
>>> Jump-pilot-devel mailing list
>>> Jump-pilot-devel@lists.sourceforge.net
>>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>>
>>>
>>
>> -------------------------------------------------------------------------
>> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
>> Build the coolest Linux based applications with Moblin SDK & win great prizes
>> Grand prize is a trip for two to an Open Source event anywhere in the world
>> http://moblin-contest.org/redirect.php?banner_id=100&url=/
>> _______________________________________________
>> Jump-pilot-devel mailing list
>> Jump-pilot-devel@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>>
>>
>>
>
>
> -------------------------------------------------------------------------
> This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
> Build the coolest Linux based applications with Moblin SDK & win great prizes
> Grand prize is a trip for two to an Open Source event anywhere in the world
> http://moblin-contest.org/redirect.php?banner_id=100&url=/
> _______________________________________________
> Jump-pilot-devel mailing list
> Jump-pilot-devel@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel
>

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Jump-pilot-devel mailing list
Jump-pilot-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/jump-pilot-devel

Reply via email to