From 4145611b9c13901d8795f86dbd9807d502f135ef Mon Sep 17 00:00:00 2001 From: Andrzej Kapolka Date: Thu, 11 Mar 2010 02:03:04 +0000 Subject: [PATCH] Added method to get color class by id. git-svn-id: svn+ssh://src.earth.threerings.net/nenya/trunk@902 ed5b42cb-e716-0410-a449-f6a68f950b19 --- src/java/com/threerings/media/image/ColorPository.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/java/com/threerings/media/image/ColorPository.java b/src/java/com/threerings/media/image/ColorPository.java index ba58c176..b28d8d0a 100644 --- a/src/java/com/threerings/media/image/ColorPository.java +++ b/src/java/com/threerings/media/image/ColorPository.java @@ -397,7 +397,7 @@ public class ColorPository implements Serializable */ public ColorRecord getColorRecord (int classId, int colorId) { - ClassRecord record = _classes.get(classId); + ClassRecord record = getClassRecord(classId); if (record == null) { // if they request color class zero, we assume they're just // decoding a blank colorprint, otherwise we complain @@ -433,6 +433,14 @@ public class ColorPository implements Serializable return record.colors.get(colorId); } + /** + * Looks up the requested color class record. + */ + public ClassRecord getClassRecord (int classId) + { + return _classes.get(classId); + } + /** * Adds a fully configured color class record to the pository. This is only called by the XML * parsing code, so pay it no mind.