scaleX.addChangeListener(transformChangedListener);
scaleY.addChangeListener(transformChangedListener);
transformCenterX.addChangeListener(transformChangedListener);
transformCenterY.addChangeListener(transformChangedListener);
hovered.initReadonlyBind(hoveredSetter);
padding.addChangeListener(new IChangeListener() {
@Override
public void onChanged(Object sender) {
Padding p = padding.get();
if (p == null) {
getElement().getStyle().setPadding(0.0, com.google.gwt.dom.client.Style.Unit.PX);
} else {
p.apply(getElement());
}
requestLayout();
}
});
padding.invalidate();
border.addChangeListener(new IChangeListener() {
@Override
public void onChanged(Object sender) {
Border b = border.get();
if (b == null) {
getElement().getStyle().clearBorderStyle();
getElement().getStyle().clearBorderColor();
getElement().getStyle().clearBorderWidth();
getElement().getStyle().clearProperty("borderRadius");
} else {
b.apply(getElement());
}
requestLayout();
}
});
cursor.addChangeListener(new IChangeListener() {
@Override
public void onChanged(Object sender) {
getElement().getStyle().setProperty("cursor", cursor.get().getCssValue());
}
});
visible.addChangeListener(new IChangeListener() {
@Override
public void onChanged(Object sender) {
if (visible.get()) {
getElement().getStyle().setVisibility(com.google.gwt.dom.client.Style.Visibility.VISIBLE);
} else {
getElement().getStyle().setVisibility(com.google.gwt.dom.client.Style.Visibility.HIDDEN);
}
}
});
enabled.addChangeListener(new IChangeListener() {
@Override
public void onChanged(Object sender) {
if (!enabled.get()) {
getElement().setAttribute("disabled", "true");
} else {
getElement().removeAttribute("disabled");
}
}
});
alpha.addChangeListener(new IChangeListener() {
@Override
public void onChanged(Object sender) {
getElement().getStyle().setOpacity(alpha.get());
}
});
selectable.addChangeListener(new IChangeListener() {
@Override
public void onChanged(Object sender) {
if (selectable.get()) {
getElement().getStyle().clearProperty("mozUserSelect");
getElement().getStyle().clearProperty("khtmlUserSelect");
getElement().getStyle().clearProperty("webkitUserSelect");
getElement().getStyle().clearProperty("msUserSelect");
getElement().getStyle().clearProperty("userSelect");
} else {
getElement().getStyle().setProperty("mozUserSelect", "none");
getElement().getStyle().setProperty("khtmlUserSelect", "none");
getElement().getStyle().setProperty("webkitUserSelect", "none");
getElement().getStyle().setProperty("msUserSelect", "none");
getElement().getStyle().setProperty("userSelect", "none");
}
}
});
selectable.invalidate();
minWidth.addChangeListener(new IChangeListener() {
@Override
public void onChanged(Object sender) {
if (minWidth.get() == null) {
element.getStyle().clearProperty("minWidth");
} else {
element.getStyle().setProperty("minWidth", minWidth.get() + "px");
}
requestLayout();
}
});
minHeight.addChangeListener(new IChangeListener() {
@Override
public void onChanged(Object sender) {
if (minHeight.get() == null) {
element.getStyle().clearProperty("minHeight");
} else {
element.getStyle().setProperty("minHeight", minHeight.get() + "px");
}
requestLayout();
}
});
maxWidth.addChangeListener(new IChangeListener() {
@Override
public void onChanged(Object sender) {
if (maxWidth.get() == null) {
element.getStyle().clearProperty("maxWidth");
} else {
element.getStyle().setProperty("maxWidth", maxWidth.get() + "px");
}
requestLayout();
}
});
maxHeight.addChangeListener(new IChangeListener() {
@Override
public void onChanged(Object sender) {
if (maxHeight.get() == null) {
element.getStyle().clearProperty("maxHeight");
} else {
element.getStyle().setProperty("maxHeight", maxHeight.get() + "px");
}
requestLayout();
}
});
handlePointer.addChangeListener(new IChangeListener() {
@Override
public void onChanged(Object sender) {
if (handlePointer.get()) {
getElement().getStyle().clearProperty("pointerEvents");