![]() |
|
|||||||
| Registrieren | Benutzerliste | Interessengemeinschaften | Suchen | Heutige Beiträge | Alle Foren als gelesen markieren | ||
| Java Link Base | Wiki | NoPaste | Chat | Boardregeln | F.A.Q. |
| DockingFrames DockingFrames An extension of Swing, used to flexibly arrange windows. - Ist eine Erweiterung von Swing, mit der flexibel Panels angeordnet werden können. |
![]() |
|
|
Themen-Optionen | Thema durchsuchen |
|
|
#1 |
|
Registriert seit: 12.03.2009
Beiträge: 13
|
Hi
When there is only a single Dockable in a StackDockStation (which is on a splitDockStation) the the StackDockStation.getDockParent() returns null, but as soon as more then one Dockable is added then StackDockStation.getDockParent() does not return null. Also the StackDockStation does not show any tabs if there is only one dockable. This behavior is understandable, but is it configurable ? Can you force the StackDockStation to always show tabs ? (Not sure if relevant but I am using the BubbleTheme) Thanks nz |
|
|
|
|
|
#2 |
|
Gast
Beiträge: n/a
|
Are you certain the StackDockStation is in the tree at all? Having no parent suggest otherwise. And the default behavior of DF is to remove any station that has only one child.
If it is not present you might need to install a "SingleParentRemover" at the DockController (using "setSingleParentRemover"), this SPR should then not remove this special StackDockStation. As far as I understand my old code (StackDockStation.add and BubbleStackDockComponent), tabs should be visible. I'll have to check again in the evening. |
|
|
|
#3 |
|
Registriert seit: 12.03.2009
Beiträge: 13
|
Calling dockController.setSingleParentRemover(null) allowed me to achieve what I wanted to do - That is to always show the tabs.
Thanks nz |
|
|
|
|
|
#4 |
|
Registriert seit: 22.04.2009
Beiträge: 30
|
Hi,
I have a StackDockStation with a single dockable and I want to display the single dockable as a tab folder. I used setSingleParentRemover(null); but it's not working. Java Code:
Thank you, ley |
|
|
|
|
|
#5 |
|
Gast
Beiträge: n/a
|
Sorry my mistype, setting single parent remover to null ensured that the dockable was not merged into its parents parent station, it did not guarantee that the tab would be visible
nz |
|
|
|
#6 |
|
Moderator
|
Currently single tabs are not implemented. One would need to update the code of StackDockStation to allow that. Sorry, but I'm currently too busy to do that.
__________________
|
|
|
|
|
|
#7 |
|
Gast
Beiträge: n/a
|
Is it possible now with Version 1.0.8 to have a Single dockable in a StackableDockStation?
I tested with preview 5 (not preview 5d since I could not update to preview 5d because of non-matching Glass Extension) and tried the following: - control.putProperty(SingleTabDecider.SINGLE_TAB_DE CIDER, SingleTabDecider.ALLWAYS); - Code:
control.putProperty(SingleTabDecider.SINGLE_TAB_DECIDER, new CommonSingleTabDecider(control) {
/**
* @new
*/
@Override
public boolean showSingleTab (DockStation station, Dockable dockable) {
if( dockable instanceof CommonDockable ){
CDockable cdockable = ((CommonDockable) dockable).getDockable();
return cdockable.isSingleTabShown();
}
return false;
}
});
Code:
dockable.setTitleShown(true); dockable.setSingleTabShown(true); Or will it be possible in preview 5d? |
|
|
|
#8 |
|
Moderator
|
Yes, Singe-tabs are possible since 1.0.8p1.
You won't see any effect if you use the EclipseTheme, but you will see a change when using any other theme. Calling "setSingleTabShown" is the correct solution. It's working in my applications (1.0.8p5d), you are sure you call the method on the right objects? You don't override the settings later? (P.S. I'll upload a new glass-extension ASAP, then you can use the newest version).
__________________
|
|
|
|
|
|
#9 |
|
Gast
Beiträge: n/a
|
I now tested with version 1.0.8 preview 5d using
Code:
dockable.setSingleTabShown(true); Code:
control.setTheme(ThemeMap.KEY_ECLIPSE_THEME); // Want to use Eclipse Theme control.putProperty(SingleTabDecider.SINGLE_TAB_DECIDER, new CustomCommonSingleTabDecider(control)); Code:
private static class CustomCommonSingleTabDecider extends CommonSingleTabDecider {
//---- Constructors
public CustomCommonSingleTabDecider (CControl control) {
super(control);
}
//---- Methods
@Override
public boolean showSingleTab (DockStation station, Dockable dockable) {
if (dockable.asDockStation() != null) {
return false;
}
if (dockable instanceof CommonDockable) {
final CDockable cdockable= ((CommonDockable) dockable).getDockable();
return cdockable.isSingleTabShown();
}
return false;
}
}
When running the demo application in bibliothek.sizeAndColor Singe-tabs are also supported for Eclipse theme. Thanks in advance |
|
|
|
#10 |
|
Moderator
|
I'm currently without a good idea why it should not work. Could you provide a small example application that reproduces the failure?
I assume you do not play around with a "EclipseThemeConnector"? That would be my only idea how to accidentally "kill" tabs in the EclipseTheme.
__________________
|
|
|
|
![]() |
| Lesezeichen |
| Stichworte |
| - |
| Aktive Benutzer in diesem Thema: 1 (Registrierte Benutzer: 0, Gäste: 1) | |
| Themen-Optionen | Thema durchsuchen |
|
|
Ähnliche Themen
|
||||
| Thema | Autor | Forum | Antworten | Letzter Beitrag |
| Maximize an externalized dockable | Peter | DockingFrames | 5 | 05.01.2009 21:41 |
| Location of a closed dockable | Peter | DockingFrames | 4 | 02.11.2008 18:21 |
| [Erledigt] Moving external dockable | Unregistered | DockingFrames | 1 | 03.09.2008 16:25 |
| Cannot close dockable which appears before focused dockable | Parag | DockingFrames | 1 | 14.08.2008 20:38 |
| [Erledigt] Dockable sizes and dockable closing in common API | Michal Krause | DockingFrames | 11 | 27.07.2008 14:07 |