Created
May 11, 2011 23:57
-
-
Save jonnywray/967663 to your computer and use it in GitHub Desktop.
Wicket component implementing an Outlook panel
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" xml:lang="en" lang="en"> | |
<wicket:panel> | |
<div class="outlook-control-title"><a href="#" wicket:id="link"><span wicket:id="title">[[tab title]]</span></a></div> | |
<div class="outlook-control-content" wicket:id="content">[]</div> | |
</wicket:panel> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" | |
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> | |
<html xmlns="http://www.w3.org/1999/xhtml" xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.3-strict.dtd" xml:lang="en" lang="en"> | |
<wicket:panel> | |
<div class="colmask leftmenu"> | |
<div class="colleft"> | |
<div class="col1"> | |
<div class="outlook-panel" wicket:id="panel"></div> | |
</div> | |
<div class="col2"> | |
<div wicket:id="tabs-container"> | |
<div wicket:id="tabs"> | |
<div wicket:id="controlPanel" class="outlook-control-panel">[control panel]</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</div> | |
</wicket:panel> | |
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import org.apache.wicket.IClusterable; | |
import org.apache.wicket.markup.html.panel.Panel; | |
import org.apache.wicket.model.IModel; | |
/** | |
* Interface used to represent a single tab in an OutlookPanel | |
* | |
* @author Jonny Wray | |
*/ | |
public interface OutlookPanelTab extends IClusterable | |
{ | |
/** | |
* @return IModel used to represent the title of the tab. Must contain a string. | |
*/ | |
IModel<String> getTitle(); | |
/** | |
* @param panelId | |
* returned panel MUST have this id | |
* @return a Panel object that will be placed as the content panel | |
*/ | |
Panel getPanel(final String panelId); | |
/** | |
* @param panelId | |
* returned panel MUST have this id | |
* @return a Panel object that will be placed as the control panel under the title | |
*/ | |
Panel getControlPanel(final String panelId); | |
/** | |
* Returns whether this tab should be visible | |
* | |
* @return whether this tab should be visible | |
*/ | |
boolean isVisible(); | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.outlook-panel{ | |
} | |
.outlook-control-panel{ | |
border-radius: 3px; | |
border: 1px solid #eeeeee; | |
} | |
.outlook-control-title{ | |
cursor: pointer; position: relative; margin-top: 1px; zoom: 1; | |
font-size: 120%; | |
background: WhiteSmoke; | |
color: #333; | |
} | |
.outlook-control-title a { | |
display: block; font-size: 1em; padding: .5em .5em .5em .7em; | |
} | |
div.selected .outlook-control-title a{ | |
color: #339; | |
} | |
.outlook-control-content { | |
padding: 5px; border-top: 0; margin-top: -2px; position: relative; top: 1px; margin-bottom: 2px; overflow: auto; zoom: 1; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment