KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > com > opensymphony > module > sitemesh > parser > rules > FramesetRule


1 package com.opensymphony.module.sitemesh.parser.rules;
2
3 import com.opensymphony.module.sitemesh.HTMLPage;
4 import com.opensymphony.module.sitemesh.html.BasicRule;
5 import com.opensymphony.module.sitemesh.html.Tag;
6
7 public class FramesetRule extends BasicRule {
8
9     private final HTMLPage page;
10
11     public FramesetRule(HTMLPage page) {
12         this.page = page;
13     }
14
15     public void process(Tag tag) {
16         page.setFrameSet(true);
17     }
18
19     public boolean shouldProcess(String JavaDoc name) {
20         return name.toLowerCase().startsWith("frame");
21     }
22 }
23
Popular Tags