use of limelight.LimelightException in project limelight by slagyr.
the class RubyProduction method spawnRubyRuntime.
private void spawnRubyRuntime() {
SpawnRubyThread spawnThread = new SpawnRubyThread(newProductionSrc, id);
spawnThread.production = this;
spawnThread.start();
try {
spawnThread.join();
if (spawnThread.error != null)
throw spawnThread.error;
else if (spawnThread.proxy != null) {
rubyRuntime = spawnThread.ruby;
rubies.put(id, rubyRuntime);
setProxy(spawnThread.proxy);
} else {
spawnThread.ruby.tearDown();
spawnThread = null;
gc();
}
} catch (Exception e) {
throw new LimelightException("Failed to start JRuby Runtime", e);
} finally {
if (spawnThread != null)
spawnThread.clear();
}
}
use of limelight.LimelightException in project limelight by slagyr.
the class Animation method update.
public void update() {
makeupMissedUpdates();
timer.markTime();
try {
doUpdate();
} catch (Exception e) {
stop();
throw new LimelightException("Animation Cancelled", e);
}
}
use of limelight.LimelightException in project limelight by slagyr.
the class Studio method downloadLll.
private String downloadLll(String productionPath) {
try {
String url = fs.readTextFile(productionPath).trim();
Log.debug("Studio - downloading production: " + url);
String result = Downloader.get(url);
return unpackLlp(result);
} catch (Exception e) {
throw new LimelightException("Failed to download or unpack .lll: " + productionPath, e);
}
}
use of limelight.LimelightException in project limelight by slagyr.
the class Theater method add.
public void add(Stage stage) {
Log.info("Theater - adding stage: '" + stage.getName() + "'");
if (get(stage.getName()) != null)
throw new LimelightException("Duplicate stage name: '" + stage.getName() + "'");
stages.add(stage);
stage.getEventHandler().add(StageActivatedEvent.class, ActivateStageAction.instance);
stage.getEventHandler().add(StageDeactivatedEvent.class, DeactivateStageAction.instance);
stage.getEventHandler().add(StageClosedEvent.class, StageClosedAction.instance);
stage.setTheater(this);
}
use of limelight.LimelightException in project limelight by slagyr.
the class PropPanelLayout method snapToSize.
public void snapToSize(PropPanel panel) {
if (// can happen if removed from tree
panel.getParent() == null)
return;
Box maxArea = panel.getParent().getChildConsumableBounds();
Style style = panel.getStyle();
if (style.getCompiledWidth() instanceof AutoDimensionValue && style.getCompiledHeight() instanceof GreedyDimensionValue)
throw new LimelightException("A greedy height is not allowed with auto width.");
int newWidth = style.getCompiledWidth().calculateDimension(maxArea.width, style.getCompiledMinWidth(), style.getCompiledMaxWidth(), panel.greediness.width);
int newHeight = style.getCompiledHeight().calculateDimension(maxArea.height, style.getCompiledMinHeight(), style.getCompiledMaxHeight(), panel.greediness.height);
// TODO MDM - Hacky Hack!!!! More thought needs to go into the way layouts are down and how greedy fits into it all
// if(topLevel && style.getCompiledWidth() instanceof GreedyDimensionValue && panel.getWidth() > newWidth)
// newWidth = panel.getWidth();
// if(topLevel && style.getCompiledHeight() instanceof GreedyDimensionValue && panel.getHeight() > newHeight)
// newHeight = panel.getHeight();
panel.setSize(newWidth, newHeight);
panel.resetPendingSizeChange();
}
Aggregations