@Override public void applyPresentation(Object id) { if (isUsePresentations() && presentations != null) { Presentation p = presentations.getPresentation(id); applyPresentation(p); } else { throw new UnsupportedOperationException("Component doesn't use presentations"); } }
protected void fillPresentations(Presentations presentations) { presentation.removeAllItems(); Collection<Object> availablePresentationIds = presentations.getPresentationIds(); for (Object pId : availablePresentationIds) { Presentation p = presentations.getPresentation(pId); presentation.addItem(p); presentation.setItemCaption(p, presentations.getCaption(pId)); } }
@Override public void applyPresentationAsDefault(Object id) { if (isUsePresentations() && presentations != null) { Presentation p = presentations.getPresentation(id); if (p != null) { presentations.setDefault(p); applyPresentation(p); } } else { throw new UnsupportedOperationException("Component doesn't use presentations"); } }