public boolean build() { scrollPaneTable.clearChildren(); if (properties.getProxies().first() instanceof GroupEntityProxy) { return false; } boolean atLeastOneComponentAdded = false; for (Class<? extends Component> clazz : componentClasses) { if (EntityUtils.isComponentCommon(clazz, properties.getProxies()) == false) { VisTextButton button = new VisTextButton(clazz.getSimpleName(), buttonStyle); button.setFocusBorderEnabled(false); scrollPaneTable.add(button).expandX().fillX().row(); button.addListener( new VisChangeListener( (event, actor) -> { listener.selected(clazz); remove(); })); atLeastOneComponentAdded = true; } } invalidateHierarchy(); return atLeastOneComponentAdded; }
@Override public void updateUIFromEntities( ImmutableArray<EntityProxy> proxies, Field field, Class<?> fieldType) throws ReflectiveOperationException { StringStringMapView view = views.get(field); if (proxies.size() > 1) view.multipleSelected(); else view.setMap(EntityUtils.getFirstEntityComponent(proxies, Variables.class)); }
@Override public void updateUIFromEntities( ImmutableArray<EntityProxy> proxies, Field field, Class<?> fieldType) throws ReflectiveOperationException { Vector2ArrayView view = views.get(field); if (proxies.size() > 1) view.setMultipleSelected(true); else view.setVectors(EntityUtils.getFirstEntityComponent(proxies, VisPolygon.class).vertices); }