| Classes in this File | Line Coverage | Branch Coverage | Complexity | ||||
| SeparatorRenderer |
|
| 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.renderer.impl; | |
| 17 | ||
| 18 | import org.eclipse.jface.action.MenuManager; | |
| 19 | import org.eclipse.jface.action.Separator; | |
| 20 | import org.seasar.uruma.component.UIComponent; | |
| 21 | import org.seasar.uruma.context.PartContext; | |
| 22 | import org.seasar.uruma.context.WidgetHandle; | |
| 23 | import org.seasar.uruma.context.WindowContext; | |
| 24 | ||
| 25 | /** | |
| 26 | * {@link Separator} のレンダリングを行うためのクラスです。<br /> | |
| 27 | * | |
| 28 | * @author y-komori | |
| 29 | */ | |
| 30 | 4 | public class SeparatorRenderer extends AbstractRenderer { |
| 31 | ||
| 32 | /* | |
| 33 | * @see org.seasar.uruma.renderer.impl.AbstractRenderer#preRender(org.seasar.uruma.component.UIComponent, | |
| 34 | * org.seasar.uruma.context.WidgetHandle, | |
| 35 | * org.seasar.uruma.context.WindowContext) | |
| 36 | */ | |
| 37 | @Override | |
| 38 | public WidgetHandle preRender(final UIComponent uiComponent, | |
| 39 | final WidgetHandle parent, final WindowContext context) { | |
| 40 | 20 | Separator separator = new Separator(); |
| 41 | ||
| 42 | 20 | MenuManager parentMenuManager = parent.<MenuManager> getCastWidget(); |
| 43 | 20 | parentMenuManager.add(separator); |
| 44 | ||
| 45 | 20 | WidgetHandle handle = createWidgetHandle(uiComponent, separator); |
| 46 | 20 | return handle; |
| 47 | } | |
| 48 | ||
| 49 | /* | |
| 50 | * @see org.seasar.uruma.renderer.Renderer#render(org.seasar.uruma.component.UIComponent, | |
| 51 | * org.seasar.uruma.context.WidgetHandle, | |
| 52 | * org.seasar.uruma.context.PartContext) | |
| 53 | */ | |
| 54 | public WidgetHandle render(final UIComponent uiComponent, | |
| 55 | final WidgetHandle parent, final PartContext context) { | |
| 56 | // Do nothing. | |
| 57 | 0 | return null; |
| 58 | } | |
| 59 | ||
| 60 | /* | |
| 61 | * @see org.seasar.uruma.renderer.Renderer#renderAfter(org.seasar.uruma.context.WidgetHandle, | |
| 62 | * org.seasar.uruma.component.UIComponent, | |
| 63 | * org.seasar.uruma.context.WidgetHandle, | |
| 64 | * org.seasar.uruma.context.PartContext) | |
| 65 | */ | |
| 66 | public void renderAfter(final WidgetHandle widget, | |
| 67 | final UIComponent uiComponent, final WidgetHandle parent, | |
| 68 | final PartContext context) { | |
| 69 | // Do nothing. | |
| 70 | 0 | } |
| 71 | } |