brmap.java
来自「java调用ie浏览器demo源码,可以用在windows或者linux」· Java 代码 · 共 1,142 行 · 第 1/4 页
JAVA
1,142 行
btSatelliteView.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btSatelliteViewActionPerformed(evt);
}
});
btHybridView.setText("Hybrid");
btHybridView.setMargin(new java.awt.Insets(2, 2, 2, 2));
btHybridView.setMaximumSize(new java.awt.Dimension(52, 20));
btHybridView.setMinimumSize(new java.awt.Dimension(52, 20));
btHybridView.setPreferredSize(new java.awt.Dimension(52, 20));
btHybridView.setRolloverEnabled(true);
btHybridView.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btHybridViewActionPerformed(evt);
}
});
bnZoomPlus.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/jdic/web/images/map_plus.png"))); // NOI18N
bnZoomPlus.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
bnZoomPlusActionPerformed(evt);
}
});
sbZoomLevel.setMajorTickSpacing(1);
sbZoomLevel.setMaximum(19);
sbZoomLevel.setMinimum(1);
sbZoomLevel.setMinorTickSpacing(1);
sbZoomLevel.setOrientation(javax.swing.JSlider.VERTICAL);
sbZoomLevel.setPaintTicks(true);
sbZoomLevel.setMaximumSize(new java.awt.Dimension(32, 107));
sbZoomLevel.setOpaque(false);
sbZoomLevel.setPreferredSize(new java.awt.Dimension(32, 107));
sbZoomLevel.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent evt) {
sbZoomLevelStateChanged(evt);
}
});
bnZoomMinus.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/jdic/web/images/map_minus.png"))); // NOI18N
bnZoomMinus.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
bnZoomMinusActionPerformed(evt);
}
});
btGoogleMap.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/jdic/web/images/map_google42x42.png"))); // NOI18N
btGoogleMap.setMargin(new java.awt.Insets(2, 2, 2, 2));
btGoogleMap.setMaximumSize(new java.awt.Dimension(50, 50));
btGoogleMap.setMinimumSize(new java.awt.Dimension(50, 50));
btGoogleMap.setOpaque(false);
btGoogleMap.setPreferredSize(new java.awt.Dimension(50, 50));
btGoogleMap.setRolloverEnabled(true);
btGoogleMap.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btGoogleMapActionPerformed(evt);
}
});
btMicrosoftMap.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/jdic/web/images/map_msLive42x42.png"))); // NOI18N
btMicrosoftMap.setMargin(new java.awt.Insets(2, 2, 2, 2));
btMicrosoftMap.setMaximumSize(new java.awt.Dimension(50, 50));
btMicrosoftMap.setMinimumSize(new java.awt.Dimension(50, 50));
btMicrosoftMap.setOpaque(false);
btMicrosoftMap.setPreferredSize(new java.awt.Dimension(50, 50));
btMicrosoftMap.setRolloverEnabled(true);
btMicrosoftMap.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btMicrosoftMapActionPerformed(evt);
}
});
btYahooMap.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/jdic/web/images/map_yahoo42x42.png"))); // NOI18N
btYahooMap.setMargin(new java.awt.Insets(2, 2, 2, 2));
btYahooMap.setMaximumSize(new java.awt.Dimension(50, 50));
btYahooMap.setMinimumSize(new java.awt.Dimension(50, 50));
btYahooMap.setOpaque(false);
btYahooMap.setPreferredSize(new java.awt.Dimension(50, 50));
btYahooMap.setRolloverEnabled(true);
btYahooMap.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btYahooMapActionPerformed(evt);
}
});
sbAlpha.setMinimum(50);
sbAlpha.setValue(sbAlpha.getMaximum());
sbAlpha.setOpaque(false);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getCentralPanel());
getCentralPanel().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(bnZoomPlus, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(sbZoomLevel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(bnZoomMinus, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btGoogleMap, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btMicrosoftMap, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btYahooMap, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 179, Short.MAX_VALUE)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)
.addComponent(sbAlpha, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addComponent(btRoadView, javax.swing.GroupLayout.PREFERRED_SIZE, 79, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btSatelliteView, javax.swing.GroupLayout.PREFERRED_SIZE, 78, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btHybridView, javax.swing.GroupLayout.PREFERRED_SIZE, 77, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addContainerGap())
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addGap(6, 6, 6)
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
.addComponent(btRoadView, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btSatelliteView, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(btHybridView, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addGroup(layout.createSequentialGroup()
.addGap(26, 26, 26)
.addComponent(bnZoomPlus, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(sbZoomLevel, javax.swing.GroupLayout.PREFERRED_SIZE, 118, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(bnZoomMinus, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btGoogleMap, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btMicrosoftMap, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
.addComponent(btYahooMap, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)))
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 26, Short.MAX_VALUE)
.addComponent(sbAlpha, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addContainerGap())
);
btGoogleMap.getAccessibleContext().setAccessibleName("Google");
btMicrosoftMap.getAccessibleContext().setAccessibleName("Microsoft");
btYahooMap.getAccessibleContext().setAccessibleName("Yahoo");
}
/** 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() {
btRoadView = new javax.swing.JToggleButton();
btSatelliteView = new javax.swing.JToggleButton();
btHybridView = new javax.swing.JToggleButton();
bnZoomPlus = new javax.swing.JButton();
sbZoomLevel = new javax.swing.JSlider();
bnZoomMinus = new javax.swing.JButton();
btGoogleMap = new javax.swing.JToggleButton();
btMicrosoftMap = new javax.swing.JToggleButton();
btYahooMap = new javax.swing.JToggleButton();
sbAlpha = new JBottomSlider();
setDoubleBuffered(true);
btRoadView.setText("Road");
btRoadView.setMargin(new java.awt.Insets(2, 2, 2, 2));
btRoadView.setMaximumSize(new java.awt.Dimension(52, 20));
btRoadView.setMinimumSize(new java.awt.Dimension(52, 20));
btRoadView.setPreferredSize(new java.awt.Dimension(52, 20));
btRoadView.setRolloverEnabled(true);
btRoadView.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btRoadViewActionPerformed(evt);
}
});
btSatelliteView.setText("Satellite");
btSatelliteView.setMargin(new java.awt.Insets(2, 2, 2, 2));
btSatelliteView.setMaximumSize(new java.awt.Dimension(52, 20));
btSatelliteView.setMinimumSize(new java.awt.Dimension(52, 20));
btSatelliteView.setPreferredSize(new java.awt.Dimension(52, 20));
btSatelliteView.setRolloverEnabled(true);
btSatelliteView.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btSatelliteViewActionPerformed(evt);
}
});
btHybridView.setText("Hybrid");
btHybridView.setMargin(new java.awt.Insets(2, 2, 2, 2));
btHybridView.setMaximumSize(new java.awt.Dimension(52, 20));
btHybridView.setMinimumSize(new java.awt.Dimension(52, 20));
btHybridView.setPreferredSize(new java.awt.Dimension(52, 20));
btHybridView.setRolloverEnabled(true);
btHybridView.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btHybridViewActionPerformed(evt);
}
});
bnZoomPlus.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/jdic/web/images/map_plus.png"))); // NOI18N
bnZoomPlus.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
bnZoomPlusActionPerformed(evt);
}
});
sbZoomLevel.setMajorTickSpacing(1);
sbZoomLevel.setMaximum(19);
sbZoomLevel.setMinimum(1);
sbZoomLevel.setMinorTickSpacing(1);
sbZoomLevel.setOrientation(javax.swing.JSlider.VERTICAL);
sbZoomLevel.setPaintTicks(true);
sbZoomLevel.setMaximumSize(new java.awt.Dimension(32, 107));
sbZoomLevel.setOpaque(false);
sbZoomLevel.setPreferredSize(new java.awt.Dimension(32, 107));
sbZoomLevel.addChangeListener(new javax.swing.event.ChangeListener() {
public void stateChanged(javax.swing.event.ChangeEvent evt) {
sbZoomLevelStateChanged(evt);
}
});
bnZoomMinus.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/jdic/web/images/map_minus.png"))); // NOI18N
bnZoomMinus.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
bnZoomMinusActionPerformed(evt);
}
});
btGoogleMap.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/jdic/web/images/map_google42x42.png"))); // NOI18N
btGoogleMap.setMargin(new java.awt.Insets(2, 2, 2, 2));
btGoogleMap.setMaximumSize(new java.awt.Dimension(50, 50));
btGoogleMap.setMinimumSize(new java.awt.Dimension(50, 50));
btGoogleMap.setOpaque(false);
btGoogleMap.setPreferredSize(new java.awt.Dimension(50, 50));
btGoogleMap.setRolloverEnabled(true);
btGoogleMap.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btGoogleMapActionPerformed(evt);
}
});
btMicrosoftMap.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/jdic/web/images/map_msLive42x42.png"))); // NOI18N
btMicrosoftMap.setMargin(new java.awt.Insets(2, 2, 2, 2));
btMicrosoftMap.setMaximumSize(new java.awt.Dimension(50, 50));
btMicrosoftMap.setMinimumSize(new java.awt.Dimension(50, 50));
btMicrosoftMap.setOpaque(false);
btMicrosoftMap.setPreferredSize(new java.awt.Dimension(50, 50));
btMicrosoftMap.setRolloverEnabled(true);
btMicrosoftMap.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btMicrosoftMapActionPerformed(evt);
}
});
btYahooMap.setIcon(new javax.swing.ImageIcon(getClass().getResource("/org/jdic/web/images/map_yahoo42x42.png"))); // NOI18N
btYahooMap.setMargin(new java.awt.Insets(2, 2, 2, 2));
btYahooMap.setMaximumSize(new java.awt.Dimension(50, 50));
btYahooMap.setMinimumSize(new java.awt.Dimension(50, 50));
btYahooMap.setOpaque(false);
btYahooMap.setPreferredSize(new java.awt.Dimension(50, 50));
btYahooMap.setRolloverEnabled(true);
btYahooMap.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
btYahooMapActionPerformed(evt);
}
});
sbAlpha.setMinimum(25);
sbAlpha.setOpaque(false);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
this.setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
.addContainerGap()
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.CENTER)
.addComponent(bnZoomPlus, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(sbZoomLevel, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addComponent(bnZoomMinus, javax.swing.GroupLayout.PREFERRED_SIZE, 24, javax.swing.GroupLayout.PREFERRED_SIZE)
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?