use of limelight.LimelightException in project limelight by slagyr.
the class ScenePanel method addToIndex.
public void addToIndex(PropPanel prop) {
PropPanel value = index.get(prop.getId());
if (value != null && value != prop)
throw new LimelightException("Duplicate id: " + prop.getId());
index.put(prop.getId(), prop);
}
use of limelight.LimelightException in project limelight by slagyr.
the class Packer method pack.
public void pack(String productionPath, String llpName) {
try {
DirectoryZipper zipper = DirectoryZipper.fromDir(productionPath);
if (llpName == null)
llpName = zipper.getProductionName();
OutputStream output = Context.fs().outputStream(llpName + ".llp");
zipper.zipTo(output);
} catch (Exception e) {
throw new LimelightException("Failed to pack production: " + productionPath, e);
}
}
use of limelight.LimelightException in project limelight by slagyr.
the class JavaPlayer method addEventActionFor.
public void addEventActionFor(Object player, String eventPrefix, String eventName, String methodName, EventHandler eventHandler) {
String eventClassName = eventPrefix + StringUtil.capitalCamelCase(eventName.substring(2)) + "Event";
if ("limelight.ui.events.panel.CastEvent".equals(eventClassName))
return;
Class<? extends Event> eventClass;
try {
eventClass = (Class<? extends Event>) Class.forName(eventClassName);
} catch (Exception e) {
throw new LimelightException(e);
}
if (eventClass == null)
return;
Method eventMethod = findMethod(methodName);
final JavaEventAction action = new JavaEventAction(player, eventMethod);
eventHandler.add(eventClass, action);
}
use of limelight.LimelightException in project limelight by slagyr.
the class ImagePanel method getImage.
public Image getImage() {
if (image == null && filename != null && filename.trim().length() > 0) {
try {
Scene rootPanel = getRoot();
if (rootPanel != null && filename != null) {
ImageCache imageCache = rootPanel.getImageCache();
setImage(imageCache.getImage(filename));
}
} catch (Exception e) {
throw new LimelightException("Could not load image: " + filename + " (" + e.toString() + ")");
}
}
return image;
}
use of limelight.LimelightException in project limelight by slagyr.
the class Downloader method download.
public String download(String resource) {
try {
URL url = parseURL(resource);
URLConnection urlConnection = url.openConnection();
String destination = calculateDesintationFile(url, urlConnection);
downloadData(urlConnection, destination);
return destination;
} catch (Exception e) {
throw new LimelightException("Failed to download resource: " + e.toString(), e);
}
}
Aggregations