📄 coveragetab.java
字号:
for(Iterator<Layer> it = tech.getLayers(); it.hasNext(); ) { Layer layer = it.next(); Object obj = layerAreaMap.get(layer); if (obj == null) continue; // it should not happen though GenMath.MutableDouble value = (GenMath.MutableDouble)obj; layer.setAreaCoverageInfo(value.doubleValue()); } } } /** * Method called when the factory reset is requested. */ public void reset() { for(Iterator<Technology> tIt = Technology.getTechnologies(); tIt.hasNext(); ) { Technology tech = tIt.next(); for(Iterator<Layer> it = tech.getLayers(); it.hasNext(); ) { Layer layer = it.next(); if (layer.getFactoryAreaCoverage() != layer.getAreaCoverage()) layer.setAreaCoverageInfo(layer.getFactoryAreaCoverage()); } if (LayerCoverageTool.getFactoryWidth(tech) != LayerCoverageTool.getWidth(tech)) LayerCoverageTool.setWidth(LayerCoverageTool.getFactoryWidth(tech), tech); if (LayerCoverageTool.getFactoryHeight(tech) != LayerCoverageTool.getHeight(tech)) LayerCoverageTool.setHeight(LayerCoverageTool.getFactoryHeight(tech), tech); if (LayerCoverageTool.getFactoryDeltaX(tech) != LayerCoverageTool.getDeltaX(tech)) LayerCoverageTool.setDeltaX(LayerCoverageTool.getFactoryDeltaX(tech), tech); if (LayerCoverageTool.getFactoryDeltaY(tech) != LayerCoverageTool.getDeltaY(tech)) LayerCoverageTool.setDeltaY(LayerCoverageTool.getFactoryDeltaY(tech), tech); } } /** This method is called from within the constructor to * initialize the form. * WARNING: Do NOT modify this code. The content of this method is * always regenerated by the Form Editor. */ // <editor-fold defaultstate="collapsed" desc=" Generated Code ">//GEN-BEGIN:initComponents private void initComponents() { java.awt.GridBagConstraints gridBagConstraints; layerCoverage = new javax.swing.JPanel(); layerPanel = new javax.swing.JPanel(); layerAreaLabel = new javax.swing.JLabel(); layerAreaField = new javax.swing.JTextField(); listScrollList = new javax.swing.JScrollPane(); boundingSelection = new javax.swing.JPanel(); widthLabel = new javax.swing.JLabel(); widthField = new javax.swing.JTextField(); heightLabel = new javax.swing.JLabel(); heightField = new javax.swing.JTextField(); deltaXLabel = new javax.swing.JLabel(); deltaXField = new javax.swing.JTextField(); deltaYLabel = new javax.swing.JLabel(); deltaYField = new javax.swing.JTextField(); jLabel1 = new javax.swing.JLabel(); technologySelection = new javax.swing.JComboBox(); getContentPane().setLayout(new java.awt.GridBagLayout()); setTitle("Edit Options"); setName(""); addWindowListener(new java.awt.event.WindowAdapter() { public void windowClosing(java.awt.event.WindowEvent evt) { closeDialog(evt); } }); layerCoverage.setLayout(new java.awt.GridBagLayout()); layerPanel.setLayout(new java.awt.GridBagLayout()); layerPanel.setBorder(new javax.swing.border.TitledBorder("Layers:")); layerPanel.setDoubleBuffered(false); layerAreaLabel.setText("Coverage Area (%):"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4); layerPanel.add(layerAreaLabel, gridBagConstraints); layerAreaField.setColumns(8); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4); layerPanel.add(layerAreaField, gridBagConstraints); listScrollList.setPreferredSize(new java.awt.Dimension(200, 300)); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.weightx = 1.0; gridBagConstraints.weighty = 1.0; layerPanel.add(listScrollList, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.BOTH; gridBagConstraints.insets = new java.awt.Insets(0, 0, 4, 0); layerCoverage.add(layerPanel, gridBagConstraints); boundingSelection.setLayout(new java.awt.GridBagLayout()); boundingSelection.setBorder(new javax.swing.border.TitledBorder("Bounding Selection")); boundingSelection.setDoubleBuffered(false); widthLabel.setText("Width:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4); boundingSelection.add(widthLabel, gridBagConstraints); widthField.setColumns(8); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 1; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4); boundingSelection.add(widthField, gridBagConstraints); heightLabel.setText("Height:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4); boundingSelection.add(heightLabel, gridBagConstraints); heightField.setColumns(8); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 2; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4); boundingSelection.add(heightField, gridBagConstraints); deltaXLabel.setText("DeltaX:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 1; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4); boundingSelection.add(deltaXLabel, gridBagConstraints); deltaXField.setColumns(8); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 1; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4); boundingSelection.add(deltaXField, gridBagConstraints); deltaYLabel.setText("DeltaY:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 3; gridBagConstraints.gridy = 2; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4); boundingSelection.add(deltaYLabel, gridBagConstraints); deltaYField.setColumns(8); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 4; gridBagConstraints.gridy = 2; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.weightx = 1.0; gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4); boundingSelection.add(deltaYField, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 2; gridBagConstraints.gridwidth = 2; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.insets = new java.awt.Insets(0, 0, 4, 0); layerCoverage.add(boundingSelection, gridBagConstraints); jLabel1.setText("Technology:"); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 0; gridBagConstraints.gridy = 0; gridBagConstraints.anchor = java.awt.GridBagConstraints.WEST; gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4); layerCoverage.add(jLabel1, gridBagConstraints); gridBagConstraints = new java.awt.GridBagConstraints(); gridBagConstraints.gridx = 1; gridBagConstraints.gridy = 0; gridBagConstraints.fill = java.awt.GridBagConstraints.HORIZONTAL; gridBagConstraints.insets = new java.awt.Insets(4, 4, 4, 4); layerCoverage.add(technologySelection, gridBagConstraints); getContentPane().add(layerCoverage, new java.awt.GridBagConstraints()); pack(); } // </editor-fold>//GEN-END:initComponents /** Closes the dialog */ private void closeDialog(java.awt.event.WindowEvent evt)//GEN-FIRST:event_closeDialog { setVisible(false); dispose(); }//GEN-LAST:event_closeDialog // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JPanel boundingSelection; private javax.swing.JTextField deltaXField; private javax.swing.JLabel deltaXLabel; private javax.swing.JTextField deltaYField; private javax.swing.JLabel deltaYLabel; private javax.swing.JTextField heightField; private javax.swing.JLabel heightLabel; private javax.swing.JLabel jLabel1; private javax.swing.JTextField layerAreaField; private javax.swing.JLabel layerAreaLabel; private javax.swing.JPanel layerCoverage; private javax.swing.JPanel layerPanel; private javax.swing.JScrollPane listScrollList; private javax.swing.JComboBox technologySelection; private javax.swing.JTextField widthField; private javax.swing.JLabel widthLabel; // End of variables declaration//GEN-END:variables}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -