MCPcopy Create free account
hub / github.com/benfry/processing4 / updateValue

Method updateValue

java/src/processing/mode/java/tweak/Handle.java:150–169  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

148
149
150 public void updateValue() {
151 float change = getChange();
152
153 if ("int".equals(type)) {
154 if (newValue.intValue() + (int) change > Integer.MAX_VALUE ||
155 newValue.intValue() + (int) change < Integer.MIN_VALUE) {
156 change = 0;
157 return;
158 }
159 setValue(newValue.intValue() + (int) change);
160 } else if ("hex".equals(type)) {
161 setValue(newValue.intValue() + (int) change);
162 } else if ("webcolor".equals(type)) {
163 setValue(newValue.intValue() + (int) change);
164 } else if ("float".equals(type)) {
165 setValue(newValue.floatValue() + change);
166 }
167
168 updateColorBox();
169 }
170
171
172 public void setValue(Number value) {

Callers 1

setCurrentXMethod · 0.95

Calls 4

getChangeMethod · 0.95
setValueMethod · 0.95
updateColorBoxMethod · 0.95
equalsMethod · 0.45

Tested by

no test coverage detected