use of com.codename1.util.CaseInsensitiveOrder in project CodenameOne by codenameone.
the class StyleParser method getBackgroundTypes.
/**
* Gets the available background type strings (which can be passed to {@link StyleInfo#setBgType(java.lang.String) }
* @return
*/
public static List<String> getBackgroundTypes() {
ArrayList<String> out = new ArrayList<String>();
out.addAll(bgTypes().keySet());
Collections.sort(out, new CaseInsensitiveOrder());
return out;
}
use of com.codename1.util.CaseInsensitiveOrder in project CodenameOne by codenameone.
the class Properties method store.
/**
* Stores the mappings in this {@code Properties} object to {@code out},
* putting the specified comment at the beginning.
*
* @param writer the {@code Writer}
* @param comment an optional comment to be written, or null
* @throws IOException
* @throws ClassCastException if a key or value is not a string
* @since 1.6
*/
public synchronized void store(Writer writer, String comment) throws IOException {
if (comment != null && comment.length() > 0) {
writer.write("#");
writer.write(comment);
writer.write("\n");
writer.write("#");
writer.write(new Date().toString());
writer.write("\n");
}
StringBuilder sb = new StringBuilder(200);
ArrayList<String> k = new ArrayList<String>(keySet());
Collections.sort(k, new CaseInsensitiveOrder());
for (String key : k) {
dumpString(sb, key, true);
sb.append('=');
dumpString(sb, (String) get(key), false);
sb.append("\n");
writer.write(sb.toString());
sb.setLength(0);
}
writer.flush();
}
Aggregations