Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
TableColumnTagHandler |
|
| 0.0;0 |
1 | /* | |
2 | * Copyright 2004-2008 the Seasar Foundation and the Others. | |
3 | * | |
4 | * Licensed under the Apache License, Version 2.0 (the "License"); | |
5 | * you may not use this file except in compliance with the License. | |
6 | * You may obtain a copy of the License at | |
7 | * | |
8 | * http://www.apache.org/licenses/LICENSE-2.0 | |
9 | * | |
10 | * Unless required by applicable law or agreed to in writing, software | |
11 | * distributed under the License is distributed on an "AS IS" BASIS, | |
12 | * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, | |
13 | * either express or implied. See the License for the specific language | |
14 | * governing permissions and limitations under the License. | |
15 | */ | |
16 | package org.seasar.uruma.component.factory.handler; | |
17 | ||
18 | import org.seasar.framework.xml.TagHandlerContext; | |
19 | import org.seasar.uruma.component.jface.TableColumnComponent; | |
20 | import org.seasar.uruma.component.jface.TableComponent; | |
21 | import org.xml.sax.Attributes; | |
22 | ||
23 | /** | |
24 | * <code>tableColumn</code> タグに対するタグハンドラです。<br /> | |
25 | * | |
26 | * @author y-komori | |
27 | */ | |
28 | public class TableColumnTagHandler extends GenericTagHandler { | |
29 | ||
30 | private static final long serialVersionUID = -2864950085408995035L; | |
31 | ||
32 | /** | |
33 | * {@link TableColumnTagHandler} を構築します。<br /> | |
34 | */ | |
35 | public TableColumnTagHandler() { | |
36 | 116 | super(TableColumnComponent.class); |
37 | 116 | } |
38 | ||
39 | /* | |
40 | * @see org.seasar.uruma.component.factory.handler.GenericTagHandler#start(org.seasar.framework.xml.TagHandlerContext, | |
41 | * org.xml.sax.Attributes) | |
42 | */ | |
43 | @Override | |
44 | public void start(final TagHandlerContext context, | |
45 | final Attributes attributes) { | |
46 | 64 | super.start(context, attributes); |
47 | ||
48 | 64 | TableColumnComponent column = (TableColumnComponent) context.peek(); |
49 | 64 | TableComponent table = (TableComponent) context.peek(1); |
50 | ||
51 | 64 | int columnNo = table.columnCount; |
52 | 64 | column.columnNo = columnNo; |
53 | 64 | table.columnCount = ++columnNo; |
54 | 64 | } |
55 | } |