001package votorola.a.web.wic; // Copyright 2008, 2012, Michael Allan. Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Votorola Software"), to deal in the Votorola Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicence, and/or sell copies of the Votorola Software, and to permit persons to whom the Votorola Software is furnished to do so, subject to the following conditions: The preceding copyright notice and this permission notice shall be included in all copies or substantial portions of the Votorola Software. THE VOTOROLA SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE VOTOROLA SOFTWARE OR THE USE OR OTHER DEALINGS IN THE VOTOROLA SOFTWARE. 002 003import org.apache.wicket.Page; 004import votorola.g.lang.*; 005import votorola.g.web.wic.*; 006 007 008/** A tab that controls the visibility of a navigation sub-bar. 009 * When the super-tab is selected, the sub-bar becomes visible beneath it. 010 */ 011public abstract @ThreadSafe class SuperTab extends NavTab 012{ 013 014 015 /** Constructs a SuperTab. 016 * 017 * @param subBar per {@linkplain #subBar subBar}() 018 */ 019 protected SuperTab( NavBar subBar ) { init( subBar ); } 020 021 022 023 /** Partially constructs a SuperTab. 024 */ 025 protected SuperTab() {} 026 027 028 029 /** Completes the partial construction of a SuperTab. 030 */ 031 protected final void init( NavBar subBar ) { this.subBar = subBar; } 032 033 034 035 // - N a v - T a b -------------------------------------------------------------------- 036 037 038 /** Throws {@linkplain UnsupportedOperationException UnsupportedOperationException}. 039 */ 040 public final @Override Bookmark bookmark() { throw new UnsupportedOperationException(); } 041 042 043 044 /** @return null 045 */ 046 public final @Override Class<? extends Page> pageClass() { return null; } 047 048 049 050 // /** The runner for the last page viewed beneath the sub-bar. 051 // * 052 // * @see NavBar#lastRunner(VRequestCycle) 053 // */ 054 // public final RequestCycleRunner runner( VRequestCycle cycle ) 055 // { 056 // return subBar.lastRunner( cycle ); 057 // } 058 ///// runners removed on migration to stateless pages 059 060 061 062 // - S u p e r - B a r ---------------------------------------------------------------- 063 064 065 /** The navigation bar that is controlled by this super-tab. 066 */ 067 public final NavBar subBar() { return subBar; } 068 069 070 private NavBar subBar; // final after init 071 072 073 074}