📄 browserframe.java
字号:
bnForward.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
bnForwardActionPerformed(evt);
}
});
ieToolBar.add(bnForward);
bnReload.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/reload.png"))); // NOI18N
bnReload.setToolTipText("Reload current page");
bnReload.setFocusable(false);
bnReload.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
bnReload.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
bnReload.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
bnReloadActionPerformed(evt);
}
});
ieToolBar.add(bnReload);
bnStop.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/stop.png"))); // NOI18N
bnStop.setToolTipText("Reload current page");
bnStop.setFocusable(false);
bnStop.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
bnStop.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
bnStop.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
bnStopActionPerformed(evt);
}
});
ieToolBar.add(bnStop);
ieToolBar.add(jSeparator2);
lbURL.setText(" URL:");
ieToolBar.add(lbURL);
edAddress.setText("http://");
edAddress.setToolTipText("URL for navigation");
edAddress.setMinimumSize(new java.awt.Dimension(16, 20));
edAddress.setPreferredSize(new java.awt.Dimension(400, 20));
edAddress.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
onNavigate(evt);
}
});
ieToolBar.add(edAddress);
bnGo.setText("Go");
bnGo.setToolTipText("Go to entered URL");
bnGo.setFocusable(false);
bnGo.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
bnGo.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
bnGo.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
onNavigate(evt);
}
});
ieToolBar.add(bnGo);
jPanel1.add(ieToolBar, java.awt.BorderLayout.PAGE_START);
ieStatus.setFloatable(false);
ieStatus.setRollover(true);
ieStatus.setMaximumSize(new java.awt.Dimension(65536, 20));
ieStatus.setMinimumSize(new java.awt.Dimension(10, 20));
edStatusText.setEditable(false);
edStatusText.setMaximumSize(new java.awt.Dimension(2147483647, 20));
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ, brMain, org.jdesktop.beansbinding.ELProperty.create("${statusText}"), edStatusText, org.jdesktop.beansbinding.BeanProperty.create("text"));
bindingGroup.addBinding(binding);
edStatusText.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
edStatusTextActionPerformed(evt);
}
});
ieStatus.add(edStatusText);
bnLocker.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/locker.png"))); // NOI18N
bnLocker.setFocusable(false);
bnLocker.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);
bnLocker.setMaximumSize(new java.awt.Dimension(20, 20));
bnLocker.setMinimumSize(new java.awt.Dimension(20, 20));
bnLocker.setPreferredSize(new java.awt.Dimension(20, 20));
bnLocker.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);
bnLocker.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
bnLockerActionPerformed(evt);
}
});
ieStatus.add(bnLocker);
pbDownloadDoc.setMaximumSize(new java.awt.Dimension(100, 16));
pbDownloadDoc.setPreferredSize(new java.awt.Dimension(100, 16));
ieStatus.add(pbDownloadDoc);
jPanel1.add(ieStatus, java.awt.BorderLayout.PAGE_END);
fileJMenu.setText("File");
fileJMenu.setToolTipText("File Operations");
miNewTab.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_T, java.awt.event.InputEvent.CTRL_MASK));
miNewTab.setText("New Tab");
miNewTab.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
miNewTabActionPerformed(evt);
}
});
fileJMenu.add(miNewTab);
miOpen.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_O, java.awt.event.InputEvent.CTRL_MASK));
miOpen.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/open.png"))); // NOI18N
miOpen.setText("Open File...");
miOpen.setToolTipText("Opens a document in this window");
miOpen.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
miOpenActionPerformed(evt);
}
});
fileJMenu.add(miOpen);
miSave.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_S, java.awt.event.InputEvent.CTRL_MASK));
miSave.setText("Save Page As...");
miSave.setToolTipText("Saves this document as a file");
miSave.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
miSaveActionPerformed(evt);
}
});
fileJMenu.add(miSave);
miPrint.setAccelerator(javax.swing.KeyStroke.getKeyStroke(java.awt.event.KeyEvent.VK_P, java.awt.event.InputEvent.CTRL_MASK));
miPrint.setIcon(new javax.swing.ImageIcon(getClass().getResource("/images/print.png"))); // NOI18N
miPrint.setText("Print");
miPrint.setToolTipText("Prints this page");
miPrint.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
miPrintActionPerformed(evt);
}
});
fileJMenu.add(miPrint);
fileJMenu.add(jSeparator1);
miExit.setText("Exit");
miExit.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
miExitActionPerformed(evt);
}
});
fileJMenu.add(miExit);
mainJMenuBar.add(fileJMenu);
viewJMenu.setText("View");
mainJMenuBar.add(viewJMenu);
toolsJMenu.setText("Tools");
binding = org.jdesktop.beansbinding.Bindings.createAutoBinding(org.jdesktop.beansbinding.AutoBinding.UpdateStrategy.READ_WRITE, cmiTraceRedraw, org.jdesktop.beansbinding.ELProperty.create("${selected}"), toolsJMenu, org.jdesktop.beansbinding.BeanProperty.create("debugGraphicsOptions"));
bindingGroup.addBinding(binding);
rbPaintJava.setSelected(true);
rbPaintJava.setText("paint as PAINT_JAVA");
rbPaintJava.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rbPaintJavaActionPerformed(evt);
}
});
toolsJMenu.add(rbPaintJava);
rbPaintJavaNative.setText("paint as PAINT_JAVA_NATIVE");
rbPaintJavaNative.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rbPaintJavaActionPerformed(evt);
}
});
toolsJMenu.add(rbPaintJavaNative);
rbPaintNative.setText("paint as PAINT_NATIVE");
rbPaintNative.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
rbPaintJavaActionPerformed(evt);
}
});
toolsJMenu.add(rbPaintNative);
toolsJMenu.add(jSeparator3);
cmiTraceRedraw.setText("Trace Redraw");
cmiTraceRedraw.setToolTipText("Shows update region while redraw procedure");
cmiTraceRedraw.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
cmiTraceRedrawActionPerformed(evt);
}
});
toolsJMenu.add(cmiTraceRedraw);
mainJMenuBar.add(toolsJMenu);
setJMenuBar(mainJMenuBar);
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 573, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(jPanel1, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.DEFAULT_SIZE, 556, Short.MAX_VALUE)
);
bindingGroup.bind();
pack();
}// </editor-fold>//GEN-END:initComponents
private void edStatusTextActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_edStatusTextActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_edStatusTextActionPerformed
private void miSaveActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miSaveActionPerformed
brMain.save();
}//GEN-LAST:event_miSaveActionPerformed
private void miExitActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_miExitActionPerformed
dispose();
}//GEN-LAST:event_miExitActionPerformed
private void bnLockerActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnLockerActionPerformed
// TODO add your handling code here:
}//GEN-LAST:event_bnLockerActionPerformed
private void onNavigate(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_onNavigate
brMain.setURL(edAddress.getText());
}//GEN-LAST:event_onNavigate
private void bnBackActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_bnBackActionPerformed
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -