Discussion:
Programatically enable auto hide for a TopComponent
Mathias Henze
2005-03-14 13:44:23 UTC
Permalink
Hello there

Is it possible to programatically change a TopComponent to auto-hide mode or
open it accordingly. We have an application that opens several TopComponents
when a file is opened, but we want the user to stay focused to the main
editor.

We would like to open some of the additional TopComponents directly in
hidden (just the opener-button visible) and some others ideally to pop up
for a short amount of time and then slide to auto hide.

Is this (partially) possible? Where can I find information about how to
archieve this functionality?
I am using Netbeans Platform 4.1 Beta.

Many thanks in advance!

Regards
Mathias

---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler

phone: ++49 (0)89 651295-30
mail : ***@artis-group.com
http://www.artis-group.com
Milos Kleint
2005-03-14 13:29:18 UTC
Permalink
declare your topcomponents to be inside one of the sliding mode, The
names for the modes are : leftSlidingMode, rightSlidingMode and
bottomSlidingMode I think.
You can double check by moving the components inside the slide bar and
then exit ide and examining the
${netbeans.userdir}/config/Windows2Local/Modes directory.

to have a component slided into desktop for some time and then hide it
could be more problematic. You propably want to make that component
selected (in the slidebar context, it means the components shows itself
completely, and then deselect it.

Regards

Milos Kleint
Post by Mathias Henze
Hello there
Is it possible to programatically change a TopComponent to auto-hide mode or
open it accordingly. We have an application that opens several TopComponents
when a file is opened, but we want the user to stay focused to the main
editor.
We would like to open some of the additional TopComponents directly in
hidden (just the opener-button visible) and some others ideally to pop up
for a short amount of time and then slide to auto hide.
Is this (partially) possible? Where can I find information about how to
archieve this functionality?
I am using Netbeans Platform 4.1 Beta.
Many thanks in advance!
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
Mathias Henze
2005-03-14 15:36:06 UTC
Permalink
This post might be inappropriate. Click to display it.
Mathias Henze
2005-03-14 16:57:44 UTC
Permalink
Hmmm

After some more playing around I noticed that this solution unfortunatly
does not work like expected. The sliding components seem not to dock into
the modes where they were originally docked. :(

Can I set something like a preferred docking mode to dock to, when the user
clicks on the [o]-Symbol?

Regards
Mathias


---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler

phone: ++49 (0)89 651295-30
mail : ***@artis-group.com
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 16:36
Betreff: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
Thanks very much, It's working!
I've checked Windows2Local like you suggested and the modes are called
"Side" in this case (eg. leftSlidingSide, rightSlidingSide, etc.)
As for the temporarily visible TopComponent I just use
component.requestActive() for the time being, since it vanishes anyway, if
the user clicks into the editor.
The only thing is, that I have to dock the components into the desired
dockingMode= WindowManager.getDefault().findMode("tabbed");
if(dockingMode!=null)
{
dockingMode.dockInto(component);
}
component.open();
component.close();
rightSlidingMode.dockInto(component);
component.open();
Is there a "cleaner" way to do it? To clearify: if I don't open the
component temporarily in my "tabbed" mode, they dock to the bottom
automatically and if I dock them to the side in opened state they just
disappear...
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 14:29
Betreff: Re: [openide-dev] Programatically enable auto hide for a
TopComponent
declare your topcomponents to be inside one of the sliding mode, The
names for the modes are : leftSlidingMode, rightSlidingMode and
bottomSlidingMode I think.
You can double check by moving the components inside the slide bar and
then exit ide and examining the
${netbeans.userdir}/config/Windows2Local/Modes directory.
to have a component slided into desktop for some time and then hide it
could be more problematic. You propably want to make that component
selected (in the slidebar context, it means the components shows itself
completely, and then deselect it.
Regards
Milos Kleint
Post by Mathias Henze
Hello there
Is it possible to programatically change a TopComponent to
auto-hide mode or
Post by Mathias Henze
open it accordingly. We have an application that opens several
TopComponents
Post by Mathias Henze
when a file is opened, but we want the user to stay focused to the main
editor.
We would like to open some of the additional TopComponents directly in
hidden (just the opener-button visible) and some others
ideally to pop up
Post by Mathias Henze
for a short amount of time and then slide to auto hide.
Is this (partially) possible? Where can I find information about how to
archieve this functionality?
I am using Netbeans Platform 4.1 Beta.
Many thanks in advance!
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
Mathias Henze
2005-03-15 11:07:38 UTC
Permalink
Hello again

It seems that there is no official way to archieve my goal. I have found the
things to be done in Central.userEnabledAutohide(), but unfortunatly it is
not accessible from the API.

So the question is:
What has to be done to be able to use implementation classes from my module?

I get a "java.lang.NoClassDefFoundError:
org/netbeans/core/windows/WindowManagerImpl" trying to call
WindowManagerImpl.getDefault(), so specifying a Module-Module dependency to
org.netbeans.core.windows/2 obviously does not suffice...

This should imho be integrated into Mode.dockInto(), since an
application/module-developer should not mess with the window system
implementation ;)

ModeImpl could call

model.setModeTopComponentPreviousMode(targetMode, tc, source);
model.setModeTopComponentPreviousConstraints(targetMode, tc,
model.getModeConstraints(source));

To allow that, Central could be extended with a getModel()-method, so
dockInto() can use ModeImpl.getCentral().getModel() to acquire the Model...

Regards
Mathias

---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler

phone: ++49 (0)89 651295-30
mail : ***@artis-group.com
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 17:58
Betreff: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
Hmmm
After some more playing around I noticed that this solution unfortunatly
does not work like expected. The sliding components seem not to dock into
the modes where they were originally docked. :(
Can I set something like a preferred docking mode to dock to,
when the user
clicks on the [o]-Symbol?
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 16:36
Betreff: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
Thanks very much, It's working!
I've checked Windows2Local like you suggested and the modes are called
"Side" in this case (eg. leftSlidingSide, rightSlidingSide, etc.)
As for the temporarily visible TopComponent I just use
component.requestActive() for the time being, since it vanishes
anyway, if
the user clicks into the editor.
The only thing is, that I have to dock the components into the desired
dockingMode= WindowManager.getDefault().findMode("tabbed");
if(dockingMode!=null)
{
dockingMode.dockInto(component);
}
component.open();
component.close();
rightSlidingMode.dockInto(component);
component.open();
Is there a "cleaner" way to do it? To clearify: if I don't open the
component temporarily in my "tabbed" mode, they dock to the bottom
automatically and if I dock them to the side in opened state they just
disappear...
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 14:29
Betreff: Re: [openide-dev] Programatically enable auto hide for a
TopComponent
declare your topcomponents to be inside one of the sliding mode, The
names for the modes are : leftSlidingMode, rightSlidingMode and
bottomSlidingMode I think.
You can double check by moving the components inside the slide bar and
then exit ide and examining the
${netbeans.userdir}/config/Windows2Local/Modes directory.
to have a component slided into desktop for some time and then hide it
could be more problematic. You propably want to make that component
selected (in the slidebar context, it means the components
shows itself
completely, and then deselect it.
Regards
Milos Kleint
Post by Mathias Henze
Hello there
Is it possible to programatically change a TopComponent to
auto-hide mode or
Post by Mathias Henze
open it accordingly. We have an application that opens several
TopComponents
Post by Mathias Henze
when a file is opened, but we want the user to stay focused
to the main
Post by Mathias Henze
editor.
We would like to open some of the additional TopComponents
directly in
Post by Mathias Henze
hidden (just the opener-button visible) and some others
ideally to pop up
Post by Mathias Henze
for a short amount of time and then slide to auto hide.
Is this (partially) possible? Where can I find information
about how to
Post by Mathias Henze
archieve this functionality?
I am using Netbeans Platform 4.1 Beta.
Many thanks in advance!
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
Milos Kleint
2005-03-15 12:12:39 UTC
Permalink
I've replied to you yesterday but the response got lost somewhere.
reposting:

hmmm..

the wstcref file of the topcomponent has an attribute previousMode
which should do exactly that.. again declaratively, you ought not be
required to do any dockInto() calls.

eg.
<tc-ref version="2.1">
<tc-id id="favorites" />
<state opened="true" />
<previousMode name="explorer" />
</tc-ref>

hope that helps. If not we would have to resort to some workaround or
addition to APIs.

regards.

Milos
Post by Mathias Henze
Hello again
It seems that there is no official way to archieve my goal. I have found the
things to be done in Central.userEnabledAutohide(), but unfortunatly it is
not accessible from the API.
What has to be done to be able to use implementation classes from my module?
org/netbeans/core/windows/WindowManagerImpl" trying to call
WindowManagerImpl.getDefault(), so specifying a Module-Module dependency to
org.netbeans.core.windows/2 obviously does not suffice...
This should imho be integrated into Mode.dockInto(), since an
application/module-developer should not mess with the window system
implementation ;)
ModeImpl could call
model.setModeTopComponentPreviousMode(targetMode, tc, source);
model.setModeTopComponentPreviousConstraints(targetMode, tc,
model.getModeConstraints(source));
To allow that, Central could be extended with a getModel()-method, so
dockInto() can use ModeImpl.getCentral().getModel() to acquire the Model...
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 17:58
Betreff: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
Hmmm
After some more playing around I noticed that this solution unfortunatly
does not work like expected. The sliding components seem not to dock into
the modes where they were originally docked. :(
Can I set something like a preferred docking mode to dock to,
when the user
clicks on the [o]-Symbol?
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 16:36
Betreff: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
Thanks very much, It's working!
I've checked Windows2Local like you suggested and the modes are called
"Side" in this case (eg. leftSlidingSide, rightSlidingSide, etc.)
As for the temporarily visible TopComponent I just use
component.requestActive() for the time being, since it vanishes
anyway, if
the user clicks into the editor.
The only thing is, that I have to dock the components into the desired
dockingMode= WindowManager.getDefault().findMode("tabbed");
if(dockingMode!=null)
{
dockingMode.dockInto(component);
}
component.open();
component.close();
rightSlidingMode.dockInto(component);
component.open();
Is there a "cleaner" way to do it? To clearify: if I don't open the
component temporarily in my "tabbed" mode, they dock to the bottom
automatically and if I dock them to the side in opened state they just
disappear...
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 14:29
Betreff: Re: [openide-dev] Programatically enable auto hide for a
TopComponent
declare your topcomponents to be inside one of the sliding mode, The
names for the modes are : leftSlidingMode, rightSlidingMode and
bottomSlidingMode I think.
You can double check by moving the components inside the slide bar and
then exit ide and examining the
${netbeans.userdir}/config/Windows2Local/Modes directory.
to have a component slided into desktop for some time and then hide it
could be more problematic. You propably want to make that component
selected (in the slidebar context, it means the components
shows itself
completely, and then deselect it.
Regards
Milos Kleint
Post by Mathias Henze
Hello there
Is it possible to programatically change a TopComponent to
auto-hide mode or
Post by Mathias Henze
open it accordingly. We have an application that opens several
TopComponents
Post by Mathias Henze
when a file is opened, but we want the user to stay focused
to the main
Post by Mathias Henze
editor.
We would like to open some of the additional TopComponents
directly in
Post by Mathias Henze
hidden (just the opener-button visible) and some others
ideally to pop up
Post by Mathias Henze
for a short amount of time and then slide to auto hide.
Is this (partially) possible? Where can I find information
about how to
Post by Mathias Henze
archieve this functionality?
I am using Netbeans Platform 4.1 Beta.
Many thanks in advance!
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
Mathias Henze
2005-03-15 13:33:51 UTC
Permalink
Thanks for your reply.

I have to open the topcomponent along with our main editor. I think I have
to take a look at TopComponent-Groups for that to avoid dockInto()...

For a transitional workaround: Is there any way to access the
WindowManagerImpl without getting the NoClassDefFoundError?

Regards
Mathias

---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler

phone: ++49 (0)89 651295-30
mail : ***@artis-group.com
http://www.artis-group.com
-----Ursprüngliche Nachricht-----
Gesendet: Dienstag, 15. März 2005 13:13
Betreff: Re: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
I've replied to you yesterday but the response got lost somewhere.
hmmm..
the wstcref file of the topcomponent has an attribute previousMode
which should do exactly that.. again declaratively, you ought not be
required to do any dockInto() calls.
eg.
<tc-ref version="2.1">
<tc-id id="favorites" />
<state opened="true" />
<previousMode name="explorer" />
</tc-ref>
hope that helps. If not we would have to resort to some workaround or
addition to APIs.
regards.
Milos
Post by Mathias Henze
Hello again
It seems that there is no official way to archieve my goal. I
have found the
Post by Mathias Henze
things to be done in Central.userEnabledAutohide(), but
unfortunatly it is
Post by Mathias Henze
not accessible from the API.
What has to be done to be able to use implementation classes
from my module?
Post by Mathias Henze
org/netbeans/core/windows/WindowManagerImpl" trying to call
WindowManagerImpl.getDefault(), so specifying a Module-Module
dependency to
Post by Mathias Henze
org.netbeans.core.windows/2 obviously does not suffice...
This should imho be integrated into Mode.dockInto(), since an
application/module-developer should not mess with the window system
implementation ;)
ModeImpl could call
model.setModeTopComponentPreviousMode(targetMode, tc, source);
model.setModeTopComponentPreviousConstraints(targetMode, tc,
model.getModeConstraints(source));
To allow that, Central could be extended with a getModel()-method, so
dockInto() can use ModeImpl.getCentral().getModel() to acquire
the Model...
Post by Mathias Henze
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 17:58
Betreff: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
Hmmm
After some more playing around I noticed that this solution unfortunatly
does not work like expected. The sliding components seem not to
dock into
Post by Mathias Henze
the modes where they were originally docked. :(
Can I set something like a preferred docking mode to dock to,
when the user
clicks on the [o]-Symbol?
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 16:36
Betreff: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
Thanks very much, It's working!
I've checked Windows2Local like you suggested and the modes are called
"Side" in this case (eg. leftSlidingSide, rightSlidingSide, etc.)
As for the temporarily visible TopComponent I just use
component.requestActive() for the time being, since it vanishes
anyway, if
the user clicks into the editor.
The only thing is, that I have to dock the components into the desired
dockingMode= WindowManager.getDefault().findMode("tabbed");
if(dockingMode!=null)
{
dockingMode.dockInto(component);
}
component.open();
component.close();
rightSlidingMode.dockInto(component);
component.open();
Is there a "cleaner" way to do it? To clearify: if I don't open the
component temporarily in my "tabbed" mode, they dock to the bottom
automatically and if I dock them to the side in opened state they just
disappear...
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 14:29
Betreff: Re: [openide-dev] Programatically enable auto hide for a
TopComponent
declare your topcomponents to be inside one of the sliding mode, The
names for the modes are : leftSlidingMode, rightSlidingMode and
bottomSlidingMode I think.
You can double check by moving the components inside the slide bar and
then exit ide and examining the
${netbeans.userdir}/config/Windows2Local/Modes directory.
to have a component slided into desktop for some time and then hide it
could be more problematic. You propably want to make that component
selected (in the slidebar context, it means the components
shows itself
completely, and then deselect it.
Regards
Milos Kleint
Post by Mathias Henze
Hello there
Is it possible to programatically change a TopComponent to
auto-hide mode or
Post by Mathias Henze
open it accordingly. We have an application that opens several
TopComponents
Post by Mathias Henze
when a file is opened, but we want the user to stay focused
to the main
Post by Mathias Henze
editor.
We would like to open some of the additional TopComponents
directly in
Post by Mathias Henze
hidden (just the opener-button visible) and some others
ideally to pop up
Post by Mathias Henze
for a short amount of time and then slide to auto hide.
Is this (partially) possible? Where can I find information
about how to
Post by Mathias Henze
archieve this functionality?
I am using Netbeans Platform 4.1 Beta.
Many thanks in advance!
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
Milos Kleint
2005-03-15 13:19:28 UTC
Permalink
Post by Mathias Henze
Thanks for your reply.
I have to open the topcomponent along with our main editor. I think I have
to take a look at TopComponent-Groups for that to avoid dockInto()...
cannot you just call open() on the particular TC without calling the
dockInto() method? since the docking information is declaratively
specified, it should open it in the correct mode on open() - the sliding
mode in your case.

the window groups could help if you need to open and close the windows
based on activation of another TC..
Post by Mathias Henze
For a transitional workaround: Is there any way to access the
WindowManagerImpl without getting the NoClassDefFoundError?
create an implementation dependency on core/windows module. (depending
on specification version does not work as the windows module doens't
provide any public API.
then it should work I believe.

milos
Post by Mathias Henze
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprüngliche Nachricht-----
Gesendet: Dienstag, 15. März 2005 13:13
Betreff: Re: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
I've replied to you yesterday but the response got lost somewhere.
hmmm..
the wstcref file of the topcomponent has an attribute previousMode
which should do exactly that.. again declaratively, you ought not be
required to do any dockInto() calls.
eg.
<tc-ref version="2.1">
<tc-id id="favorites" />
<state opened="true" />
<previousMode name="explorer" />
</tc-ref>
hope that helps. If not we would have to resort to some workaround or
addition to APIs.
regards.
Milos
Post by Mathias Henze
Hello again
It seems that there is no official way to archieve my goal. I
have found the
Post by Mathias Henze
things to be done in Central.userEnabledAutohide(), but
unfortunatly it is
Post by Mathias Henze
not accessible from the API.
What has to be done to be able to use implementation classes
from my module?
Post by Mathias Henze
org/netbeans/core/windows/WindowManagerImpl" trying to call
WindowManagerImpl.getDefault(), so specifying a Module-Module
dependency to
Post by Mathias Henze
org.netbeans.core.windows/2 obviously does not suffice...
This should imho be integrated into Mode.dockInto(), since an
application/module-developer should not mess with the window system
implementation ;)
ModeImpl could call
model.setModeTopComponentPreviousMode(targetMode, tc, source);
model.setModeTopComponentPreviousConstraints(targetMode, tc,
model.getModeConstraints(source));
To allow that, Central could be extended with a getModel()-method, so
dockInto() can use ModeImpl.getCentral().getModel() to acquire
the Model...
Post by Mathias Henze
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 17:58
Betreff: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
Hmmm
After some more playing around I noticed that this solution unfortunatly
does not work like expected. The sliding components seem not to
dock into
Post by Mathias Henze
the modes where they were originally docked. :(
Can I set something like a preferred docking mode to dock to,
when the user
clicks on the [o]-Symbol?
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 16:36
Betreff: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
Thanks very much, It's working!
I've checked Windows2Local like you suggested and the modes are called
"Side" in this case (eg. leftSlidingSide, rightSlidingSide, etc.)
As for the temporarily visible TopComponent I just use
component.requestActive() for the time being, since it vanishes
anyway, if
the user clicks into the editor.
The only thing is, that I have to dock the components into the desired
dockingMode= WindowManager.getDefault().findMode("tabbed");
if(dockingMode!=null)
{
dockingMode.dockInto(component);
}
component.open();
component.close();
rightSlidingMode.dockInto(component);
component.open();
Is there a "cleaner" way to do it? To clearify: if I don't open the
component temporarily in my "tabbed" mode, they dock to the bottom
automatically and if I dock them to the side in opened state they just
disappear...
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 14:29
Betreff: Re: [openide-dev] Programatically enable auto hide for a
TopComponent
declare your topcomponents to be inside one of the sliding mode, The
names for the modes are : leftSlidingMode, rightSlidingMode and
bottomSlidingMode I think.
You can double check by moving the components inside the slide bar and
then exit ide and examining the
${netbeans.userdir}/config/Windows2Local/Modes directory.
to have a component slided into desktop for some time and then hide it
could be more problematic. You propably want to make that component
selected (in the slidebar context, it means the components
shows itself
completely, and then deselect it.
Regards
Milos Kleint
Post by Mathias Henze
Hello there
Is it possible to programatically change a TopComponent to
auto-hide mode or
Post by Mathias Henze
open it accordingly. We have an application that opens several
TopComponents
Post by Mathias Henze
when a file is opened, but we want the user to stay focused
to the main
Post by Mathias Henze
editor.
We would like to open some of the additional TopComponents
directly in
Post by Mathias Henze
hidden (just the opener-button visible) and some others
ideally to pop up
Post by Mathias Henze
for a short amount of time and then slide to auto hide.
Is this (partially) possible? Where can I find information
about how to
Post by Mathias Henze
archieve this functionality?
I am using Netbeans Platform 4.1 Beta.
Many thanks in advance!
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
Mathias Henze
2005-03-15 14:48:03 UTC
Permalink
Post by Mathias Henze
Post by Mathias Henze
I have to open the topcomponent along with our main editor. I
think I have
Post by Mathias Henze
to take a look at TopComponent-Groups for that to avoid dockInto()...
cannot you just call open() on the particular TC without calling the
dockInto() method? since the docking information is declaratively
specified, it should open it in the correct mode on open() - the sliding
mode in your case.
You were right, I was missing the obvious :-/ It works now.
Thanks!

Regards Mathias

---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler

phone: ++49 (0)89 651295-30
mail : ***@artis-group.com
http://www.artis-group.com
Milos Kleint
2005-03-14 16:59:43 UTC
Permalink
hmmm..

the wstcref file of the topcomponent has an attribute previousMode
which should do exactly that.. again declaratively, you ought not be
required to do any dockInto() calls.

eg.
<tc-ref version="2.1">
<tc-id id="favorites" />
<state opened="true" />
<previousMode name="explorer" />
</tc-ref>

hope that helps.

Milos Kleint
Post by Mathias Henze
Hmmm
After some more playing around I noticed that this solution unfortunatly
does not work like expected. The sliding components seem not to dock into
the modes where they were originally docked. :(
Can I set something like a preferred docking mode to dock to, when the user
clicks on the [o]-Symbol?
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 16:36
Betreff: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
Thanks very much, It's working!
I've checked Windows2Local like you suggested and the modes are called
"Side" in this case (eg. leftSlidingSide, rightSlidingSide, etc.)
As for the temporarily visible TopComponent I just use
component.requestActive() for the time being, since it vanishes anyway, if
the user clicks into the editor.
The only thing is, that I have to dock the components into the desired
dockingMode= WindowManager.getDefault().findMode("tabbed");
if(dockingMode!=null)
{
dockingMode.dockInto(component);
}
component.open();
component.close();
rightSlidingMode.dockInto(component);
component.open();
Is there a "cleaner" way to do it? To clearify: if I don't open the
component temporarily in my "tabbed" mode, they dock to the bottom
automatically and if I dock them to the side in opened state they just
disappear...
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 14:29
Betreff: Re: [openide-dev] Programatically enable auto hide for a
TopComponent
declare your topcomponents to be inside one of the sliding mode, The
names for the modes are : leftSlidingMode, rightSlidingMode and
bottomSlidingMode I think.
You can double check by moving the components inside the slide bar and
then exit ide and examining the
${netbeans.userdir}/config/Windows2Local/Modes directory.
to have a component slided into desktop for some time and then hide it
could be more problematic. You propably want to make that component
selected (in the slidebar context, it means the components shows itself
completely, and then deselect it.
Regards
Milos Kleint
Post by Mathias Henze
Hello there
Is it possible to programatically change a TopComponent to
auto-hide mode or
Post by Mathias Henze
open it accordingly. We have an application that opens several
TopComponents
Post by Mathias Henze
when a file is opened, but we want the user to stay focused to the main
editor.
We would like to open some of the additional TopComponents directly in
hidden (just the opener-button visible) and some others
ideally to pop up
Post by Mathias Henze
for a short amount of time and then slide to auto hide.
Is this (partially) possible? Where can I find information about how to
archieve this functionality?
I am using Netbeans Platform 4.1 Beta.
Many thanks in advance!
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
Mathias Henze
2005-03-16 09:21:37 UTC
Permalink
Hello

I tried that solution and it seemed to work, but after I close the
TopComponents programatically they open in the editor mode the next time I
call open on them.

Any idea what can cause this behaviour? These TopComonents are (patched for
AWT-Thread synchronicity) ExplorerPanels because of historical reason, so
might that be a problem?

Regards
Mathias


---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler

phone: ++49 (0)89 651295-30
mail : ***@artis-group.com
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 18:00
Betreff: Re: [openide-dev] Programatically enable auto hide for a
TopComponent
hmmm..
the wstcref file of the topcomponent has an attribute previousMode
which should do exactly that.. again declaratively, you ought not be
required to do any dockInto() calls.
eg.
<tc-ref version="2.1">
<tc-id id="favorites" />
<state opened="true" />
<previousMode name="explorer" />
</tc-ref>
hope that helps.
Milos Kleint
On Mon, 14 Mar 2005 17:57:44 +0100, Mathias Henze
Post by Mathias Henze
Hmmm
After some more playing around I noticed that this solution unfortunatly
does not work like expected. The sliding components seem not to
dock into
Post by Mathias Henze
the modes where they were originally docked. :(
Can I set something like a preferred docking mode to dock to,
when the user
Post by Mathias Henze
clicks on the [o]-Symbol?
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 16:36
Betreff: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
Thanks very much, It's working!
I've checked Windows2Local like you suggested and the modes are called
"Side" in this case (eg. leftSlidingSide, rightSlidingSide, etc.)
As for the temporarily visible TopComponent I just use
component.requestActive() for the time being, since it
vanishes anyway, if
Post by Mathias Henze
the user clicks into the editor.
The only thing is, that I have to dock the components into the desired
dockingMode= WindowManager.getDefault().findMode("tabbed");
if(dockingMode!=null)
{
dockingMode.dockInto(component);
}
component.open();
component.close();
rightSlidingMode.dockInto(component);
component.open();
Is there a "cleaner" way to do it? To clearify: if I don't open the
component temporarily in my "tabbed" mode, they dock to the bottom
automatically and if I dock them to the side in opened state they just
disappear...
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 14:29
Betreff: Re: [openide-dev] Programatically enable auto hide for a
TopComponent
declare your topcomponents to be inside one of the sliding mode, The
names for the modes are : leftSlidingMode, rightSlidingMode and
bottomSlidingMode I think.
You can double check by moving the components inside the
slide bar and
Post by Mathias Henze
then exit ide and examining the
${netbeans.userdir}/config/Windows2Local/Modes directory.
to have a component slided into desktop for some time and
then hide it
Post by Mathias Henze
could be more problematic. You propably want to make that component
selected (in the slidebar context, it means the components
shows itself
Post by Mathias Henze
completely, and then deselect it.
Regards
Milos Kleint
Post by Mathias Henze
Hello there
Is it possible to programatically change a TopComponent to
auto-hide mode or
Post by Mathias Henze
open it accordingly. We have an application that opens several
TopComponents
Post by Mathias Henze
when a file is opened, but we want the user to stay
focused to the main
Post by Mathias Henze
Post by Mathias Henze
editor.
We would like to open some of the additional TopComponents
directly in
Post by Mathias Henze
Post by Mathias Henze
hidden (just the opener-button visible) and some others
ideally to pop up
Post by Mathias Henze
for a short amount of time and then slide to auto hide.
Is this (partially) possible? Where can I find information
about how to
Post by Mathias Henze
Post by Mathias Henze
archieve this functionality?
I am using Netbeans Platform 4.1 Beta.
Many thanks in advance!
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
Milos Kleint
2005-03-16 09:05:14 UTC
Permalink
no idea, it could be a bug. as far as I know we don't have this kind of
usecase in the IDE.
what is your component's persistance type? it ought to be ALWAYS.
NEVER or WHEN_OPENED could result in this kind of behaviour.

Regards

Milos
Post by Mathias Henze
Hello
I tried that solution and it seemed to work, but after I close the
TopComponents programatically they open in the editor mode the next time I
call open on them.
Any idea what can cause this behaviour? These TopComonents are (patched for
AWT-Thread synchronicity) ExplorerPanels because of historical reason, so
might that be a problem?
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 18:00
Betreff: Re: [openide-dev] Programatically enable auto hide for a
TopComponent
hmmm..
the wstcref file of the topcomponent has an attribute previousMode
which should do exactly that.. again declaratively, you ought not be
required to do any dockInto() calls.
eg.
<tc-ref version="2.1">
<tc-id id="favorites" />
<state opened="true" />
<previousMode name="explorer" />
</tc-ref>
hope that helps.
Milos Kleint
On Mon, 14 Mar 2005 17:57:44 +0100, Mathias Henze
Post by Mathias Henze
Hmmm
After some more playing around I noticed that this solution unfortunatly
does not work like expected. The sliding components seem not to
dock into
Post by Mathias Henze
the modes where they were originally docked. :(
Can I set something like a preferred docking mode to dock to,
when the user
Post by Mathias Henze
clicks on the [o]-Symbol?
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 16:36
Betreff: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
Thanks very much, It's working!
I've checked Windows2Local like you suggested and the modes are called
"Side" in this case (eg. leftSlidingSide, rightSlidingSide, etc.)
As for the temporarily visible TopComponent I just use
component.requestActive() for the time being, since it
vanishes anyway, if
Post by Mathias Henze
the user clicks into the editor.
The only thing is, that I have to dock the components into the desired
dockingMode= WindowManager.getDefault().findMode("tabbed");
if(dockingMode!=null)
{
dockingMode.dockInto(component);
}
component.open();
component.close();
rightSlidingMode.dockInto(component);
component.open();
Is there a "cleaner" way to do it? To clearify: if I don't open the
component temporarily in my "tabbed" mode, they dock to the bottom
automatically and if I dock them to the side in opened state they just
disappear...
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 14:29
Betreff: Re: [openide-dev] Programatically enable auto hide for a
TopComponent
declare your topcomponents to be inside one of the sliding mode, The
names for the modes are : leftSlidingMode, rightSlidingMode and
bottomSlidingMode I think.
You can double check by moving the components inside the
slide bar and
Post by Mathias Henze
then exit ide and examining the
${netbeans.userdir}/config/Windows2Local/Modes directory.
to have a component slided into desktop for some time and
then hide it
Post by Mathias Henze
could be more problematic. You propably want to make that component
selected (in the slidebar context, it means the components
shows itself
Post by Mathias Henze
completely, and then deselect it.
Regards
Milos Kleint
Post by Mathias Henze
Hello there
Is it possible to programatically change a TopComponent to
auto-hide mode or
Post by Mathias Henze
open it accordingly. We have an application that opens several
TopComponents
Post by Mathias Henze
when a file is opened, but we want the user to stay
focused to the main
Post by Mathias Henze
Post by Mathias Henze
editor.
We would like to open some of the additional TopComponents
directly in
Post by Mathias Henze
Post by Mathias Henze
hidden (just the opener-button visible) and some others
ideally to pop up
Post by Mathias Henze
for a short amount of time and then slide to auto hide.
Is this (partially) possible? Where can I find information
about how to
Post by Mathias Henze
Post by Mathias Henze
archieve this functionality?
I am using Netbeans Platform 4.1 Beta.
Many thanks in advance!
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
Mathias Henze
2005-03-16 10:42:58 UTC
Permalink
I suspected something like that... We use PersistenceType NEVER. I will
investigate further if I have the time and post the outcome.

Thanks!

Regards Mathias


---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler

phone: ++49 (0)89 651295-30
mail : ***@artis-group.com
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Mittwoch, 16. Marz 2005 10:05
Betreff: Re: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
no idea, it could be a bug. as far as I know we don't have this kind of
usecase in the IDE.
what is your component's persistance type? it ought to be ALWAYS.
NEVER or WHEN_OPENED could result in this kind of behaviour.
Regards
Milos
Post by Mathias Henze
Hello
I tried that solution and it seemed to work, but after I close the
TopComponents programatically they open in the editor mode the
next time I
Post by Mathias Henze
call open on them.
Any idea what can cause this behaviour? These TopComonents are
(patched for
Post by Mathias Henze
AWT-Thread synchronicity) ExplorerPanels because of historical reason, so
might that be a problem?
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 18:00
Betreff: Re: [openide-dev] Programatically enable auto hide for a
TopComponent
hmmm..
the wstcref file of the topcomponent has an attribute previousMode
which should do exactly that.. again declaratively, you ought not be
required to do any dockInto() calls.
eg.
<tc-ref version="2.1">
<tc-id id="favorites" />
<state opened="true" />
<previousMode name="explorer" />
</tc-ref>
hope that helps.
Milos Kleint
On Mon, 14 Mar 2005 17:57:44 +0100, Mathias Henze
Post by Mathias Henze
Hmmm
After some more playing around I noticed that this solution
unfortunatly
Post by Mathias Henze
Post by Mathias Henze
does not work like expected. The sliding components seem not to
dock into
Post by Mathias Henze
the modes where they were originally docked. :(
Can I set something like a preferred docking mode to dock to,
when the user
Post by Mathias Henze
clicks on the [o]-Symbol?
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 16:36
Betreff: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
Thanks very much, It's working!
I've checked Windows2Local like you suggested and the modes are called
"Side" in this case (eg. leftSlidingSide, rightSlidingSide, etc.)
As for the temporarily visible TopComponent I just use
component.requestActive() for the time being, since it
vanishes anyway, if
Post by Mathias Henze
the user clicks into the editor.
The only thing is, that I have to dock the components into the desired
dockingMode= WindowManager.getDefault().findMode("tabbed");
if(dockingMode!=null)
{
dockingMode.dockInto(component);
}
component.open();
component.close();
rightSlidingMode.dockInto(component);
component.open();
Is there a "cleaner" way to do it? To clearify: if I don't open the
component temporarily in my "tabbed" mode, they dock to the bottom
automatically and if I dock them to the side in opened state they just
disappear...
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 14:29
Betreff: Re: [openide-dev] Programatically enable auto hide for a
TopComponent
declare your topcomponents to be inside one of the sliding mode, The
names for the modes are : leftSlidingMode, rightSlidingMode and
bottomSlidingMode I think.
You can double check by moving the components inside the
slide bar and
Post by Mathias Henze
then exit ide and examining the
${netbeans.userdir}/config/Windows2Local/Modes directory.
to have a component slided into desktop for some time and
then hide it
Post by Mathias Henze
could be more problematic. You propably want to make that component
selected (in the slidebar context, it means the components
shows itself
Post by Mathias Henze
completely, and then deselect it.
Regards
Milos Kleint
Post by Mathias Henze
Hello there
Is it possible to programatically change a TopComponent to
auto-hide mode or
Post by Mathias Henze
open it accordingly. We have an application that opens several
TopComponents
Post by Mathias Henze
when a file is opened, but we want the user to stay
focused to the main
Post by Mathias Henze
Post by Mathias Henze
editor.
We would like to open some of the additional TopComponents
directly in
Post by Mathias Henze
Post by Mathias Henze
hidden (just the opener-button visible) and some others
ideally to pop up
Post by Mathias Henze
for a short amount of time and then slide to auto hide.
Is this (partially) possible? Where can I find information
about how to
Post by Mathias Henze
Post by Mathias Henze
archieve this functionality?
I am using Netbeans Platform 4.1 Beta.
Many thanks in advance!
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
Richard Unger
2005-03-15 15:50:34 UTC
Permalink
WRT to TopComponent Group semantics, see by blog entry on the subject: http://youngerunger.blogspot.com

Rich

________________________________

From: Mathias Henze [mailto:***@artis-group.com]
Sent: Tue 3/15/2005 5:33 AM
To: ***@openide.netbeans.org
Subject: AW: AW: [openide-dev] Programatically enable auto hide for a TopComponent



Thanks for your reply.

I have to open the topcomponent along with our main editor. I think I have
to take a look at TopComponent-Groups for that to avoid dockInto()...

For a transitional workaround: Is there any way to access the
WindowManagerImpl without getting the NoClassDefFoundError?

Regards
Mathias

---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler

phone: ++49 (0)89 651295-30
mail : ***@artis-group.com
http://www.artis-group.com
-----Ursprüngliche Nachricht-----
Gesendet: Dienstag, 15. März 2005 13:13
Betreff: Re: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
I've replied to you yesterday but the response got lost somewhere.
hmmm..
the wstcref file of the topcomponent has an attribute previousMode
which should do exactly that.. again declaratively, you ought not be
required to do any dockInto() calls.
eg.
<tc-ref version="2.1">
<tc-id id="favorites" />
<state opened="true" />
<previousMode name="explorer" />
</tc-ref>
hope that helps. If not we would have to resort to some workaround or
addition to APIs.
regards.
Milos
Post by Mathias Henze
Hello again
It seems that there is no official way to archieve my goal. I
have found the
Post by Mathias Henze
things to be done in Central.userEnabledAutohide(), but
unfortunatly it is
Post by Mathias Henze
not accessible from the API.
What has to be done to be able to use implementation classes
from my module?
Post by Mathias Henze
org/netbeans/core/windows/WindowManagerImpl" trying to call
WindowManagerImpl.getDefault(), so specifying a Module-Module
dependency to
Post by Mathias Henze
org.netbeans.core.windows/2 obviously does not suffice...
This should imho be integrated into Mode.dockInto(), since an
application/module-developer should not mess with the window system
implementation ;)
ModeImpl could call
model.setModeTopComponentPreviousMode(targetMode, tc, source);
model.setModeTopComponentPreviousConstraints(targetMode, tc,
model.getModeConstraints(source));
To allow that, Central could be extended with a getModel()-method, so
dockInto() can use ModeImpl.getCentral().getModel() to acquire
the Model...
Post by Mathias Henze
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 17:58
Betreff: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
Hmmm
After some more playing around I noticed that this solution unfortunatly
does not work like expected. The sliding components seem not to
dock into
Post by Mathias Henze
the modes where they were originally docked. :(
Can I set something like a preferred docking mode to dock to,
when the user
clicks on the [o]-Symbol?
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 16:36
Betreff: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
Thanks very much, It's working!
I've checked Windows2Local like you suggested and the modes are called
"Side" in this case (eg. leftSlidingSide, rightSlidingSide, etc.)
As for the temporarily visible TopComponent I just use
component.requestActive() for the time being, since it vanishes
anyway, if
the user clicks into the editor.
The only thing is, that I have to dock the components into the desired
dockingMode= WindowManager.getDefault().findMode("tabbed");
if(dockingMode!=null)
{
dockingMode.dockInto(component);
}
component.open();
component.close();
rightSlidingMode.dockInto(component);
component.open();
Is there a "cleaner" way to do it? To clearify: if I don't open the
component temporarily in my "tabbed" mode, they dock to the bottom
automatically and if I dock them to the side in opened state they just
disappear...
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 14:29
Betreff: Re: [openide-dev] Programatically enable auto hide for a
TopComponent
declare your topcomponents to be inside one of the sliding mode, The
names for the modes are : leftSlidingMode, rightSlidingMode and
bottomSlidingMode I think.
You can double check by moving the components inside the slide bar and
then exit ide and examining the
${netbeans.userdir}/config/Windows2Local/Modes directory.
to have a component slided into desktop for some time and then hide it
could be more problematic. You propably want to make that component
selected (in the slidebar context, it means the components
shows itself
completely, and then deselect it.
Regards
Milos Kleint
Post by Mathias Henze
Hello there
Is it possible to programatically change a TopComponent to
auto-hide mode or
Post by Mathias Henze
open it accordingly. We have an application that opens several
TopComponents
Post by Mathias Henze
when a file is opened, but we want the user to stay focused
to the main
Post by Mathias Henze
editor.
We would like to open some of the additional TopComponents
directly in
Post by Mathias Henze
hidden (just the opener-button visible) and some others
ideally to pop up
Post by Mathias Henze
for a short amount of time and then slide to auto hide.
Is this (partially) possible? Where can I find information
about how to
Post by Mathias Henze
archieve this functionality?
I am using Netbeans Platform 4.1 Beta.
Many thanks in advance!
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
Mathias Henze
2005-03-15 16:43:24 UTC
Permalink
Thanks!

I will take a look on this, since the declarative solution does not work
after I close the TopComponent programatically :(

But I have spend too much time on this already, so I have to delay further
investigation...

Regards
Mathias

---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler

phone: ++49 (0)89 651295-30
mail : ***@artis-group.com
http://www.artis-group.com
-----Ursprüngliche Nachricht-----
Gesendet: Dienstag, 15. März 2005 16:51
Betreff: RE: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
WRT to TopComponent Group semantics, see by blog entry on the
subject: http://youngerunger.blogspot.com
Rich
________________________________
Sent: Tue 3/15/2005 5:33 AM
Subject: AW: AW: [openide-dev] Programatically enable auto hide for a TopComponent
Thanks for your reply.
I have to open the topcomponent along with our main editor. I think I have
to take a look at TopComponent-Groups for that to avoid dockInto()...
For a transitional workaround: Is there any way to access the
WindowManagerImpl without getting the NoClassDefFoundError?
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprüngliche Nachricht-----
Gesendet: Dienstag, 15. März 2005 13:13
Betreff: Re: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
I've replied to you yesterday but the response got lost somewhere.
hmmm..
the wstcref file of the topcomponent has an attribute previousMode
which should do exactly that.. again declaratively, you ought not be
required to do any dockInto() calls.
eg.
<tc-ref version="2.1">
<tc-id id="favorites" />
<state opened="true" />
<previousMode name="explorer" />
</tc-ref>
hope that helps. If not we would have to resort to some workaround or
addition to APIs.
regards.
Milos
Post by Mathias Henze
Hello again
It seems that there is no official way to archieve my goal. I
have found the
Post by Mathias Henze
things to be done in Central.userEnabledAutohide(), but
unfortunatly it is
Post by Mathias Henze
not accessible from the API.
What has to be done to be able to use implementation classes
from my module?
Post by Mathias Henze
org/netbeans/core/windows/WindowManagerImpl" trying to call
WindowManagerImpl.getDefault(), so specifying a Module-Module
dependency to
Post by Mathias Henze
org.netbeans.core.windows/2 obviously does not suffice...
This should imho be integrated into Mode.dockInto(), since an
application/module-developer should not mess with the window system
implementation ;)
ModeImpl could call
model.setModeTopComponentPreviousMode(targetMode, tc, source);
model.setModeTopComponentPreviousConstraints(targetMode, tc,
model.getModeConstraints(source));
To allow that, Central could be extended with a getModel()-method, so
dockInto() can use ModeImpl.getCentral().getModel() to acquire
the Model...
Post by Mathias Henze
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 17:58
Betreff: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
Hmmm
After some more playing around I noticed that this solution
unfortunatly
Post by Mathias Henze
does not work like expected. The sliding components seem not to
dock into
Post by Mathias Henze
the modes where they were originally docked. :(
Can I set something like a preferred docking mode to dock to,
when the user
clicks on the [o]-Symbol?
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 16:36
Betreff: AW: [openide-dev] Programatically enable auto hide for a
TopComponent
Thanks very much, It's working!
I've checked Windows2Local like you suggested and the modes
are called
Post by Mathias Henze
"Side" in this case (eg. leftSlidingSide, rightSlidingSide, etc.)
As for the temporarily visible TopComponent I just use
component.requestActive() for the time being, since it vanishes
anyway, if
the user clicks into the editor.
The only thing is, that I have to dock the components into
the desired
Post by Mathias Henze
dockingMode= WindowManager.getDefault().findMode("tabbed");
if(dockingMode!=null)
{
dockingMode.dockInto(component);
}
component.open();
component.close();
rightSlidingMode.dockInto(component);
component.open();
Is there a "cleaner" way to do it? To clearify: if I don't open the
component temporarily in my "tabbed" mode, they dock to the bottom
automatically and if I dock them to the side in opened state
they just
Post by Mathias Henze
disappear...
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
-----Ursprungliche Nachricht-----
Gesendet: Montag, 14. Marz 2005 14:29
Betreff: Re: [openide-dev] Programatically enable auto hide for a
TopComponent
declare your topcomponents to be inside one of the sliding mode, The
names for the modes are : leftSlidingMode, rightSlidingMode and
bottomSlidingMode I think.
You can double check by moving the components inside the
slide bar and
Post by Mathias Henze
then exit ide and examining the
${netbeans.userdir}/config/Windows2Local/Modes directory.
to have a component slided into desktop for some time and
then hide it
Post by Mathias Henze
could be more problematic. You propably want to make that component
selected (in the slidebar context, it means the components
shows itself
completely, and then deselect it.
Regards
Milos Kleint
Post by Mathias Henze
Hello there
Is it possible to programatically change a TopComponent to
auto-hide mode or
Post by Mathias Henze
open it accordingly. We have an application that opens several
TopComponents
Post by Mathias Henze
when a file is opened, but we want the user to stay focused
to the main
Post by Mathias Henze
editor.
We would like to open some of the additional TopComponents
directly in
Post by Mathias Henze
hidden (just the opener-button visible) and some others
ideally to pop up
Post by Mathias Henze
for a short amount of time and then slide to auto hide.
Is this (partially) possible? Where can I find information
about how to
Post by Mathias Henze
archieve this functionality?
I am using Netbeans Platform 4.1 Beta.
Many thanks in advance!
Regards
Mathias
---
Artis Group - newmedia concepts GmbH
Dipl.-Ing. Mathias Henze
Entwickler
phone: ++49 (0)89 651295-30
http://www.artis-group.com
Loading...