use of com.biglybt.core.util.AERunnable in project BiglyBT by BiglySoftware.
the class SWTSkinObjectExpandItem method setExpanded.
public void setExpanded(final boolean expand) {
Utils.execSWTThread(new AERunnable() {
@Override
public void runSupport() {
expandItem.setExpanded(expand);
setExpandedVariable(expand);
Utils.execSWTThreadLater(0, new AERunnable() {
@Override
public void runSupport() {
SWTSkinObjectExpandBar soExpandBar = (SWTSkinObjectExpandBar) parent;
soExpandBar.handleResize(expandItem);
}
});
}
});
}
use of com.biglybt.core.util.AERunnable in project BiglyBT by BiglySoftware.
the class SWTSkinObjectSlider method setPercent.
private void setPercent(double newPercent, boolean triggerListeners) {
if (areDoublesEqual(percent, newPercent)) {
return;
}
newPercent = validatePercent(newPercent, triggerListeners);
if (areDoublesEqual(percent, newPercent)) {
return;
}
this.percent = newPercent;
Utils.execSWTThread(new AERunnable() {
@Override
public void runSupport() {
if (canvas != null && !canvas.isDisposed()) {
canvas.redraw();
canvas.update();
}
}
});
if (triggerListeners) {
Object[] listenersArray = listeners.toArray();
for (int i = 0; i < listenersArray.length; i++) {
SWTSkinListenerSliderSelection l = (SWTSkinListenerSliderSelection) listenersArray[i];
l.selectionChanged(this.percent);
}
}
}
use of com.biglybt.core.util.AERunnable in project BiglyBT by BiglySoftware.
the class SWTSkinObjectText1 method setTextID.
@Override
public void setTextID(final String key, final String[] params) {
if (key == null) {
setText("");
} else if (key.equals(sKey)) {
return;
}
this.sText = MessageText.getString(key);
this.sKey = key;
bIsTextDefault = false;
Utils.execSWTThread(new AERunnable() {
@Override
public void runSupport() {
if (label != null && !label.isDisposed()) {
Messages.setLanguageText(label, key, params);
Utils.relayout(label);
}
}
});
}
use of com.biglybt.core.util.AERunnable in project BiglyBT by BiglySoftware.
the class SWTSkinObjectText1 method setText.
/**
* @param searchText
*/
@Override
public void setText(String text) {
if (text == null) {
text = "";
}
if (text.equals(sText)) {
return;
}
this.sText = text;
this.sKey = null;
bIsTextDefault = false;
Utils.execSWTThread(new AERunnable() {
@Override
public void runSupport() {
if (label != null && !label.isDisposed()) {
label.setText(sText);
Utils.relayout(label);
}
}
});
}
use of com.biglybt.core.util.AERunnable in project BiglyBT by BiglySoftware.
the class SWTSkinObjectToggle method setToggled.
public void setToggled(boolean b) {
isToggled = b;
Utils.execSWTThread(new AERunnable() {
@Override
public void runSupport() {
if (button != null && !button.isDisposed()) {
button.setSelection(isToggled);
}
}
});
}
Aggregations