List of usage examples for com.google.gwt.resources.client DataResource getSafeUri
SafeUri getSafeUri();
From source file:com.philbeaudoin.quebec.client.scene.SpriteResources.java
License:Apache License
private void setInfoForType(Type type, DataResource dataResource, double resizeFactor) { imageInfos.set(type.ordinal(), new Info(dataResource.getSafeUri(), resizeFactor)); }
From source file:com.philbeaudoin.quebec.client.scene.SpriteResources.java
License:Apache License
private void setInfoForTile(InfluenceType influenceType, int century, DataResource dataResource, DataResource... buildingDataResources) { tileInfos[influenceType.ordinal()][century][0] = new Info(dataResource.getSafeUri(), 0.000303); int index = 1; for (DataResource buildingDataResource : buildingDataResources) { tileInfos[influenceType.ordinal()][century][index] = new Info(buildingDataResource.getSafeUri(), 0.000303);//from ww w. ja v a2s . co m index++; } }
From source file:com.philbeaudoin.quebec.client.scene.SpriteResources.java
License:Apache License
private void setInfoForCube(PlayerColor playerColor, DataResource dataResource) { cubeInfos[playerColor.normalColorIndex()] = new Info(dataResource.getSafeUri(), 0.000315); }
From source file:com.philbeaudoin.quebec.client.scene.SpriteResources.java
License:Apache License
private void setInfoForPawn(PlayerColor playerColor, DataResource dataResource) { pawnInfos[playerColor.architectIndex()] = new Info(dataResource.getSafeUri(), 0.000355); }
From source file:com.philbeaudoin.quebec.client.scene.SpriteResources.java
License:Apache License
private void setInfoForLeader(LeaderCard leaderCard, DataResource dataResource) { leaderInfos[leaderCard.ordinal()] = new Info(dataResource.getSafeUri(), 0.000265); }
From source file:com.philbeaudoin.quebec.client.scene.SpriteResources.java
License:Apache License
private void setInfoForInfluenceZone(InfluenceType influenceZone, DataResource dataResource) { influenceZoneInfos[influenceZone.ordinal()] = new Info(dataResource.getSafeUri(), 0.000303); }
From source file:com.philbeaudoin.quebec.client.scene.SpriteResources.java
License:Apache License
private void setInfoForZoneLogo(InfluenceType influenceZone, DataResource dataResource) { zoneLogoInfos[influenceZone.ordinal()] = new Info(dataResource.getSafeUri(), 0.000313); }
From source file:com.philbeaudoin.quebec.client.scene.SpriteResources.java
License:Apache License
private void setInfoForStarToken(PlayerColor starTokenColor, int nbStars, DataResource dataResource) { starTokensInfo[starTokenColor.normalColorIndex()][nbStars - 1] = new Info(dataResource.getSafeUri(), 0.000403);//from ww w . j a va 2 s . c o m }
From source file:com.philbeaudoin.quebec.client.scene.SpriteResources.java
License:Apache License
private void setInfoForAction(ActionType actionType, DataResource dataResource) { actionInfos[actionType.ordinal()] = new Info(dataResource.getSafeUri(), 0.000303); }
From source file:net.codemirror.mode.ModeInfo.java
License:Apache License
private static void indexModes(DataResource[] all) { for (DataResource r : all) { modeUris.put(r.getName(), r.getSafeUri()); }// w w w . j a v a2s . c o m JsArray<ModeInfo> modeList = all(); modeList.push(gerrit_commit()); byMime = NativeMap.create(); JsArray<ModeInfo> filtered = JsArray.createArray().cast(); for (ModeInfo m : Natives.asList(modeList)) { if (modeUris.containsKey(m.mode())) { filtered.push(m); for (String mimeType : Natives.asList(m.mimes())) { byMime.put(mimeType, m); } byMime.put(m.mode(), m); } } Collections.sort(Natives.asList(filtered), new Comparator<ModeInfo>() { @Override public int compare(ModeInfo a, ModeInfo b) { return a.name().toLowerCase().compareTo(b.name().toLowerCase()); } }); setAll(filtered); }