1 33 34 package com.icesoft.icefaces.samples.showcase.components.effects; 35 36 import com.icesoft.faces.context.effects.Appear; 37 import com.icesoft.faces.context.effects.Effect; 38 import com.icesoft.faces.context.effects.Fade; 39 40 43 public class AppearFadeBean { 44 45 private Effect effectPanelGroup; 47 private Effect effectCommandButton; 48 private Effect effectInputText; 49 private Effect effectOutputText; 50 private Effect effectSelectOneMenu; 51 private Effect effectSelectManyListBox; 52 53 private float from = 1.0f; 55 private float to = 0.0f; 56 57 private Effects effectsBean; 58 59 public AppearFadeBean(Effects effectsBean) { 60 this.effectsBean = effectsBean; 61 } 62 63 public Effect getEffectOutputText() { 64 return effectOutputText; 65 } 66 67 public void setEffectOutputText(Effect effectOutputText) { 68 this.effectOutputText = effectOutputText; 69 } 70 71 public Effect getEffectPanelGroup() { 72 return effectPanelGroup; 73 } 74 75 public void setEffectPanelGroup(Effect effectPanelGroup) { 76 this.effectPanelGroup = effectPanelGroup; 77 } 78 79 public String appearAction() { 80 float seconds = effectsBean.getDurationPrimitive(); 81 82 effectPanelGroup = new Appear(to, from); 84 effectInputText = new Appear(to, from); 85 effectCommandButton = new Appear(to, from); 86 effectOutputText = new Appear(to, from); 87 effectSelectOneMenu = new Appear(to, from); 88 effectSelectManyListBox = new Appear(to, from); 89 90 effectPanelGroup.setDuration(seconds); 92 effectInputText.setDuration(seconds); 93 effectCommandButton.setDuration(seconds); 94 effectOutputText.setDuration(seconds); 95 effectSelectOneMenu.setDuration(seconds); 96 effectSelectManyListBox.setDuration(seconds); 97 98 return null; 99 } 100 101 public String fadeAction() { 102 float seconds = effectsBean.getDurationPrimitive(); 103 104 effectPanelGroup = new Fade(from, to); 106 effectInputText = new Fade(from, to); 107 effectCommandButton = new Fade(from, to); 108 effectOutputText = new Fade(from, to); 109 effectSelectOneMenu = new Fade(from, to); 110 effectSelectManyListBox = new Fade(from, to); 111 112 effectPanelGroup.setDuration(seconds); 114 effectInputText.setDuration(seconds); 115 effectCommandButton.setDuration(seconds); 116 effectOutputText.setDuration(seconds); 117 effectSelectOneMenu.setDuration(seconds); 118 effectSelectManyListBox.setDuration(seconds); 119 120 return null; 121 } 122 123 public float getFrom() { 124 return from; 125 } 126 127 public void setFrom(float from) { 128 this.from = from; 129 } 130 131 public float getTo() { 132 return to; 133 } 134 135 public void setTo(float to) { 136 this.to = to; 137 } 138 139 public Effect getEffectCommandButton() { 140 return effectCommandButton; 141 } 142 143 public void setEffectCommandButton(Effect effectCommandButton) { 144 this.effectCommandButton = effectCommandButton; 145 } 146 147 public Effect getEffectInputText() { 148 return effectInputText; 149 } 150 151 public void setEffectInputText(Effect effectInputText) { 152 this.effectInputText = effectInputText; 153 } 154 155 public Effect getEffectSelectOneMenu() { 156 return effectSelectOneMenu; 157 } 158 159 public void setEffectSelectOneMenu(Effect effectSelectOneMenu) { 160 this.effectSelectOneMenu = effectSelectOneMenu; 161 } 162 163 public Effect getEffectSelectManyListBox() { 164 return effectSelectManyListBox; 165 } 166 167 public void setEffectSelectManyListBox(Effect effectSelectManyListBox) { 168 this.effectSelectManyListBox = effectSelectManyListBox; 169 } 170 } 171 | Popular Tags |