亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? copyfocusmap.java

?? ArcObjects GIS應用開發:拷貝當前地圖
?? JAVA
?? 第 1 頁 / 共 2 頁
字號:
/*
 * ArcGIS Engine Developer Sample
 * Application Name: CopyFocusMap.java
 */

package com.esri.arcgis.samples.beans.pagelayoutcontrol;

import java.awt.BorderLayout;
import java.awt.GridLayout;
import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import java.io.File;
import java.io.IOException;

import javax.swing.BorderFactory;
import javax.swing.Box;
import javax.swing.BoxLayout;
import javax.swing.JButton;
import javax.swing.JComboBox;
import javax.swing.JFileChooser;
import javax.swing.JFrame;
import javax.swing.JLabel;
import javax.swing.JOptionPane;
import javax.swing.JPanel;
import javax.swing.JTextField;
import javax.swing.UIManager;
import javax.swing.filechooser.FileFilter;

import com.esri.arcgis.beans.map.IMapControlEvents2Adapter;
import com.esri.arcgis.beans.map.IMapControlEvents2OnAfterScreenDrawEvent;
import com.esri.arcgis.beans.map.IMapControlEvents2OnBeforeScreenDrawEvent;
import com.esri.arcgis.beans.map.IMapControlEvents2OnMouseDownEvent;
import com.esri.arcgis.beans.map.MapBean;
import com.esri.arcgis.beans.pagelayout.IPageLayoutControlEventsAdapter;
import com.esri.arcgis.beans.pagelayout.IPageLayoutControlEventsOnAfterScreenDrawEvent;
import com.esri.arcgis.beans.pagelayout.IPageLayoutControlEventsOnBeforeScreenDrawEvent;
import com.esri.arcgis.beans.pagelayout.IPageLayoutControlEventsOnFocusMapChangedEvent;
import com.esri.arcgis.beans.pagelayout.IPageLayoutControlEventsOnMouseDownEvent;
import com.esri.arcgis.beans.pagelayout.IPageLayoutControlEventsOnPageLayoutReplacedEvent;
import com.esri.arcgis.beans.pagelayout.PageLayoutBean;
import com.esri.arcgis.carto.IActiveView;
import com.esri.arcgis.carto.IActiveViewProxy;
import com.esri.arcgis.carto.IElement;
import com.esri.arcgis.carto.IElementProperties;
import com.esri.arcgis.carto.IElementPropertiesProxy;
import com.esri.arcgis.carto.IGraphicsContainer;
import com.esri.arcgis.carto.Map;
import com.esri.arcgis.carto.MapFrame;
import com.esri.arcgis.carto.esriViewDrawPhase;
import com.esri.arcgis.display.IDisplayTransformation;
import com.esri.arcgis.system.AoInitialize;
import com.esri.arcgis.system.EngineInitializer;
import com.esri.arcgis.system.ObjectCopy;
import com.esri.arcgis.system.esriLicenseProductCode;
import com.esri.arcgis.systemUI.esriControlsMousePointer;

/**
 * Description:This sample demonstrates setting the PageLayoutBean's FocusMap and using
 *    the IObjecyCopy object to overwrite the MapBean's Map object with a copy
 *    of the PageLayoutBean's FocusMap. The Map object has to copied because the
 *    MapBean and PageLayoutBean are unable to share the same ActiveView at
 *    the same time.
 *    The file chooser dialog allows users to search and
 *    select map documents, which are validated and loaded into the PageLayoutBean
 *    using the checkMxFile and loadMxFile methods. This triggers the OnPageLayoutReplaced
 *    event which loops through the Elements in the PageLayoutBean's GraphicsContainer
 *    finding MapFrame elements. The name of each MapFrame is set to the name of the Map
 *    in the MapFrame using the IElementProperties interface. A ComboBox is populated with
 *    all Map name's to allow users to change the FocusMap. The FindElementByName method is
 *    used to find the MapFrame containing the Map that is to become the FocusMap.<p/>
 *
 *    The PageLayoutBean's OnFocusMapChanged and OnAfterScreenDraw (when a new Map
 *    Document has been loaded into the PageLayoutBean) events use the IObjectCopy
 *    Copy and Overwrite methods to overwrite the MapBean's Map with a copy of the
 *    PageLayoutBean's FocusMap.
 *
 *    The PageLayoutBean and MapBean OnMouseDown event's use the TrackRectangle
 *    and Pan methods to zoomin and pan around either the PageLayoutBean's Page or
 *    the MapBean's Map. If the MapBean's display is redrawn due to a change in
 *    VisibleExtent, the OnAfterScreenDraw event is used set the Extent of the
 *    PageLayoutBean's FocusMap equal to that of the MapBean using the
 *    IDisplayTransformation interface.

 */


public class CopyFocusMap extends JFrame implements ActionListener {
   JPanel topPanel = null;
   JPanel mainPanel = null;
   JPanel centerPanel = null;
   JPanel pageLayoutPanel = null;
   JPanel bottomPanel = null;

   JButton loadDocumentButton = null;
   JTextField pathField = null;
   String helpString = "Right mouse button to pan page or data and Left mouse button to zoom in";
   JLabel helpLabel = null;
   JButton zoomToPageButton = null;
   JButton zoomToFullDataButton = null;
   JComboBox focusMapCombo = null;

   PageLayoutBean pageLayoutBean;
   MapBean mapBean;
   boolean updateFocusMap;
   boolean replacedPageLayout;

   public CopyFocusMap() {
      super("Copy Focus Map Example");
      buildFrame();
      setSize(700,500);
      setVisible(true);
      initControl();
   }

   /**This method builds 'this' frame as per the following diagram:
       *
       *   /----------------------------------------------------------------\
       *   | JButton    BorderLayout.NORTH                                  |
       *   | JTextField                                                     |
       *   |----------------------------------------------------------------|
       *   |           JPanel: Borderlayout.CENTER                          |
       *   |                                                                |
       *   |                                                                |
       *   |-------------------JPanel : GridLayout--------------------------|
       *   |                                       |                        |
       *   |       JPanel : BorderLayout           |                        |
       *   |                                       |                        |
       *   |       JComboBox:BorderLayout.NORTH    |                        |
       *   |                                       |     Map Control        |
       *   |                                       |                        |
       *   |      PageLayout Control :             |                        |
       *          BorderLayout.CENTER              |                        |
       *   |                                       |                        |
       *   |                                       |                        |
       *   |                                       |                        |
       *   |                                       |                        |
       *   |                                       |                        |
       *   |----------------------------------------------------------------|
       *   |         BorderLayout.SOUTH                                     |
       *   | JButton              JLabel                    JButton         |
       *   |----------------------------------------------------------------|
   */


   public void buildFrame() {
      topPanel = new JPanel();
      mainPanel = new JPanel();
      centerPanel = new JPanel();
      pageLayoutPanel = new JPanel();
      bottomPanel = new JPanel();

      topPanel.setLayout(new BoxLayout(topPanel, BoxLayout.X_AXIS));
      mainPanel.setLayout(new BorderLayout());
      centerPanel.setLayout(new GridLayout(1,2, 10, 0));
      pageLayoutPanel.setLayout(new BorderLayout());
      bottomPanel.setLayout(new BoxLayout(bottomPanel, BoxLayout.X_AXIS));

      loadDocumentButton = new JButton("Load Document");
      loadDocumentButton.addActionListener(this);

      pathField = new JTextField();
      pathField.setEditable(false);
      topPanel.add(loadDocumentButton);
      topPanel.add(Box.createHorizontalStrut(5));
      topPanel.add(pathField);
      topPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 10, 0));

      pageLayoutBean = new PageLayoutBean();
      focusMapCombo = new JComboBox();
      focusMapCombo.addActionListener(this);
      focusMapCombo.setLightWeightPopupEnabled(false);

      pageLayoutPanel.add(focusMapCombo, BorderLayout.NORTH);
      pageLayoutPanel.add(pageLayoutBean, BorderLayout.CENTER);

      mapBean = new MapBean();
      centerPanel.add(pageLayoutPanel);
      centerPanel.add(mapBean);

      zoomToPageButton = new JButton("Zoom To Page");
      zoomToPageButton.addActionListener(this);

      helpLabel = new JLabel(helpString);
      helpLabel.setHorizontalTextPosition(JLabel.CENTER);
      zoomToFullDataButton = new JButton("Zoom to Full Data Extent");
      zoomToFullDataButton.addActionListener(this);

      bottomPanel.add(zoomToPageButton);
      bottomPanel.add(Box.createHorizontalStrut(30));
      bottomPanel.add(helpLabel);
      bottomPanel.add(Box.createHorizontalStrut(10));
      bottomPanel.add(zoomToFullDataButton);

      //Create page layout control add it to the center of the main panel.
      mainPanel.add(topPanel, BorderLayout.NORTH);
      mainPanel.add(centerPanel, BorderLayout.CENTER);
      mainPanel.add(bottomPanel, BorderLayout.SOUTH);
      mainPanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 10, 10));
      getContentPane().add(mainPanel, BorderLayout.CENTER);
   }

   /* Intializes control
    */
   public void initControl() {
      try {
        updateFocusMap = false;
        replacedPageLayout = false;
        mapBean.setShowScrollbars(false);
        //Add control listener
        mapBean.addIMapControlEvents2Listener(new MapControlListener());
        pageLayoutBean.addIPageLayoutControlEventsListener(new PageLayoutControlListener());
      }catch (IOException ex) {
         System.out.println("Exception in initControl : " + ex);
         ex.printStackTrace();
      }
   }

   /**@see java.awt.event.ActionListener#actionPerformed(ActionEvent event)
   * @param event
   */
  public void actionPerformed(ActionEvent event) {
     if(event.getSource() == focusMapCombo) {
       try {
         //Get IMapFrame interface
         if (focusMapCombo.getSelectedItem() != null) {
           IElement element = pageLayoutBean.findElementByName( (String)
               focusMapCombo.getSelectedItem(), 1);
           //Set the focusMap
           MapFrame mapFrame = new MapFrame(element);
           pageLayoutBean.getActiveView().setFocusMapByRef(mapFrame.getMap());
         }
       }catch (IOException ex) {
         System.out.println("Exception in focusMapCombo#actionPerformed: " + ex);
         ex.printStackTrace();
       }
     }

     if(event.getSource() == zoomToPageButton) {
        try {
               //Zoom to the whole page
               pageLayoutBean.zoomToWholePage();
            }catch (IOException ex) {
               System.out.println("Exception in zoomToPageButton#actionPerformed: " + ex);
               ex.printStackTrace();
            }
     }

     if(event.getSource() == zoomToFullDataButton) {
       try {
         //Assign map controls extent property to the full extent of all the layers
         mapBean.setExtent(mapBean.getFullExtent());
       }
       catch (IOException ex) {
         System.out.println(
             "Exception in zoomToFullDataButton#actionPerformed : " + ex);
         ex.printStackTrace();
       }
     }

     if(event.getSource() == loadDocumentButton) {
        try {
           loadFile();
        }catch (IOException ex) {
           System.out.println("Exception in loadDocumentButton#actionPerformed: " + ex);
           ex.printStackTrace();
        }
     }
  }

   /**
    * Method loadFile loads the specified mxd file.
    */
  public boolean loadFile() throws IOException {
       //Open a JFileChooser for selecting map documents
     JFileChooser chooser = new JFileChooser();
     chooser.setFileFilter(new FileFilter() {
        public boolean accept(File f) {
           return (f.isDirectory() || f.getAbsolutePath().toUpperCase().endsWith(".MXD") || f.getAbsolutePath().toUpperCase().endsWith(".MXT") || f.getAbsolutePath().toUpperCase().endsWith(".PMF"));
        }
        public String getDescription() {
           return "Map Documents(*.mxd, *.mxt or *.pmf)";
        }
     });

     boolean loaded = false;
     int returnVal = 0;
     returnVal = chooser.showOpenDialog(null);
     if (returnVal == JFileChooser.APPROVE_OPTION) {
        String fileChosen = chooser.getCurrentDirectory() + File.separator + chooser.getSelectedFile().getName();

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
天天亚洲美女在线视频| 国产白丝网站精品污在线入口| 欧美精品一区二区蜜臀亚洲| 99麻豆久久久国产精品免费 | 成av人片一区二区| 日日骚欧美日韩| 亚洲欧美影音先锋| 精品日本一线二线三线不卡| 91久久精品午夜一区二区| 国产suv精品一区二区883| 免费高清在线视频一区·| 亚洲人一二三区| 欧美国产成人精品| 精品久久久久久久久久久久久久久久久| 91豆麻精品91久久久久久| 成人午夜碰碰视频| 精品在线免费观看| 日本欧美在线观看| 亚洲3atv精品一区二区三区| 《视频一区视频二区| 国产欧美日韩精品a在线观看| 欧美一区二区三区四区五区| 欧美综合欧美视频| 一本久道久久综合中文字幕| 成人妖精视频yjsp地址| 国产成人av一区| 国产一区免费电影| 精品一区二区三区免费观看| 奇米一区二区三区| 视频一区在线视频| 日本少妇一区二区| 日本特黄久久久高潮| 日本色综合中文字幕| 天堂va蜜桃一区二区三区 | 日韩精品专区在线影院重磅| 欧美久久高跟鞋激| 91麻豆精品国产91久久久| 3d动漫精品啪啪1区2区免费 | 国内成+人亚洲+欧美+综合在线| 免费欧美日韩国产三级电影| 免费成人在线视频观看| 免费高清不卡av| 激情成人午夜视频| 国产在线精品不卡| 国产一区二区按摩在线观看| 国内一区二区视频| 国产白丝精品91爽爽久久| proumb性欧美在线观看| 91在线观看免费视频| 色国产精品一区在线观看| 欧美无人高清视频在线观看| 5566中文字幕一区二区电影| 日韩美女视频一区二区在线观看| 精品国产乱码久久久久久闺蜜 | 91麻豆精品国产自产在线 | 国产日韩亚洲欧美综合| 国产精品国模大尺度视频| 亚洲日本在线看| 五月婷婷激情综合| 精品一区二区三区香蕉蜜桃| 国产一区二区免费在线| 床上的激情91.| 91久久一区二区| 欧美一区二区三区在线电影| 久久久久久久综合| 亚洲免费看黄网站| 天天射综合影视| 国产精品亚洲第一| 在线观看精品一区| 日韩免费电影一区| 亚洲欧美一区二区三区极速播放| 天堂va蜜桃一区二区三区漫画版| 国产老妇另类xxxxx| 一本大道久久精品懂色aⅴ| 777午夜精品视频在线播放| 久久久www成人免费无遮挡大片 | 麻豆91精品91久久久的内涵| 国产精品中文字幕一区二区三区| 色视频成人在线观看免| 欧美一级片免费看| 国产精品第13页| 日韩**一区毛片| av在线综合网| 日韩欧美一区二区视频| 亚洲欧美在线高清| 久久精品国产亚洲aⅴ| 99视频在线精品| 欧美成人女星排行榜| 一区二区三区.www| 国产一区二区女| 欧美色成人综合| 国产精品午夜在线| 美女久久久精品| 91在线精品秘密一区二区| 欧美电影免费观看高清完整版在线| 亚洲国产电影在线观看| 日本伊人精品一区二区三区观看方式| 成人午夜视频免费看| 精品精品国产高清一毛片一天堂| 亚洲人被黑人高潮完整版| 国产精品99久久久久久似苏梦涵| 欧美日韩电影在线| 中文字幕一区二区三区在线不卡 | 久久亚区不卡日本| 亚洲国产精品久久人人爱 | 欧美色男人天堂| 国产精品久久毛片av大全日韩| 蜜臀av性久久久久蜜臀aⅴ| 色香蕉久久蜜桃| 中文字幕一区二区三区精华液| 麻豆91在线观看| 欧美一区二区成人6969| 亚洲精品va在线观看| eeuss影院一区二区三区| 久久综合色婷婷| 麻豆传媒一区二区三区| 欧美妇女性影城| 香蕉成人啪国产精品视频综合网| 99热在这里有精品免费| 欧美国产日韩在线观看| 国产精品99久久久久久久女警| 精品捆绑美女sm三区| 日韩av高清在线观看| 欧美视频三区在线播放| 一区二区三区中文字幕| 色屁屁一区二区| 亚洲黄色尤物视频| 91蜜桃免费观看视频| 国产精品视频线看| 国产成人精品亚洲777人妖| 久久综合丝袜日本网| 狠狠色丁香久久婷婷综合_中| 精品少妇一区二区三区在线视频 | 色吧成人激情小说| 亚洲美女屁股眼交3| 成人性生交大片免费看中文网站| 亚洲国产精品传媒在线观看| 丁香六月综合激情| 国产精品久久久久aaaa樱花| 99久久er热在这里只有精品15| 亚洲欧洲美洲综合色网| 日韩一区二区三区在线观看| 亚洲第一综合色| 制服丝袜一区二区三区| 欧美aⅴ一区二区三区视频| 日韩小视频在线观看专区| 久久精品国产亚洲高清剧情介绍| 精品国产免费视频| 国产一区三区三区| 国产精品久99| 欧美丝袜丝nylons| 奇米777欧美一区二区| 欧美成人r级一区二区三区| 国产综合久久久久影院| 国产亚洲自拍一区| 99久久精品99国产精品| 亚洲图片一区二区| 欧美一级欧美三级在线观看| 黑人精品欧美一区二区蜜桃 | 亚洲综合自拍偷拍| 制服丝袜中文字幕一区| 国产剧情在线观看一区二区| 国产精品国产三级国产a| 色一情一乱一乱一91av| 日韩高清电影一区| 久久香蕉国产线看观看99| 97精品国产97久久久久久久久久久久 | 国产欧美精品国产国产专区| 99热精品一区二区| 亚洲成av人片在线| 亚洲精品在线观看视频| 91免费版在线看| 七七婷婷婷婷精品国产| 国产精品全国免费观看高清| 欧美亚洲一区三区| 久久99精品国产| 亚洲精品国产精品乱码不99| 日韩一级大片在线观看| 成人午夜激情视频| 三级成人在线视频| 国产精品日韩精品欧美在线| 7777精品伊人久久久大香线蕉最新版| 国产精品亚洲一区二区三区在线| 亚洲精品第1页| 久久精品水蜜桃av综合天堂| 欧美性色综合网| 国产成a人亚洲精品| 午夜精品一区二区三区免费视频| 久久先锋资源网| 777亚洲妇女| 色av综合在线| 国产成人av影院| 91久久久免费一区二区| 精品一区二区三区在线观看| 亚洲国产综合在线| 国产夜色精品一区二区av| 欧美另类变人与禽xxxxx| 91免费版在线看| 国产不卡在线播放| 美女mm1313爽爽久久久蜜臀|