当前位置: 首页>>代码示例>>Java>>正文


Java LayerDrawType.setValue方法代码示例

本文整理汇总了Java中org.meteoinfo.layer.LayerDrawType.setValue方法的典型用法代码示例。如果您正苦于以下问题:Java LayerDrawType.setValue方法的具体用法?Java LayerDrawType.setValue怎么用?Java LayerDrawType.setValue使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在org.meteoinfo.layer.LayerDrawType的用法示例。


在下文中一共展示了LayerDrawType.setValue方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。

示例1: exportWebMapLayer

import org.meteoinfo.layer.LayerDrawType; //导入方法依赖的package包/类
/**
 * Export web map layer element
 *
 * @param m_Doc XML document
 * @param parent Parent element
 * @param wmLayer The web map layer
 * @param projectFilePath Project file path
 */
public void exportWebMapLayer(Document m_Doc, Element parent, WebMapLayer wmLayer, String projectFilePath) {
    Element Layer = m_Doc.createElement("Layer");
    Attr Handle = m_Doc.createAttribute("Handle");
    Attr LayerName = m_Doc.createAttribute("LayerName");
    Attr webProvider = m_Doc.createAttribute("WebMapProvider");
    Attr Visible = m_Doc.createAttribute("Visible");
    Attr IsMaskout = m_Doc.createAttribute("IsMaskout");
    Attr LayerType = m_Doc.createAttribute("LayerType");
    Attr LayerDrawType = m_Doc.createAttribute("LayerDrawType");
    Attr transparencyPerc = m_Doc.createAttribute("TransparencyPerc");

    Handle.setValue(String.valueOf(wmLayer.getHandle()));
    LayerName.setValue(wmLayer.getLayerName());
    Visible.setValue(String.valueOf(wmLayer.isVisible()));
    webProvider.setValue(wmLayer.getWebMapProvider().toString());
    IsMaskout.setValue(String.valueOf(wmLayer.isMaskout()));
    LayerType.setValue(wmLayer.getLayerType().toString());
    LayerDrawType.setValue(wmLayer.getLayerDrawType().toString());
    transparencyPerc.setValue(String.valueOf(wmLayer.getTransparency()));

    Layer.setAttributeNode(Handle);
    Layer.setAttributeNode(LayerName);
    Layer.setAttributeNode(Visible);
    Layer.setAttributeNode(webProvider);
    Layer.setAttributeNode(IsMaskout);
    Layer.setAttributeNode(LayerType);
    Layer.setAttributeNode(LayerDrawType);
    Layer.setAttributeNode(transparencyPerc);

    parent.appendChild(Layer);
}
 
开发者ID:meteoinfo,项目名称:MeteoInfoLib,代码行数:40,代码来源:MapView.java

示例2: exportVectorLayerElement

import org.meteoinfo.layer.LayerDrawType; //导入方法依赖的package包/类
/**
 * Export vector layer element
 *
 * @param m_Doc XML document
 * @param parent Parent XML element
 * @param aVLayer The vector layer
 * @param projectFilePath Project file path
 */
public void exportVectorLayerElement(Document m_Doc, Element parent, VectorLayer aVLayer,
        String projectFilePath) {
    Element Layer = m_Doc.createElement("Layer");
    Attr Handle = m_Doc.createAttribute("Handle");
    Attr LayerName = m_Doc.createAttribute("LayerName");
    Attr FileName = m_Doc.createAttribute("FileName");
    Attr Visible = m_Doc.createAttribute("Visible");
    Attr IsMaskout = m_Doc.createAttribute("IsMaskout");
    Attr LayerType = m_Doc.createAttribute("LayerType");
    Attr LayerDrawType = m_Doc.createAttribute("LayerDrawType");
    Attr ShapeType = m_Doc.createAttribute("ShapeType");
    Attr AvoidCollision = m_Doc.createAttribute("AvoidCollision");
    Attr TransparencyPerc = m_Doc.createAttribute("TransparencyPerc");
    Attr Expanded = m_Doc.createAttribute("Expanded");

    Handle.setValue(String.valueOf(aVLayer.getHandle()));
    LayerName.setValue(aVLayer.getLayerName());
    try {
        FileName.setValue(GlobalUtil.getRelativePath(aVLayer.getFileName(), projectFilePath));
    } catch (IOException ex) {
        Logger.getLogger(MapView.class.getName()).log(Level.SEVERE, null, ex);
    }
    Visible.setValue(String.valueOf(aVLayer.isVisible()));
    IsMaskout.setValue(String.valueOf(aVLayer.isMaskout()));
    LayerType.setValue(aVLayer.getLayerType().toString());
    LayerDrawType.setValue(aVLayer.getLayerDrawType().toString());
    ShapeType.setValue(aVLayer.getShapeType().toString());
    AvoidCollision.setValue(String.valueOf(aVLayer.getAvoidCollision()));
    TransparencyPerc.setValue(String.valueOf(aVLayer.getTransparency()));
    Expanded.setValue(String.valueOf(aVLayer.isExpanded()));

    Layer.setAttributeNode(Handle);
    Layer.setAttributeNode(LayerName);
    Layer.setAttributeNode(FileName);
    Layer.setAttributeNode(Visible);
    Layer.setAttributeNode(IsMaskout);
    Layer.setAttributeNode(LayerType);
    Layer.setAttributeNode(LayerDrawType);
    Layer.setAttributeNode(ShapeType);
    Layer.setAttributeNode(AvoidCollision);
    Layer.setAttributeNode(TransparencyPerc);
    Layer.setAttributeNode(Expanded);

    //Add legend scheme            
    aVLayer.getLegendScheme().exportToXML(m_Doc, Layer);

    //Add label set
    exportLabelSet(m_Doc, Layer, aVLayer.getLabelSet());

    //Add graphics
    exportGraphics(m_Doc, Layer, aVLayer.getLabelPoints());

    //Add chart set
    exportChartSet(m_Doc, Layer, aVLayer.getChartSet());

    //Add charts
    exportChartGraphics(m_Doc, Layer, aVLayer.getChartPoints());

    //Add visible scale
    exportVisibleScale(m_Doc, Layer, aVLayer.getVisibleScale());

    parent.appendChild(Layer);
}
 
开发者ID:meteoinfo,项目名称:MeteoInfoLib,代码行数:72,代码来源:MapView.java

示例3: exportImageLayer

import org.meteoinfo.layer.LayerDrawType; //导入方法依赖的package包/类
/**
 * Export image layer element
 *
 * @param m_Doc XML document
 * @param parent Parent element
 * @param aILayer The image layer
 * @param projectFilePath Project file path
 */
public void exportImageLayer(Document m_Doc, Element parent, ImageLayer aILayer, String projectFilePath) {
    Element Layer = m_Doc.createElement("Layer");
    Attr Handle = m_Doc.createAttribute("Handle");
    Attr LayerName = m_Doc.createAttribute("LayerName");
    Attr FileName = m_Doc.createAttribute("FileName");
    Attr Visible = m_Doc.createAttribute("Visible");
    Attr IsMaskout = m_Doc.createAttribute("IsMaskout");
    Attr LayerType = m_Doc.createAttribute("LayerType");
    Attr LayerDrawType = m_Doc.createAttribute("LayerDrawType");
    Attr transparencyPerc = m_Doc.createAttribute("TransparencyPerc");
    Attr transparencyColor = m_Doc.createAttribute("TransparencyColor");
    Attr setTransColor = m_Doc.createAttribute("SetTransColor");

    Handle.setValue(String.valueOf(aILayer.getHandle()));
    LayerName.setValue(aILayer.getLayerName());
    try {
        FileName.setValue(GlobalUtil.getRelativePath(aILayer.getFileName(), projectFilePath));
    } catch (IOException ex) {
        Logger.getLogger(MapView.class.getName()).log(Level.SEVERE, null, ex);
    }
    Visible.setValue(String.valueOf(aILayer.isVisible()));
    IsMaskout.setValue(String.valueOf(aILayer.isMaskout()));
    LayerType.setValue(aILayer.getLayerType().toString());
    LayerDrawType.setValue(aILayer.getLayerDrawType().toString());
    transparencyPerc.setValue(String.valueOf(aILayer.getTransparency()));
    transparencyColor.setValue(ColorUtil.toHexEncoding(aILayer.getTransparencyColor()));
    setTransColor.setValue(String.valueOf(aILayer.isUseTransColor()));

    Layer.setAttributeNode(Handle);
    Layer.setAttributeNode(LayerName);
    Layer.setAttributeNode(FileName);
    Layer.setAttributeNode(Visible);
    Layer.setAttributeNode(IsMaskout);
    Layer.setAttributeNode(LayerType);
    Layer.setAttributeNode(LayerDrawType);
    Layer.setAttributeNode(transparencyPerc);
    Layer.setAttributeNode(transparencyColor);
    Layer.setAttributeNode(setTransColor);

    //Add visible scale
    exportVisibleScale(m_Doc, Layer, aILayer.getVisibleScale());

    parent.appendChild(Layer);
}
 
开发者ID:meteoinfo,项目名称:MeteoInfoLib,代码行数:53,代码来源:MapView.java

示例4: exportRasterLayer

import org.meteoinfo.layer.LayerDrawType; //导入方法依赖的package包/类
/**
 * Export raster layer element
 *
 * @param m_Doc XML document
 * @param parent Parent element
 * @param aILayer The raster layer
 * @param projectFilePath Project file path
 */
public void exportRasterLayer(Document m_Doc, Element parent, RasterLayer aILayer, String projectFilePath) {
    Element Layer = m_Doc.createElement("Layer");
    Attr Handle = m_Doc.createAttribute("Handle");
    Attr LayerName = m_Doc.createAttribute("LayerName");
    Attr FileName = m_Doc.createAttribute("FileName");
    Attr Visible = m_Doc.createAttribute("Visible");
    Attr IsMaskout = m_Doc.createAttribute("IsMaskout");
    Attr LayerType = m_Doc.createAttribute("LayerType");
    Attr LayerDrawType = m_Doc.createAttribute("LayerDrawType");
    Attr transparencyPerc = m_Doc.createAttribute("TransparencyPerc");
    Attr transparencyColor = m_Doc.createAttribute("TransparencyColor");
    Attr setTransColor = m_Doc.createAttribute("SetTransColor");

    Handle.setValue(String.valueOf(aILayer.getHandle()));
    LayerName.setValue(aILayer.getLayerName());
    try {
        FileName.setValue(GlobalUtil.getRelativePath(aILayer.getFileName(), projectFilePath));
    } catch (IOException ex) {
        Logger.getLogger(MapView.class.getName()).log(Level.SEVERE, null, ex);
    }
    Visible.setValue(String.valueOf(aILayer.isVisible()));
    IsMaskout.setValue(String.valueOf(aILayer.isMaskout()));
    LayerType.setValue(aILayer.getLayerType().toString());
    LayerDrawType.setValue(aILayer.getLayerDrawType().toString());
    transparencyPerc.setValue(String.valueOf(aILayer.getTransparency()));
    transparencyColor.setValue(ColorUtil.toHexEncoding(aILayer.getTransparencyColor()));
    setTransColor.setValue(String.valueOf(aILayer.isUseTransColor()));

    Layer.setAttributeNode(Handle);
    Layer.setAttributeNode(LayerName);
    Layer.setAttributeNode(FileName);
    Layer.setAttributeNode(Visible);
    Layer.setAttributeNode(IsMaskout);
    Layer.setAttributeNode(LayerType);
    Layer.setAttributeNode(LayerDrawType);
    Layer.setAttributeNode(transparencyPerc);
    Layer.setAttributeNode(transparencyColor);
    Layer.setAttributeNode(setTransColor);

    //Add legend scheme            
    aILayer.getLegendScheme().exportToXML(m_Doc, Layer);

    //Add visible scale
    exportVisibleScale(m_Doc, Layer, aILayer.getVisibleScale());

    parent.appendChild(Layer);
}
 
开发者ID:meteoinfo,项目名称:MeteoInfoLib,代码行数:56,代码来源:MapView.java


注:本文中的org.meteoinfo.layer.LayerDrawType.setValue方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。