1 /* 2 * Licensed to the Apache Software Foundation (ASF) under one 3 * or more contributor license agreements. See the NOTICE file 4 * distributed with this work for additional information 5 * regarding copyright ownership. The ASF licenses this file 6 * to you under the Apache License, Version 2.0 (the 7 * "License"); you may not use this file except in compliance 8 * with the License. You may obtain a copy of the License at 9 * 10 * http://www.apache.org/licenses/LICENSE-2.0 11 * 12 * Unless required by applicable law or agreed to in writing, 13 * software distributed under the License is distributed on an 14 * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY 15 * KIND, either express or implied. See the License for the 16 * specific language governing permissions and limitations 17 * under the License. 18 */ 19 package org.apache.myfaces.custom.effect; 20 21 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFClientBehavior; 22 import org.apache.myfaces.buildtools.maven2.plugin.builder.annotation.JSFProperty; 23 import org.apache.myfaces.custom.behavior.ClientBehaviorBase; 24 25 /** 26 * Convenient wrapper for scriptaculous Effect.Appear 27 * 28 * @author Leonardo Uribe 29 * 30 */ 31 @JSFClientBehavior( 32 name="s:effectScale", 33 clazz="org.apache.myfaces.custom.effect.EffectScaleBehavior", 34 bodyContent="empty") 35 public abstract class AbstractEffectScaleClientBehavior extends EffectClientBehaviorBase 36 { 37 public static final String BEHAVIOR_ID = "org.apache.myfaces.custom.effect.EffectScaleBehavior"; 38 public static final String RENDERER_TYPE = "org.apache.myfaces.custom.effect.EffectScaleBehavior"; 39 40 public AbstractEffectScaleClientBehavior() 41 { 42 } 43 44 /** 45 * Percent value used to indicate the final scale. 46 * 47 * @return 48 */ 49 @JSFProperty 50 public abstract String getPercent(); 51 52 /** 53 * Sets whether the element should be scaled horizontally, defaults to true. 54 * 55 * @return 56 */ 57 @JSFProperty 58 public abstract Boolean getScaleX(); 59 60 /** 61 * Sets whether the element should be scaled vertically, defaults to true. 62 * 63 * @return 64 */ 65 @JSFProperty 66 public abstract Boolean getScaleY(); 67 68 /** 69 * Sets whether content scaling should be enabled, defaults to true. 70 * 71 * @return 72 */ 73 @JSFProperty 74 public abstract Boolean getScaleContent(); 75 76 /** 77 * If true, scale the element in a way that the center of 78 * the element stays on the same position on the screen, 79 * defaults to false. 80 * 81 * @return 82 */ 83 @JSFProperty 84 public abstract Boolean getScaleFromCenter(); 85 86 /** 87 * Either 'box' (default, scales the visible area of the element) 88 * or 'contents' (scales the complete element, that is parts 89 * normally only visible by scrolling are taken into account). 90 * You can also precisely control the size the element will 91 * become by assigning the originalHeight and originalWidth 92 * variables to scaleMode. 93 * 94 * Example: scaleMode: { originalHeight: 900, originalWidth: 900 } 95 * 96 * @return 97 */ 98 @JSFProperty 99 public abstract String getScaleMode(); 100 101 /** 102 * integer value, percentage (0%-100%), defaults to 100 103 * 104 * @return 105 */ 106 @JSFProperty 107 public abstract Integer getScaleFrom(); 108 109 }