@SuppressWarnings("unchecked") public LayerAuthoritiesAndIdentifiersPanel(final String id, final boolean isRootLayer, final IModel<? extends CatalogInfo> layerModel) { super(id); // authority URLs for the this layer IModel<List<AuthorityURLInfo>> authURLsModel; authURLsModel = LiveCollectionModel.list(new PropertyModel<List<AuthorityURLInfo>>( layerModel, "authorityURLs")); AuthorityURLListEditor authUrlEditor = new AuthorityURLListEditor("authorityurls", authURLsModel); add(authUrlEditor); // Layer Identifiers for this layer IModel<List<LayerIdentifierInfo>> identifiersModel; identifiersModel = LiveCollectionModel.list(new PropertyModel<List<LayerIdentifierInfo>>( layerModel, "identifiers")); LayerIdentifierListEditor identifiersEditor = new LayerIdentifierListEditor( "layerIdentifiers", identifiersModel, authUrlEditor); if (!isRootLayer) { WMSInfo serviceInfo = WMS.get().getServiceInfo(); List<AuthorityURLInfo> rootLayerAuthorities = serviceInfo.getAuthorityURLs(); identifiersEditor.setBaseAuthorities(rootLayerAuthorities); } add(identifiersEditor); }
public JAIEXTPanel(String id, IModel<JAIInfo> model) { super(id, model); PropertyModel<JAIEXTInfo> jaiextModel = new PropertyModel<JAIEXTInfo>(model, "JAIEXTInfo"); @SuppressWarnings({"rawtypes", "unchecked"}) Palette jaiextSelector = new Palette<String>( "jaiextOps", LiveCollectionModel.set(new PropertyModel(jaiextModel, "JAIOperations")), LiveCollectionModel.set(new PropertyModel(jaiextModel, "JAIEXTOperations")), new JAChoiceRenderer(), 7, false) { private static final long serialVersionUID = -4665147378650094510L; /** Override otherwise the header is not i18n'ized */ @Override public Component newSelectedHeader(final String componentId) { return new Label( componentId, new ResourceModel("JAIEXTPanel.selectedHeader")); } /** Override otherwise the header is not i18n'ized */ @Override public Component newAvailableHeader(final String componentId) { return new Label( componentId, new ResourceModel("JAIEXTPanel.availableHeader")); } }; jaiextSelector.add(new DefaultTheme()); add(jaiextSelector); }
IModel stylesModel = LiveCollectionModel.set(new PropertyModel(layerModel, "styles")); Palette extraStyles = new Palette("extraStyles", stylesModel, styles, new StyleNameRenderer(), 10, false) {
protected void build(IModel info, Form form) { // overview policy form.add( new DropDownChoice( "overviewPolicy", Arrays.asList(OverviewPolicy.values()), new OverviewPolicyRenderer())); form.add(new CheckBox("subsamplingEnabled")); // limited srs list TextArea srsList = new SRSListTextArea( "srs", LiveCollectionModel.list(new PropertyModel(info, "sRS"))); form.add(srsList); // resource limits TextField maxInputMemory = new TextField("maxInputMemory"); maxInputMemory.add(RangeValidator.minimum(0l)); form.add(maxInputMemory); TextField maxOutputMemory = new TextField("maxOutputMemory"); maxOutputMemory.add(RangeValidator.minimum(0l)); form.add(maxOutputMemory); // max dimension values TextField<Integer> maxRequestedDimensionValues = new TextField<Integer>("maxRequestedDimensionValues"); maxRequestedDimensionValues.add(RangeValidator.minimum(0)); form.add(maxRequestedDimensionValues); // lat-lon VS lon-lat form.add(new CheckBox("latLon")); }
LiveCollectionModel.set(new PropertyModel<Set<StyleInfo>>(layerModel, "styles")); Palette<StyleInfo> extraStyles = new Palette<StyleInfo>(
add(new TextField("title")); add(new TextArea("abstract")); add(new KeywordsEditor("keywords", LiveCollectionModel.list(new PropertyModel(model, "keywords")))); add(new MetadataLinkEditor("metadataLinks", model));
form.add(new TextField("title")); form.add(new TextArea("abstract")); form.add(new KeywordsEditor("keywords", LiveCollectionModel.list(new PropertyModel(infoModel, "keywords")))); form.add(new TextField("fees")); form.add(new TextField("accessConstraints"));
new KeywordsEditor( "keywords", LiveCollectionModel.list( new PropertyModel<List<KeywordInfo>>(model, "keywords")))); add(new MetadataLinkEditor("metadataLinks", model));
new KeywordsEditor( "keywords", LiveCollectionModel.list( new PropertyModel<List<KeywordInfo>>(myModel, "keywords"))));
new KeywordsEditor( "keywords", LiveCollectionModel.list(new PropertyModel(infoModel, "keywords")))); form.add(new TextField("fees")); form.add(new TextField("accessConstraints"));
"srs", LiveCollectionModel.list(new PropertyModel(info, "sRS"))); form.add(srsList);
new Palette<String>( "interpolationMethods", LiveCollectionModel.list( new PropertyModel<List<String>>(coverage, "interpolationMethods")), new WCSInterpolationModel(), new Palette<String>( "formatPalette", LiveCollectionModel.list( new PropertyModel<List<String>>(coverage, "supportedFormats")), new WCSFormatsModel(),
TextArea srsList = new TextArea("srs", LiveCollectionModel.list(new PropertyModel(info, "sRS"))) { @Override public IConverter getConverter(Class type) {