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 HenzeHello there
Is it possible to programatically change a TopComponent to
auto-hide mode or
Post by Mathias Henzeopen it accordingly. We have an application that opens several
TopComponents
Post by Mathias Henzewhen a file is opened, but we want the user to stay focused
to the main
Post by Mathias Henzeeditor.
We would like to open some of the additional TopComponents
directly in
Post by Mathias Henzehidden (just the opener-button visible) and some others
ideally to pop up
Post by Mathias Henzefor 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 Henzearchieve 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