Byte-Welt Forum

Zurück   Byte-Welt Forum > Projekte > DockingFrames

DockingFrames DockingFrames An extension of Swing, used to flexibly arrange windows. - Ist eine Erweiterung von Swing, mit der flexibel Panels angeordnet werden können.

Antwort
 
Themen-Optionen Thema durchsuchen
Alt 27.07.2010, 16:38   #1
eric starter
Gast
 
Beiträge: n/a
Standard how to prevent CControl.read(File) to restore DefaultMultipleCDockable

I used DefaultMultipleCDockable as "opened" editor.

When I restart my app, I would like CControl to restore every other dockable ( simpleCDockable in fact), but not the MultipleCDockable ones.

I use the CControl.read() method, which works fine, but I can't prevent it from restoring the MultipleCDockable too.

Is there a simple way to do that ?

Thanks.

here is my code btw, if it helps

Java Code:
  1. dock = new CControl();
  2.         ThemeMap themes = dock.getThemes();
  3.         themes.select(ThemeMap.KEY_ECLIPSE_THEME);
  4.         dock.setMissingStrategy(MissingCDockableStrategy.PURGE);
  5.        
  6.         SwingUtilities.invokeLater(new Runnable() {
  7.             public void run() {
  8.                 if (conf.exists()) {
  9.                    
  10.                     LOG.fine("reloading docking confs from " + conf);
  11.                 /**/
  12.                     try {
  13.                         //dock.getResources().readPreferences();
  14.                         dock.read(conf);
  15.                       } catch (IOException e) {// handled
  16.                         LOG.throwing("DockingModule", "createCControl", e);
  17.                     }/**/
  18.                 }
  19.                 else {
  20.                     //use the resource one
  21.                     DataInputStream stream = new DataInputStream(getClass().getResourceAsStream("docking.conf"));
  22.                     try {
  23.                         dock.read(stream);
  24.                     } catch (IOException e) {
  25.                         LOG.throwing("DockingModule", "createCControl from resources", e);
  26.                     }
  27.                 }
  28.             }
  29.         });
  30.         /**/
  31.         return dock;
  Mit Zitat antworten
Alt 27.07.2010, 21:04   #2
Beni
Moderator
 
Benutzerbild von Beni
 
Registriert seit: 27.08.2006
Beiträge: 571
Beni befindet sich auf einem aufstrebenden Ast
Beni eine Nachricht über Skype™ schicken
Standard Re: how to prevent CControl.read(File) to restore DefaultMultipleCDockable

Let your MultipleCDockableFactory(s) return "null" when its "read"-method is called. If the factory does not create Dockables, no Dockables can be shown. (The framework should handle the "null" and not throw any kind of exception).
__________________
Beni ist offline   Mit Zitat antworten
Alt 28.07.2010, 08:53   #3
eric starter
Gast
 
Beiträge: n/a
Standard Re: how to prevent CControl.read(File) to restore DefaultMultipleCDockable

Hi Beni,

Thanks for the tip. As far as I have tested it works just as expected.
  Mit Zitat antworten
Antwort

Lesezeichen

Stichworte
-


Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1)
 
Themen-Optionen Thema durchsuchen
Thema durchsuchen:

Erweiterte Suche

Forumregeln
Es ist Ihnen erlaubt, neue Themen zu verfassen.
Es ist Ihnen erlaubt, auf Beiträge zu antworten.
Es ist Ihnen nicht erlaubt, Anhänge hochzuladen.
Es ist Ihnen nicht erlaubt, Ihre Beiträge zu bearbeiten.

BB-Code ist an.
Smileys sind an.
[IMG] Code ist an.
HTML-Code ist aus.


Ähnliche Themen
Thema Autor Forum Antworten Letzter Beitrag
Support for CControl without JFrame shlomy DockingFrames 25 17.06.2009 17:30
[Erledigt] Prevent drag a child station into a parent station Unregistered DockingFrames 2 06.06.2009 15:16
[Erledigt] Partly lock docking - prevent merging of dockables Unregistered DockingFrames 2 05.05.2009 12:29
Cannot file a bug at javaforge lubosp DockingFrames 2 08.02.2009 18:56
Ladebalken für ImageIO.read() Innocentus Java Standard Edition (J2SE) 9 30.03.2007 09:57


Alle Zeitangaben in WEZ +1. Es ist jetzt 05:52 Uhr.


Powered by vBulletin® Version 3.8.2 (Deutsch)
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.