1 33 34 package com.icesoft.icefaces.samples.showcase.components.progressBar; 35 36 import javax.faces.event.ValueChangeEvent; 37 38 47 public class OutputProgressPropertyBean { 48 49 private String mode = "standard"; 51 52 private String labelPosition = "top"; 54 55 private boolean customProgress; 57 private String progressLabel; 58 59 private boolean customComplete; 61 private String progressCompleteLabel; 62 63 64 69 public void setMode(String mode) { 70 this.mode = mode; 71 } 72 73 78 public String getMode() { 79 return mode; 80 } 81 82 88 public void setLabelPosition(String labelPosition) { 89 this.labelPosition = labelPosition; 90 } 91 92 97 public String getLabelPosition() { 98 return labelPosition; 99 } 100 101 106 public void setCustomProgress(boolean customProgress) { 107 this.customProgress = customProgress; 108 } 109 110 115 public boolean isCustomProgress() { 116 return customProgress; 117 } 118 119 124 public void setProgressLabel(String newLabel) { 125 progressLabel = newLabel; 126 } 127 128 133 public String getProgressLabel() { 134 return progressLabel; 135 } 136 137 140 public String getProgressLabelAfter() { 141 if (mode.equals("indeterminate")) { 143 if (!customProgress) 144 return ""; 145 } 146 if (customProgress) { 149 return progressLabel; 150 } else return null; 151 } 152 153 158 public void setCustomComplete(boolean customComplete) { 159 this.customComplete = customComplete; 160 } 161 162 167 public boolean isCustomComplete() { 168 return customComplete; 169 } 170 171 176 public void setProgressCompleteLabel(String newLabel) { 177 progressCompleteLabel = newLabel; 178 } 179 180 185 public String getProgressCompleteLabel() { 186 return progressCompleteLabel; 187 } 188 189 192 public String getProgressCompleteLabelAfter() { 193 if (customComplete) { 194 return progressCompleteLabel; 195 } else return null; 196 } 197 198 204 public void progressPositionChanged(ValueChangeEvent event) { 205 labelPosition = (String ) event.getNewValue(); 206 } 207 } | Popular Tags |