/** * Sorts by modified date with oldest first. */ private void sortDrawablesOldest() { Sort.instance().sort(drawables, (DrawableData o1, DrawableData o2) -> { if (o1.file.lastModified() < o2.file.lastModified()) { return -1; } else if (o1.file.lastModified() > o2.file.lastModified()) { return 1; } else { return 0; } }); refreshDrawableDisplay(); }
/** * Sorts by modified date with newest first. */ private void sortDrawablesNewest() { Sort.instance().sort(drawables, (DrawableData o1, DrawableData o2) -> { if (o1.file.lastModified() < o2.file.lastModified()) { return 1; } else if (o1.file.lastModified() > o2.file.lastModified()) { return -1; } else { return 0; } }); refreshDrawableDisplay(); }
private void sortFontsOldest() { Sort.instance().sort(fonts, (FontData o1, FontData o2) -> { if (o1.file.lastModified() < o2.file.lastModified()) { return -1; } else if (o1.file.lastModified() > o2.file.lastModified()) { return 1; } else { return 0; } }); refreshTable(); }
private void sortFontsNewest() { Sort.instance().sort(fonts, (FontData o1, FontData o2) -> { if (o1.file.lastModified() < o2.file.lastModified()) { return 1; } else if (o1.file.lastModified() > o2.file.lastModified()) { return -1; } else { return 0; } }); refreshTable(); }
private void sortFontsAZ() { Sort.instance().sort(colors, new Comparator<ColorData>() { @Override public int compare(ColorData o1, ColorData o2) { return o1.toString().compareToIgnoreCase(o2.toString()); } }); refreshTable(); }
private void sortFontsZA() { Sort.instance().sort(colors, new Comparator<ColorData>() { @Override public int compare(ColorData o1, ColorData o2) { return o1.toString().compareToIgnoreCase(o2.toString()) * -1; } }); refreshTable(); }
@Override public void beforeGroup (int group, Array<Decal> contents) { if (group == GROUP_BLEND) { Sort.instance().sort(contents, comparator); Gdx.gl.glEnable(GL20.GL_BLEND); // no need for writing into the z buffer if transparent decals are the last thing to be rendered // and they are rendered back to front Gdx.gl.glDepthMask(false); } else { // FIXME sort by material } }
public void beforeGroup(int paramInt, Array<Decal> paramArray) { if (paramInt == 1) { Sort.instance().sort(paramArray, this.comparator); Gdx.gl10.glEnable(3042); Gdx.gl10.glDepthMask(false); } }
/** * Sorts alphabetically from A to Z. */ private void sortDrawablesAZ() { Sort.instance().sort(drawables, (DrawableData o1, DrawableData o2) -> o1.toString().compareToIgnoreCase(o2.toString())); refreshDrawableDisplay(); }
/** * Sorts alphabetically from Z to A. */ private void sortDrawablesZA() { Sort.instance().sort(drawables, (DrawableData o1, DrawableData o2) -> o1.toString().compareToIgnoreCase(o2.toString()) * -1); refreshDrawableDisplay(); }
private void sortFontsAZ() { Sort.instance().sort(fonts, (FontData o1, FontData o2) -> o1.toString().compareToIgnoreCase(o2.toString())); refreshTable(); }
private void sortFontsZA() { Sort.instance().sort(fonts, (FontData o1, FontData o2) -> o1.toString().compareToIgnoreCase(o2.toString()) * -1); refreshTable(); }
/** * Returns a sorted list of render commands stored in this buffer. */ public List<? extends BaseRenderCommand> getCommands() { Sort.instance().sort(contents.items, 0, contents.size); return Arrays.asList(contents.items).subList(0, contents.size); }
/** * Sorts this array. The array elements must implement {@link Comparable}. * This method is not thread safe (uses {@link Sort#instance()}). */ public void sort() { Sort.instance().sort(items, 0, size); }
/** * Sorts the array. This method is not thread safe (uses * {@link Sort#instance()}). */ public void sort(Comparator<? super T> comparator) { Sort.instance().sort(items, comparator, 0, size); }