Changed project menu to use the multi-row type, small modifications to the service/system menus
This commit is contained in:
parent
665d558fef
commit
38685a6e8d
src/main/java/se/su/dsv/scipro
basepanels
components
project/panels
@ -1,19 +0,0 @@
|
||||
<!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" xml:lang="en" lang="en"
|
||||
xmlns:wicket="http://wicket.apache.org/dtds.data/wicket-xhtml1.4-strict.dtd"
|
||||
>
|
||||
<body>
|
||||
<wicket:panel>
|
||||
<div wicket:id="menuContainer">
|
||||
<ul>
|
||||
<li wicket:id="menuList">
|
||||
<a href=# wicket:id="menuItem">
|
||||
<img wicket:id="linkImage" /><span wicket:id="linkText">[TabText]</span>
|
||||
</a>
|
||||
</li>
|
||||
</ul>
|
||||
</div>
|
||||
</wicket:panel>
|
||||
</body>
|
||||
</html>
|
@ -18,6 +18,11 @@ import org.apache.wicket.model.Model;
|
||||
|
||||
import se.su.dsv.scipro.icons.ImageIcon;
|
||||
|
||||
/**
|
||||
* ABC-class for menu's of different types.
|
||||
* Subclasses should implement their own data feed mechanics via <code>getItemList</code> and provide a menu type via <code>getMenuType</code>
|
||||
* The returned menu-type is used to provide CSS-class mappings for the menu structure, see the MenuType enum for alternatives.
|
||||
*/
|
||||
public abstract class AbstractMenuPanel extends Panel {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
@ -33,6 +38,9 @@ public abstract class AbstractMenuPanel extends Panel {
|
||||
}
|
||||
};
|
||||
|
||||
/**
|
||||
* Enumeration of supported menu types.
|
||||
*/
|
||||
public enum MenuType {
|
||||
NONE,
|
||||
TAB,
|
||||
@ -41,7 +49,12 @@ public abstract class AbstractMenuPanel extends Panel {
|
||||
VERTICAL
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* Superclass constructor, arguments
|
||||
* @param id Wicket identifier for the component
|
||||
* @param menuContainerCommonSuperClass [Needs documentation]
|
||||
* @param containerClass [Needs documentation]
|
||||
*/
|
||||
public AbstractMenuPanel(final String id, final Class<? extends Page> menuContainerCommonSuperClass,final Class<? extends Page> containerClass) {
|
||||
super(id);
|
||||
|
||||
@ -103,7 +116,10 @@ public abstract class AbstractMenuPanel extends Panel {
|
||||
* @return
|
||||
*/
|
||||
protected abstract List<MenuItem> getItemList();
|
||||
|
||||
/**
|
||||
* Implement in subclass to return the wanted MenuType.
|
||||
* @return
|
||||
*/
|
||||
protected abstract MenuType getMenuType();
|
||||
|
||||
/**
|
||||
|
@ -58,7 +58,7 @@ public class ProjectTabMenuPanel extends AbstractMenuPanel {
|
||||
|
||||
@Override
|
||||
protected MenuType getMenuType() {
|
||||
return MenuType.TAB;
|
||||
return MenuType.TAB_MULTIPLE_ROWS;
|
||||
}
|
||||
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user