亚洲欧美第一页_禁久久精品乱码_粉嫩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一区二区三区免费野_久草精品视频
日韩高清一区二区| 亚洲欧美在线另类| 五月天精品一区二区三区| 色系网站成人免费| 亚洲大型综合色站| 91精品国产综合久久蜜臀| 毛片一区二区三区| 久久久九九九九| 99re热这里只有精品视频| 亚洲精品国产视频| 777久久久精品| 国内精品嫩模私拍在线| 国产精品久久三| 欧美中文字幕一区二区三区| 日本免费在线视频不卡一不卡二| 亚洲精品一区二区三区福利 | 亚洲人精品午夜| 日本久久电影网| 日本不卡高清视频| 国产女人18水真多18精品一级做| 91日韩精品一区| 亚洲18色成人| 久久蜜桃一区二区| 91理论电影在线观看| 视频一区二区国产| 久久久国产精品麻豆| 色狠狠色噜噜噜综合网| 久久99久久99| 亚洲黄色录像片| 欧美精品一区二区蜜臀亚洲| 99精品视频一区| 美腿丝袜亚洲色图| 亚洲免费成人av| 日韩视频一区二区| 91麻豆国产精品久久| 蜜桃视频免费观看一区| 国产精品不卡视频| 精品奇米国产一区二区三区| 色婷婷激情久久| 国产一区二区三区久久悠悠色av| 亚洲高清不卡在线| 欧美国产激情二区三区| 日韩视频免费观看高清完整版在线观看| 国产精品资源在线看| 日日摸夜夜添夜夜添精品视频| 国产精品免费久久| 精品国产免费人成电影在线观看四季| 91在线免费视频观看| 国产成人综合亚洲网站| 免费高清成人在线| 亚洲成人av一区| 亚洲丝袜自拍清纯另类| 久久精品亚洲国产奇米99| 欧美一区二区三区人| 在线国产电影不卡| av在线不卡观看免费观看| 紧缚捆绑精品一区二区| 五月婷婷色综合| 亚洲精品国产一区二区精华液 | 成人激情图片网| 精品一区二区三区久久| 日韩国产高清在线| 亚洲午夜久久久久久久久电影网 | 欧美日韩激情一区二区| 一本色道久久综合亚洲91| 岛国一区二区在线观看| 国产精品白丝av| 国产麻豆精品一区二区| 麻豆精品视频在线观看| 亚洲成人一区二区在线观看| 亚洲一区二区高清| 亚洲国产精品一区二区久久恐怖片 | 成人精品一区二区三区中文字幕| 韩国一区二区视频| 激情欧美一区二区三区在线观看| 蜜桃视频在线观看一区| 久久电影网电视剧免费观看| 精品中文字幕一区二区| 久久不见久久见免费视频7| 久久国产精品72免费观看| 激情文学综合网| 国产成人在线看| 国产aⅴ综合色| 91原创在线视频| 在线这里只有精品| 欧美精品黑人性xxxx| 日韩无一区二区| 欧美精品一区二区三区蜜桃视频| 久久亚洲一区二区三区明星换脸 | 日韩午夜在线观看| 2020国产精品| 国产精品丝袜在线| 亚洲三级在线观看| 五月婷婷综合在线| 激情国产一区二区| 成人高清免费在线播放| 色94色欧美sute亚洲线路一久| 欧美日韩一区高清| 精品日韩在线一区| 中文字幕精品—区二区四季| 亚洲欧美另类在线| 日韩黄色片在线观看| 国产在线精品一区二区三区不卡| 国产 欧美在线| 在线一区二区三区做爰视频网站| 欧美日韩高清一区二区不卡| 亚洲精品在线免费观看视频| 国产精品乱码久久久久久| 有坂深雪av一区二区精品| 蜜芽一区二区三区| 高清shemale亚洲人妖| 欧美怡红院视频| 欧美精品一区二区三区蜜臀| 亚洲美女偷拍久久| 精品一区二区久久久| 色综合激情五月| 精品88久久久久88久久久| 一区二区三区精品| 国内精品免费在线观看| 欧美体内she精视频| 国产午夜亚洲精品午夜鲁丝片| 亚洲成人在线免费| 成人av电影在线观看| 91精品视频网| 亚洲美女在线国产| 国产福利不卡视频| 欧美日韩国产三级| 欧美激情一区在线观看| 日本vs亚洲vs韩国一区三区 | 国产视频视频一区| 日日夜夜精品视频免费| 99久久精品免费看| 久久久亚洲精华液精华液精华液| 一区二区三区国产精品| 国产91丝袜在线观看| 91麻豆精品国产91久久久久| 亚洲人吸女人奶水| 国产激情精品久久久第一区二区| 在线电影国产精品| 一二三四社区欧美黄| 成人一区在线看| 欧美videos中文字幕| 亚洲第一精品在线| 一本大道久久a久久综合婷婷| 亚洲精品一区二区三区香蕉| 日本成人在线电影网| 欧美特级限制片免费在线观看| 亚洲婷婷综合久久一本伊一区| 国产在线精品国自产拍免费| 日韩一区二区高清| 日本欧美一区二区在线观看| 欧美日韩中文字幕一区二区| 中文字幕亚洲区| youjizz国产精品| 国产日产精品一区| 韩国三级在线一区| 欧美成人乱码一区二区三区| 秋霞影院一区二区| 91精品国产一区二区三区蜜臀| 一区二区三区精密机械公司| 一本久久a久久免费精品不卡| 国产精品欧美一级免费| 国产精品一区在线观看乱码| 久久久久久久久免费| 国产精品一品二品| 国产农村妇女毛片精品久久麻豆| 国产乱码精品一区二区三区忘忧草| 精品国产乱码久久久久久老虎| 久久精品国产99| 精品福利在线导航| 精品一区二区三区免费视频| 精品免费视频一区二区| 激情六月婷婷综合| 国产欧美一区二区精品忘忧草 | 一区二区在线免费观看| 在线观看av不卡| 午夜精品久久久久久久99樱桃| 欧美在线不卡视频| 亚洲va中文字幕| 欧美一区二区三区公司| 久久99国产精品麻豆| 国产欧美一区二区精品性色| 99re这里只有精品6| 亚洲综合色噜噜狠狠| 欧美一区二区三区婷婷月色| 狠狠色丁香久久婷婷综合丁香| 国产日韩精品一区二区三区| 91色porny在线视频| 亚洲123区在线观看| 精品精品欲导航| 成人sese在线| 一区二区三区高清不卡| 欧美一级一级性生活免费录像| 国产在线精品一区二区不卡了 | 成人毛片老司机大片| 亚洲最大色网站| 欧美成人免费网站| 99re8在线精品视频免费播放| 亚洲成人你懂的| 久久精品视频一区二区|