| 1 | //  Copyright 2004-2007 Jean-Francois Poilpret | 
| 2 | // | 
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); | 
| 4 | // you may not use this file except in compliance with the License. | 
| 5 | // You may obtain a copy of the License at | 
| 6 | // | 
| 7 | //     http://www.apache.org/licenses/LICENSE-2.0 | 
| 8 | // | 
| 9 | // Unless required by applicable law or agreed to in writing, software | 
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, | 
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | 
| 12 | // See the License for the specific language governing permissions and | 
| 13 | // limitations under the License. | 
| 14 |   | 
| 15 | package net.sourceforge.hiveboard.docking; | 
| 16 |   | 
| 17 | import javax.swing.JTabbedPane; | 
| 18 |   | 
| 19 | import org.flexdock.docking.defaults.BorderManager; | 
| 20 | import org.flexdock.docking.defaults.StandardBorderManager; | 
| 21 | import org.jvnet.substance.SubstanceLookAndFeel; | 
| 22 | import org.jvnet.substance.utils.SubstanceConstants.TabContentPaneBorderKind; | 
| 23 |   | 
| 24 | import net.sourceforge.hiveboard.view.DrawingAreaHolder; | 
| 25 | import net.sourceforge.hivegui.docking.EmptyableViewport; | 
| 26 |   | 
| 27 | public class HiveBoardViewport extends EmptyableViewport | 
| 28 | { | 
| 29 |         public HiveBoardViewport() | 
| 30 |         { | 
| 31 |                 super(DrawingAreaHolder.class); | 
| 32 |                 setBorderManager(_borderManager); | 
| 33 |         } | 
| 34 |   | 
| 35 |         @Override protected JTabbedPane createTabbedPane() | 
| 36 |         { | 
| 37 |                 JTabbedPane pane = super.createTabbedPane(); | 
| 38 |                 pane.putClientProperty(        SubstanceLookAndFeel.TABBED_PANE_CONTENT_BORDER_KIND, | 
| 39 |                                                TabContentPaneBorderKind.SINGLE_PLACEMENT); | 
| 40 |                 return pane; | 
| 41 |         } | 
| 42 |   | 
| 43 |         static private final BorderManager        _borderManager = new StandardBorderManager(null); | 
| 44 | } |