UI: added test card render modes dialog (available from debug menu);

This commit is contained in:
Oleg Agafonov 2019-05-06 20:15:39 +04:00
parent e1514e0d49
commit 051c3c4ac0
6 changed files with 559 additions and 223 deletions

View file

@ -827,6 +827,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
popupDebug = new javax.swing.JPopupMenu();
menuDebugTestModalDialog = new javax.swing.JMenuItem();
menuDebugTestCardRenderModesDialog = new javax.swing.JMenuItem();
desktopPane = new MageJDesktop();
mageToolbar = new javax.swing.JToolBar();
btnPreferences = new javax.swing.JButton();
@ -857,6 +858,14 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
});
popupDebug.add(menuDebugTestModalDialog);
menuDebugTestCardRenderModesDialog.setText("Test Card Render Modes");
menuDebugTestCardRenderModesDialog.addActionListener(new java.awt.event.ActionListener() {
public void actionPerformed(java.awt.event.ActionEvent evt) {
menuDebugTestCardRenderModesDialogActionPerformed(evt);
}
});
popupDebug.add(menuDebugTestCardRenderModesDialog);
setDefaultCloseOperation(javax.swing.WindowConstants.DO_NOTHING_ON_CLOSE);
setMinimumSize(new java.awt.Dimension(1024, 768));
@ -995,16 +1004,16 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
getContentPane().setLayout(layout);
layout.setHorizontalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(desktopPane, javax.swing.GroupLayout.DEFAULT_SIZE, 838, Short.MAX_VALUE)
.addComponent(mageToolbar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addComponent(desktopPane, javax.swing.GroupLayout.DEFAULT_SIZE, 838, Short.MAX_VALUE)
.addComponent(mageToolbar, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
);
layout.setVerticalGroup(
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(mageToolbar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(2, 2, 2)
.addComponent(desktopPane, javax.swing.GroupLayout.DEFAULT_SIZE, 145, Short.MAX_VALUE))
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
.addGroup(layout.createSequentialGroup()
.addComponent(mageToolbar, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
.addGap(2, 2, 2)
.addComponent(desktopPane, javax.swing.GroupLayout.DEFAULT_SIZE, 145, Short.MAX_VALUE))
);
pack();
@ -1079,6 +1088,11 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
popupDebug.show(evt.getComponent(), 0, evt.getComponent().getHeight());
}//GEN-LAST:event_btnDebugMouseClicked
private void menuDebugTestCardRenderModesDialogActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_menuDebugTestCardRenderModesDialogActionPerformed
final TestCardRenderDialog dialog = new TestCardRenderDialog();
dialog.showDialog();
}//GEN-LAST:event_menuDebugTestCardRenderModesDialogActionPerformed
public void downloadImages() {
DownloadPicturesService.startDownload();
}
@ -1328,6 +1342,7 @@ public class MageFrame extends javax.swing.JFrame implements MageClient {
private javax.swing.JToolBar.Separator jSeparatorImages;
private javax.swing.JToolBar.Separator jSeparatorSymbols;
private javax.swing.JToolBar mageToolbar;
private javax.swing.JMenuItem menuDebugTestCardRenderModesDialog;
private javax.swing.JMenuItem menuDebugTestModalDialog;
private javax.swing.JPopupMenu popupDebug;
private javax.swing.JToolBar.Separator separatorDebug;