use of com.biglybt.core.util.AERunnable in project BiglyBT by BiglySoftware.
the class SWTSkinObjectExpandItem method itemExpanded.
@Override
public void itemExpanded(ExpandEvent e) {
if (e.item == expandItem) {
setExpandedVariable(true);
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 SWTSkinObjectText2 method switchSuffix.
@Override
public String switchSuffix(String suffix, int level, boolean walkUp, boolean walkDown) {
boolean forceSwitch = suffix == null;
String oldSuffix = getSuffix();
suffix = super.switchSuffix(suffix, level, walkUp, walkDown);
if (suffix == null) {
return null;
}
if (!forceSwitch && suffix.equals(oldSuffix)) {
return suffix;
}
String sPrefix = sConfigID + ".text";
if (sText == null || bIsTextDefault) {
String text = properties.getStringValue(sPrefix + suffix);
if (text != null) {
sText = text;
this.sDisplayText = isAllcaps && sText != null ? sText.toUpperCase() : sText;
}
}
final String fSuffix = suffix;
Utils.execSWTThread(new AERunnable() {
@Override
public void runSupport() {
if (canvas == null || canvas.isDisposed()) {
return;
}
updateFont(fSuffix);
}
});
return suffix;
}
use of com.biglybt.core.util.AERunnable in project BiglyBT by BiglySoftware.
the class SWTSkinObjectText2 method setTextColor.
// @see SWTSkinObjectText#setTextColor(org.eclipse.swt.graphics.Color)
@Override
public void setTextColor(final Color color) {
explicitColor = color;
Utils.execSWTThread(new AERunnable() {
@Override
public void runSupport() {
if (canvas == null || canvas.isDisposed()) {
return;
}
canvas.setData("color", color);
canvas.redraw();
}
});
}
use of com.biglybt.core.util.AERunnable in project BiglyBT by BiglySoftware.
the class SWTSkinObjectText2 method setTextID.
@Override
public void setTextID(String key, String[] params) {
if (key == null) {
setText("");
}
/*
* KN: disabling the caching of the key since this is parameterized it may be called
* multiple times with different parameters
*/
// else if (key.equals(sKey)) {
// return;
// }
this.sText = MessageText.getString(key, params);
this.sDisplayText = isAllcaps && sText != null ? sText.toUpperCase() : sText;
this.sKey = key;
bIsTextDefault = false;
Utils.execSWTThreadLater(0, new AERunnable() {
@Override
public void runSupport() {
if (canvas == null || canvas.isDisposed()) {
return;
}
canvas.redraw();
if (relayoutOnTextChange) {
canvas.layout(true);
Utils.relayout(canvas);
}
}
});
}
use of com.biglybt.core.util.AERunnable in project BiglyBT by BiglySoftware.
the class SWTSkinObjectExpandItem method itemCollapsed.
@Override
public void itemCollapsed(ExpandEvent e) {
if (e.item == expandItem) {
setExpandedVariable(false);
Utils.execSWTThreadLater(0, new AERunnable() {
@Override
public void runSupport() {
SWTSkinObjectExpandBar soExpandBar = (SWTSkinObjectExpandBar) parent;
soExpandBar.handleResize(expandItem);
}
});
}
}
Aggregations