⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 viewerframe.java

📁 主要为一个空间信息管理系统
💻 JAVA
📖 第 1 页 / 共 3 页
字号:
  }

  void jMenuItem5_actionPerformed(ActionEvent e)
  {
    D_Search5 Search_D = new D_Search5(this, "2", false);
    Search_D.setSize(405, 270);
    //Validate frames that have preset sizes
    //Pack frames that have useful preferred size info, e.g. from their layout
    //Center the window
    Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
    Dimension frameSize = Search_D.getSize();
    if (frameSize.height > screenSize.height)
    {
      frameSize.height = screenSize.height;
    }
    if (frameSize.width > screenSize.width)
    {
      frameSize.width = screenSize.width;
    }

    Search_D.setLocation( (screenSize.width - frameSize.width) / 2,
                         (screenSize.height - frameSize.height) / 2);

    Search_D.setVisible(true);

  }

  void jButton9_actionPerformed(ActionEvent e)
  {
    jPopupMenu1.show( (Component) jToolBar, (int) jButton9.getAlignmentX()+15,
                   (int) jButton9.getAlignmentY() + 44);

  }

  void jPopupMenu1_popupMenuWillBecomeInvisible(PopupMenuEvent e)
  {

  }

  void jPopupMenu1_popupMenuWillBecomeVisible(PopupMenuEvent e)
  {

  }
  void Item_action6()
   {
      D_Create Create_D = new D_Create(this, "3", false);
      Create_D.setSize(460,180);
      //Validate frames that have preset sizes
      //Pack frames that have useful preferred size info, e.g. from their layout
      //Center the window
      Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
      Dimension frameSize = Create_D.getSize();
      if (frameSize.height > screenSize.height)
      {
        frameSize.height = screenSize.height;
      }
      if (frameSize.width > screenSize.width)
      {
        frameSize.width = screenSize.width;
      }

      Create_D.setLocation( (screenSize.width - frameSize.width) / 2,
                           (screenSize.height - frameSize.height) / 2);

      Create_D.setVisible(true);

    }

  void jMenuItem6_actionPerformed(ActionEvent e)
  {
    Item_action6();
  }

  void jMenuItem7_actionPerformed(ActionEvent e)
  {
    Item_action7();
  }
  void Item_action7()
  {
    tableProcess tableP = new tableProcess();
    JFileChooser fc = new JFileChooser();
    fc.setCurrentDirectory(new File("."));
    fc.setDialogType(JFileChooser.OPEN_DIALOG);
    fc.setDialogTitle("Select destination directory for input "
                      );
    fc.setMultiSelectionEnabled(false);
    fc.setFileSelectionMode(JFileChooser.FILES_AND_DIRECTORIES);
    fc.addChoosableFileFilter(new MyFilter("txt", "Txt file"));
    if (fc.showDialog(this, "Select")
        != JFileChooser.APPROVE_OPTION)
    {
      return; //only when user select valid dir, it can return approve_option
    }
    File outputDir = fc.getSelectedFile();
    Properties p = new Properties();
    try
    {
      InputStream is = new FileInputStream(outputDir);
      //getClass().getResourceAsStream("resources/db.properties");
      p.load(is);
      int i = 0;
      String tablename=p.getProperty("PLACE");
      String coordinate=p.getProperty("COORDINATE");
      String pProjectNumber = p.getProperty("PROJECTNUMBER");
      String pProjectx = p.getProperty("PORJECTX");
      String pProjecty = p.getProperty("PORJECTY");
      StringTokenizer pX = new StringTokenizer(pProjectx, ",");
      StringTokenizer pX1 = new StringTokenizer(pProjectx, ",");
      StringTokenizer pY = new StringTokenizer(pProjecty, ",");
      while (pX.hasMoreTokens())
      {
        i++;
        pX.nextToken();
      }
      int[] tpX = new int[i + 1];
      int[] tpY = new int[i + 1];
      int j = 0;

      while (pY.hasMoreTokens())
      {
        tpX[j] = Integer.parseInt(pX1.nextToken());
        tpY[j] = Integer.parseInt(pY.nextToken());
      }
      tpX[i] = tpX[0];
      tpY[i] = tpY[0];
      polyStruct tp = new polyStruct(i + 1);
      tp.setX(tpX);
      tp.setY(tpY);
      polyRecord record = new polyRecord("./");
      polyStruct[] Pdata = record.Read(tablename,coordinate);
      polyProcess p1 = new polyProcess();
      if (Pdata.length > 0)
      {
        tableP.createTableModel();
        for (int l = 0; l < Pdata.length; l++)
        {
          if (p1.test_RgnAndRgn(tp, Pdata[l]))
          {
            tableP.addTableDate(Pdata[j].getPropertyArray());
          }
        }
      }
      tableP.showTable();
      //fc.hide();
      //test_paint paint = new test_paint(Pdata, tp);

    }
    catch (Exception e1)
    {
      e1.printStackTrace();
    }

  }
}

class ViewerFrame_CenterPanel_componentAdapter
    extends java.awt.event.ComponentAdapter
{
  ViewerFrame adaptee;

  ViewerFrame_CenterPanel_componentAdapter(ViewerFrame adaptee)
  {
    this.adaptee = adaptee;
  }

  public void componentResized(ComponentEvent e)
  {
    adaptee.CenterPanel_componentResized(e);
  }
}

class MenuItem_ActionAdapter
    implements java.awt.event.ActionListener
{
  ViewerFrame adaptee;

  MenuItem_ActionAdapter(ViewerFrame adaptee)
  {
    this.adaptee = adaptee;
  }

  public void actionPerformed(ActionEvent e)
  {
    //System.out.println("Set EyeViewer no visible.");
    adaptee.menuItem_ActionPerformed(e);
  }
}

class ViewerFrame_jButton8_actionAdapter
    implements java.awt.event.ActionListener
{
  ViewerFrame adaptee;

  ViewerFrame_jButton8_actionAdapter(ViewerFrame adaptee)
  {
    this.adaptee = adaptee;
  }

  public void actionPerformed(ActionEvent e)
  {
    adaptee.jButton8_actionPerformed(e);
  }
}

class ViewerFrame_jMenuItem3_actionAdapter
    implements java.awt.event.ActionListener
{
  ViewerFrame adaptee;

  ViewerFrame_jMenuItem3_actionAdapter(ViewerFrame adaptee)
  {
    this.adaptee = adaptee;
  }

  public void actionPerformed(ActionEvent e)
  {
    adaptee.jMenuItem3_actionPerformed(e);
  }
}

class ViewerFrame_jMenuItem2_actionAdapter
    implements java.awt.event.ActionListener
{
  ViewerFrame adaptee;

  ViewerFrame_jMenuItem2_actionAdapter(ViewerFrame adaptee)
  {
    this.adaptee = adaptee;
  }

  public void actionPerformed(ActionEvent e)
  {
    adaptee.jMenuItem2_actionPerformed(e);
  }
}

class ViewerFrame_jMenuItem1_actionAdapter
    implements java.awt.event.ActionListener
{
  ViewerFrame adaptee;

  ViewerFrame_jMenuItem1_actionAdapter(ViewerFrame adaptee)
  {
    this.adaptee = adaptee;
  }

  public void actionPerformed(ActionEvent e)
  {
    adaptee.jMenuItem1_actionPerformed(e);
  }
}

class ViewerFrame_jButton8_mouseAdapter
    extends java.awt.event.MouseAdapter
{
  ViewerFrame adaptee;

  ViewerFrame_jButton8_mouseAdapter(ViewerFrame adaptee)
  {
    this.adaptee = adaptee;
  }

}

class ViewerFrame_PopupMenu_mouseAdapter
    extends java.awt.event.MouseAdapter
{
  ViewerFrame adaptee;

  ViewerFrame_PopupMenu_mouseAdapter(ViewerFrame adaptee)
  {
    this.adaptee = adaptee;
  }

}

class ViewerFrame_jMenuItem4_actionAdapter
    implements java.awt.event.ActionListener
{
  ViewerFrame adaptee;

  ViewerFrame_jMenuItem4_actionAdapter(ViewerFrame adaptee)
  {
    this.adaptee = adaptee;
  }

  public void actionPerformed(ActionEvent e)
  {
    adaptee.jMenuItem4_actionPerformed(e);
  }
}

class ViewerFrame_PopupMenu_popupMenuAdapter
    implements javax.swing.event.PopupMenuListener
{
  ViewerFrame adaptee;

  ViewerFrame_PopupMenu_popupMenuAdapter(ViewerFrame adaptee)
  {
    this.adaptee = adaptee;
  }

  public void popupMenuCanceled(PopupMenuEvent e)
  {
  }

  public void popupMenuWillBecomeInvisible(PopupMenuEvent e)
  {
    adaptee.PopupMenu_popupMenuWillBecomeInvisible(e);
  }

  public void popupMenuWillBecomeVisible(PopupMenuEvent e)
  {
    adaptee.PopupMenu_popupMenuWillBecomeVisible(e);
  }
}

class ViewerFrame_jTree1_mouseAdapter
    extends java.awt.event.MouseAdapter
{
  ViewerFrame adaptee;

  ViewerFrame_jTree1_mouseAdapter(ViewerFrame adaptee)
  {
    this.adaptee = adaptee;
  }

  public void mouseClicked(MouseEvent e)
  {
    adaptee.jTree1_mouseClicked(e);
  }
}

class ViewerFrame_jMenuItem5_actionAdapter implements java.awt.event.ActionListener
{
  ViewerFrame adaptee;

  ViewerFrame_jMenuItem5_actionAdapter(ViewerFrame adaptee)
  {
    this.adaptee = adaptee;
  }
  public void actionPerformed(ActionEvent e)
  {
    adaptee.jMenuItem5_actionPerformed(e);
  }
}

class ViewerFrame_jButton9_actionAdapter implements java.awt.event.ActionListener
{
  ViewerFrame adaptee;

  ViewerFrame_jButton9_actionAdapter(ViewerFrame adaptee)
  {
    this.adaptee = adaptee;
  }
  public void actionPerformed(ActionEvent e)
  {
    adaptee.jButton9_actionPerformed(e);
  }
}

class ViewerFrame_jPopupMenu1_popupMenuAdapter implements javax.swing.event.PopupMenuListener
{
  ViewerFrame adaptee;

  ViewerFrame_jPopupMenu1_popupMenuAdapter(ViewerFrame adaptee)
  {
    this.adaptee = adaptee;
  }
  public void popupMenuCanceled(PopupMenuEvent e)
  {
  }
  public void popupMenuWillBecomeInvisible(PopupMenuEvent e)
  {
    adaptee.jPopupMenu1_popupMenuWillBecomeInvisible(e);
  }
  public void popupMenuWillBecomeVisible(PopupMenuEvent e)
  {
    adaptee.jPopupMenu1_popupMenuWillBecomeVisible(e);
  }
}

class ViewerFrame_jMenuItem6_actionAdapter implements java.awt.event.ActionListener
{
  ViewerFrame adaptee;

  ViewerFrame_jMenuItem6_actionAdapter(ViewerFrame adaptee)
  {
    this.adaptee = adaptee;
  }
  public void actionPerformed(ActionEvent e)
  {
    adaptee.jMenuItem6_actionPerformed(e);
  }
}

class ViewerFrame_jMenuItem7_actionAdapter implements java.awt.event.ActionListener
{
  ViewerFrame adaptee;

  ViewerFrame_jMenuItem7_actionAdapter(ViewerFrame adaptee)
  {
    this.adaptee = adaptee;
  }
  public void actionPerformed(ActionEvent e)
  {
    adaptee.jMenuItem7_actionPerformed(e);
  }
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -