@Override public void setLayer(WMTSLayer layer) { this.layer = layer; if (styleName.isEmpty()) { StyleImpl defaultStyle = layer.getDefaultStyle(); if (defaultStyle != null) { styleName = defaultStyle.getName(); } } }
/** * <!-- begin-user-doc --> * <!-- end-user-doc --> * * @generated modifiable */ public Object parse(ElementInstance instance, Node node, Object value) throws Exception { StyleImpl ret = new StyleImpl(); // Currently un-implemented //ret.setStyleURL((StyleURL)node.getChildValue("StyleURL")); //ret.setStyleSheetURL((StyleSheetURL)node.getChildValue("StyleSheetURL")); //ret.setLegendURLs(node.getChildValues("LegendURL")); if (node.getChildValue("Abstract")!= null) ret.setAbstract(new SimpleInternationalString((String)node.getChildValue("Abstract"))); if (node.getChildValue("Title") != null) ret.setTitle(new SimpleInternationalString((String)node.getChildValue("Title"))); ret.setName((String)node.getChildValue("Name")); return ret; }
@Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); String text = null; if (value != null) { StyleImpl style = (StyleImpl) value; InternationalString title = style.getTitle(); text = title.toString(); } label.setText(text); return label; } }
List<StyleImpl> sList = new ArrayList<>(); for (StyleType styleType : styles) { StyleImpl style = new StyleImpl(); style.setName(styleType.getIdentifier().getValue()); StringBuilder t = new StringBuilder(); for (Object title1 : styleType.getTitle()) { t.append(title1.toString()); style.setTitle(new SimpleInternationalString(t.toString())); style.setDefault(styleType.isIsDefault()); if (styleType.isIsDefault()) { layer.setDefaultStyle(style);
public Object getValue(Element element, ElementValue[] value, Attributes attrs, Map hints) throws SAXException, OperationNotSupportedException { StyleImpl style = new StyleImpl(); List legendURLS = new ArrayList(); for (int i = 0; i < value.length; i++) { if (sameName(elems[0], value[i])) { String name = (String) value[i].getValue(); style.setName(name); } if (sameName(elems[1], value[i])) { String title = (String) value[i].getValue(); style.setTitle(new SimpleInternationalString(title)); } if (sameName(elems[2], value[i])) { String _abstract = (String) value[i].getValue(); style.setAbstract(new SimpleInternationalString(_abstract)); } if (sameName(elems[3], value[i])) { legendURLS.add((String) value[i].getValue()); } if (sameName(elems[4], value[i])) { // TODO Implement StyleSheet URL } if (sameName(elems[5], value[i])) { // TODO implement StyleURL } } style.setLegendURLs(legendURLS); return style; }
public void addLayer(String layerName, StyleImpl style) { if (style == null) { addLayer(layerName, ""); return; } addLayer(layerName, style.getName()); }
@Override public Component getListCellRendererComponent(JList list, Object value, int index, boolean isSelected, boolean cellHasFocus) { JLabel label = (JLabel) super.getListCellRendererComponent(list, value, index, isSelected, cellHasFocus); String text = null; if (value != null) { StyleImpl style = (StyleImpl) value; InternationalString title = style.getTitle(); text = title.toString(); } label.setText(text); return label; } }
public Object getValue(Element element, ElementValue[] value, Attributes attrs, Map hints) throws SAXException, OperationNotSupportedException { StyleImpl style = new StyleImpl(); style.setName(name); style.setTitle(new SimpleInternationalString(title)); style.setAbstract(new SimpleInternationalString(_abstract));
public void addLayer(Layer layer, StyleImpl style) { if (style == null) { addLayer(layer.getName(), ""); return; } addLayer(layer.getName(), style.getName()); }
StyleImpl defaultStyle = layer.getDefaultStyle(); if (defaultStyle != null) { setStyleName(defaultStyle.getName());
buf.append(","); buf.append(iter.next().getName()); hasOne = true;
style = styleList.get(0); for (StyleImpl currentstyle : styleList) { if (currentstyle.getName().equals(styleName)) { style = currentstyle;
style = styleList.get(0); for (StyleImpl currentstyle : styleList) { if (currentstyle.getName().equals(styleName)) { style = currentstyle;
String styleName = null; if (selectedStyle != null) { styleName = selectedStyle.getName();
String styleName = null; if (selectedStyle != null) { styleName = selectedStyle.getName();