} else if ("input".equalsIgnoreCase(name)) {
InputElement ie = InputElement.as(e);
String type = ie.getType();
- if ("radio".equalsIgnoreCase((type)) || "checkbox".equalsIgnoreCase(type)) {
+ if ("radio".equalsIgnoreCase(type) || "checkbox".equalsIgnoreCase(type)) {
ie.setChecked(false);
for (String v : values) {
if (ie.getValue().equals(v)) {
}
String val = curCSS(elem, prop, force);
if ("thick".equalsIgnoreCase(val)) {
- return (5);
+ return 5;
} else if ("medium".equalsIgnoreCase(val)) {
- return (3);
+ return 3;
} else if ("thin".equalsIgnoreCase(val)) {
- return (1);
+ return 1;
}
if (!val.matches("^[\\d\\.]+.*$")) {
val = curCSS(elem, prop, false);
return null;
} else {
if (truth(pseudoValue.get(2))) { // odd or even
- start = (eq(pseudoValue.get(2), "odd")) ? 1 : 2;
+ start = eq(pseudoValue.get(2), "odd") ? 1 : 2;
modVal = (start == 1) ? 1 : 0;
} else if (JsUtils
.truth(pseudoValue.get(3))) { // single digit
private static void getGeneralSiblingNodes(JsNodeArray matchingElms,
JsObjectArray<String> nextTag, JsRegexp nextRegExp, Node prevRef) {
- while (JsUtils.truth((prevRef = SelectorEngine.getNextSibling(prevRef)))
+ while (JsUtils.truth(prevRef = SelectorEngine.getNextSibling(prevRef))
&& !isAdded(prevRef)) {
if (!JsUtils.truth(nextTag) || nextRegExp
.test(prevRef.getNodeName())) {
? attributeMatch.get(3).replaceAll("\\.", "\\.")
: null;
String attrVal = attrToRegExp(attributeValue,
- (JsUtils.or(attributeMatch.get(2), null)));
- regExpAttributes[q] = (JsUtils.truth(attrVal) ? new JsRegexp(
- attrVal) : null);
+ JsUtils.or(attributeMatch.get(2), null));
+ regExpAttributes[q] = JsUtils.truth(attrVal) ? new JsRegexp(
+ attrVal) : null;
regExpAttributesStr[q] = attributeMatch.get(1);
}
JsNodeArray matchingAttributeElms = JsNodeArray.create();
previous = next = previousMatch.getElement(j);
if (previousDir) {
while (JsUtils
- .truth((next = SelectorEngine.getPreviousSibling(next)))
+ .truth(next = SelectorEngine.getPreviousSibling(next))
&& next.getNodeType() != Node.ELEMENT_NODE) {
}
} else {
- while (JsUtils.truth((next = SelectorEngine.getNextSibling(next)))
+ while (JsUtils.truth(next = SelectorEngine.getNextSibling(next))
&& next.getNodeType() != Node.ELEMENT_NODE) {
}
}
public JsObjectArray<T> add(T... vals) {
for (T t : vals) {
if (t instanceof Number) {
- c().putNumber(length(), (((Number) t).doubleValue()));
+ c().putNumber(length(), ((Number) t).doubleValue());
} else if (t instanceof Boolean) {
c().putBoolean(length(), (Boolean) t);
} else {
unbindOtherEvents();
if (started) {
started = false;
- preventClickEvent = (event.getCurrentEventTarget() == startEvent.getCurrentEventTarget());
+ preventClickEvent = event.getCurrentEventTarget() == startEvent.getCurrentEventTarget();
mouseStop(element, event);
}
@Override
protected boolean scrollParentPositionTest(UiPlugin gQueryUi) {
String position = gQueryUi.css("position", false);
- return ("absolute".equals(position) || "relative".equals(position) || "static"
- .equals(position));
+ return "absolute".equals(position) || "relative".equals(position) || "static"
+ .equals(position);
}
}
return;
}
if (currentAction == Action.HIDE) {
- progress = (1 - progress);
+ progress = 1 - progress;
}
int w = g.outerWidth();
int h = g.outerHeight();
left = (w - right) / 2;
}
if (corner == Corner.TOP_RIGHT || corner == Corner.BOTTOM_RIGHT) {
- left = (w - right);
+ left = w - right;
right = w;
}
if (corner == Corner.BOTTOM_LEFT || corner == Corner.BOTTOM_RIGHT) {
- top = (h - bottom);
+ top = h - bottom;
bottom = h;
}
}
public void applyValue(GQuery g, double progress) {
- double ret = (start + ((end - start) * progress));
+ double ret = start + ((end - start) * progress);
String val = ("px".equals(unit) ? ((int) ret) : ret) + unit;
if ("scrollTop".equals(cssprop)) {
g.scrollTop((int) ret);
if (isJS)
out = "\n";
} else if (isCComment) {
- isSlash = isCComment = !(isJS = (last == '*' && c == '/'));
+ isSlash = isCComment = !(isJS = last == '*' && c == '/');
if (isJS)
out = "";
} else if (isRegex) {
- isJS = !(isSlash = isRegex = (last == '\\' || c != '/'));
+ isJS = !(isSlash = isRegex = last == '\\' || c != '/');
if (isJS) {
String mod = "";
while (++i < l) {
public boolean isTypeAssignableTo(JType t, JClassType o) {
JClassType c = t.isClassOrInterface();
- return (c != null && c.isAssignableTo(o));
+ return c != null && c.isAssignableTo(o);
}
private void generateCreateMethod(SourceWriter sw, TreeLogger logger) {
return null;
} else {
if (notNull(pseudoValue.group(2))) { // odd or even
- start = ("odd".equals(pseudoValue.group(2))) ? 1 : 2;
+ start = "odd".equals(pseudoValue.group(2)) ? 1 : 2;
modVal = (start == 1) ? 1 : 0;
} else if (notNull(pseudoValue.group(3))) { // single digit
start = Integer.parseInt(pseudoValue.group(3), 10);
} else if ("nth".equals(pseudo[0])) {
if (!pseudoValue.matches("^n$")) {
String position =
- (("last".equals(pseudo[1])) ? "(count(following-sibling::"
- : "(count(preceding-sibling::") + tag + ") + 1)";
+ "last".equals(pseudo[1]) ? "(count(following-sibling::"
+ : "(count(preceding-sibling::" + tag + ") + 1)";
Sequence sequence = getSequence(pseudoValue);
if (sequence != null) {
if (sequence.start == sequence.max) {
public boolean isTypeAssignableTo(JType t, JClassType o) {
JClassType c = t.isClassOrInterface();
- return (c != null && c.isAssignableTo(o));
+ return c != null && c.isAssignableTo(o);
}
public void generateMethod(SourceWriter sw, JMethod method, TreeLogger logger)