Clover coverage report - Code Coverage for tapestry release 4.0-beta-6
Coverage timestamp: Wed Sep 7 2005 18:41:34 EDT
file stats: LOC: 96   Methods: 0
NCLOC: 13   Classes: 1
 
 Source file Conditionals Statements Methods TOTAL
ILinkComponent.java - - - -
coverage
 1    // Copyright 2004, 2005 The Apache Software Foundation
 2    //
 3    // Licensed under the Apache License, Version 2.0 (the "License");
 4    // you may not use this file except in compliance with the License.
 5    // You may obtain a copy of the License at
 6    //
 7    // http://www.apache.org/licenses/LICENSE-2.0
 8    //
 9    // Unless required by applicable law or agreed to in writing, software
 10    // distributed under the License is distributed on an "AS IS" BASIS,
 11    // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 12    // See the License for the specific language governing permissions and
 13    // limitations under the License.
 14   
 15    package org.apache.tapestry.components;
 16   
 17    import org.apache.tapestry.IComponent;
 18    import org.apache.tapestry.IMarkupWriter;
 19    import org.apache.tapestry.IRequestCycle;
 20    import org.apache.tapestry.engine.ILink;
 21   
 22    /**
 23    * A component that renders an HTML <a> element. It exposes some
 24    * properties to the components it wraps. This is basically to facilitate
 25    * the {@link org.apache.tapestry.html.Rollover} component.
 26    *
 27    * @author Howard Lewis Ship
 28    *
 29    **/
 30   
 31    public interface ILinkComponent extends IComponent
 32    {
 33   
 34    /**
 35    * Returns whether this service link component is enabled or disabled.
 36    *
 37    * @since 0.2.9
 38    *
 39    **/
 40   
 41    public boolean isDisabled();
 42   
 43    /**
 44    * Returns the anchor defined for this link, or null for no anchor.
 45    *
 46    * @since 3.0
 47    *
 48    **/
 49   
 50    public String getAnchor();
 51   
 52    /**
 53    * Returns the name of the target window or frame for this link,
 54    * or null if current window or frame is to be used.
 55    *
 56    * @since 4.0
 57    */
 58    public String getTarget();
 59   
 60    /**
 61    * Adds a new event handler. When the event occurs, the JavaScript function
 62    * specified is executed. Multiple functions can be specified, in which case
 63    * all of them are executed.
 64    *
 65    * <p>This was created for use by
 66    * {@link org.apache.tapestry.html.Rollover} to set mouse over and mouse out handlers on
 67    * the {@link ILinkComponent} that wraps it, but can be used for
 68    * many other things as well.
 69    *
 70    * @since 0.2.9
 71    **/
 72   
 73    public void addEventHandler(LinkEventType type, String functionName);
 74   
 75    /**
 76    * Invoked by the {@link org.apache.tapestry.link.ILinkRenderer} (if
 77    * the link is not disabled) to provide a
 78    * {@link org.apache.tapestry.engine.EngineServiceLink} that the renderer can convert
 79    * into a URL.
 80    *
 81    **/
 82   
 83    public ILink getLink(IRequestCycle cycle);
 84   
 85    /**
 86    * Invoked (by the {@link org.apache.tapestry.link.ILinkRenderer})
 87    * to make the link render any additional attributes. These
 88    * are informal parameters, plus any attributes related to events.
 89    * This is only invoked for non-disabled links.
 90    *
 91    * @since 3.0
 92    *
 93    **/
 94   
 95    public void renderAdditionalAttributes(IMarkupWriter writer, IRequestCycle cycle);
 96    }