public AnimationTypePicker() { super("Pick an Animation Type"); PlainContainer container = new PlainContainer(); container.setXSpacing(10); container.setYSpacing(10); GridLayout grid = new GridLayout(container, 5); for (Animation animation : Itchy.registry.getAnimations()) { AbstractComponent component = this.createButton(animation); grid.addChild(component); } grid.endRow(); VerticalScroll vs = new VerticalScroll(container); this.clientArea.addChild(vs); }
protected Component createChoices(Container parent) { PlainContainer container = new PlainContainer(); parent.addChild(container); Component focus = null; GridLayout gridLayout = new GridLayout(container, 5); container.setLayout(gridLayout); container.addStyle("pickGrid"); for (String name : this.resources.ninePatchNames()) { NinePatch ninePatch = this.resources.getNinePatch(name); AbstractComponent component = this.createNinePatchButton(ninePatch); if (ninePatch == this.defaultNinePatch) { focus = component; } gridLayout.addChild(component); } gridLayout.endRow(); return focus; }