75 lines
2.8 KiB
Java
75 lines
2.8 KiB
Java
package the.bytecode.club.bytecodeviewer.gui.hexviewer;
|
|
|
|
/**
|
|
* OK/Cancel Panel.
|
|
*/
|
|
public class OkCancelPanel extends javax.swing.JPanel {
|
|
|
|
public OkCancelPanel() {
|
|
initComponents();
|
|
}
|
|
|
|
/**
|
|
* 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() {
|
|
|
|
cancelButton = new javax.swing.JButton();
|
|
okButton = new javax.swing.JButton();
|
|
|
|
cancelButton.setText("Cancel");
|
|
cancelButton.addActionListener(this::cancelButtonActionPerformed);
|
|
|
|
okButton.setText("Ok");
|
|
okButton.addActionListener(this::okButtonActionPerformed);
|
|
|
|
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(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
.addComponent(okButton)
|
|
.addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
|
|
.addComponent(cancelButton)
|
|
.addContainerGap())
|
|
);
|
|
layout.setVerticalGroup(
|
|
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
|
.addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
|
|
.addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
|
|
.addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
|
|
.addComponent(cancelButton)
|
|
.addComponent(okButton))
|
|
.addContainerGap())
|
|
);
|
|
}// </editor-fold>//GEN-END:initComponents
|
|
|
|
private void cancelButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_cancelButtonActionPerformed
|
|
cancelAction();
|
|
}//GEN-LAST:event_cancelButtonActionPerformed
|
|
|
|
private void okButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_okButtonActionPerformed
|
|
okAction();
|
|
}//GEN-LAST:event_okButtonActionPerformed
|
|
|
|
|
|
// Variables declaration - do not modify//GEN-BEGIN:variables
|
|
private javax.swing.JButton cancelButton;
|
|
private javax.swing.JButton okButton;
|
|
// End of variables declaration//GEN-END:variables
|
|
|
|
protected void okAction() {
|
|
}
|
|
|
|
protected void cancelAction() {
|
|
}
|
|
|
|
public void setOkButtonText(String text) {
|
|
okButton.setText(text);
|
|
}
|
|
}
|