package org.ngbw.web.model; import java.util.HashMap; import java.util.Map; public class Tab { private Page contents; private String label; private Map properties; public Tab () { this(null, null); } public Tab ( Page contents, String label ) { setContents(contents); setLabel(label); } public Page getContents () { return contents; } public void setContents ( Page contents ) { this.contents = contents; } public String getLabel () { return label; } public void setLabel ( String label ) { this.label = label; } public Object getProperty ( String property ) { if (properties == null || property == null) { return null; } else { return properties.get(property); } } public void setProperty ( String property, Object value ) { if (property == null) { return; } else { if (properties == null) { properties = new HashMap(); } if (value == null) { properties.remove(property); } else { properties.put(property, value); } } } public void removeProperty ( String property ) { if (properties != null) { properties.remove(property); } } }