src/demo/share/java2d/J2DBench/src/j2dbench/tests/iio/InputTests.java

Print this page




 144         private int type;
 145 
 146         public InputType(String nodeName, String description, int type) {
 147             super(generalSourceRoot, nodeName, description, false);
 148             this.type = type;
 149         }
 150 
 151         public int getType() {
 152             return type;
 153         }
 154 
 155         public String getAbbreviatedModifierDescription(Object value) {
 156             return getModifierValueName(value);
 157         }
 158 
 159         public String getModifierValueName(Object val) {
 160             return getNodeName();
 161         }
 162     }
 163 
 164     protected static abstract class Context {
 165         int size;
 166         Object input;
 167         int inputType;
 168         InputStream origStream;
 169 
 170         Context(TestEnvironment env, Result result) {
 171             size = env.getIntValue(sizeList);
 172             if (hasImageIO) {
 173                 if (env.getModifier(useCacheTog) != null) {
 174                     ImageIO.setUseCache(env.isEnabled(useCacheTog));
 175                 }
 176             }
 177 
 178             InputType t = (InputType)env.getModifier(generalSourceRoot);
 179             inputType = t.getType();
 180         }
 181 
 182         void initInput() {
 183             if ((inputType == INPUT_FILE) ||
 184                 (inputType == INPUT_URL) ||




 144         private int type;
 145 
 146         public InputType(String nodeName, String description, int type) {
 147             super(generalSourceRoot, nodeName, description, false);
 148             this.type = type;
 149         }
 150 
 151         public int getType() {
 152             return type;
 153         }
 154 
 155         public String getAbbreviatedModifierDescription(Object value) {
 156             return getModifierValueName(value);
 157         }
 158 
 159         public String getModifierValueName(Object val) {
 160             return getNodeName();
 161         }
 162     }
 163 
 164     protected abstract static class Context {
 165         int size;
 166         Object input;
 167         int inputType;
 168         InputStream origStream;
 169 
 170         Context(TestEnvironment env, Result result) {
 171             size = env.getIntValue(sizeList);
 172             if (hasImageIO) {
 173                 if (env.getModifier(useCacheTog) != null) {
 174                     ImageIO.setUseCache(env.isEnabled(useCacheTog));
 175                 }
 176             }
 177 
 178             InputType t = (InputType)env.getModifier(generalSourceRoot);
 179             inputType = t.getType();
 180         }
 181 
 182         void initInput() {
 183             if ((inputType == INPUT_FILE) ||
 184                 (inputType == INPUT_URL) ||