diff --git a/Mage.Client/src/main/java/mage/client/deckeditor/DeckImportClipboardDialog.form b/Mage.Client/src/main/java/mage/client/deckeditor/DeckImportClipboardDialog.form index 8493fd1400..f86a4e1b6b 100644 --- a/Mage.Client/src/main/java/mage/client/deckeditor/DeckImportClipboardDialog.form +++ b/Mage.Client/src/main/java/mage/client/deckeditor/DeckImportClipboardDialog.form @@ -1,8 +1,7 @@ -
+ - @@ -10,7 +9,6 @@ - @@ -30,7 +28,10 @@ - + + + + @@ -47,7 +48,7 @@ - + @@ -76,7 +77,7 @@ - + @@ -85,7 +86,8 @@ - + + @@ -94,11 +96,14 @@ - - - - - + + + + + + + + @@ -108,6 +113,7 @@ + @@ -121,6 +127,17 @@ + + + + + + + + + + + diff --git a/Mage.Client/src/main/java/mage/client/deckeditor/DeckImportClipboardDialog.java b/Mage.Client/src/main/java/mage/client/deckeditor/DeckImportClipboardDialog.java index 438c8954df..e074de1341 100644 --- a/Mage.Client/src/main/java/mage/client/deckeditor/DeckImportClipboardDialog.java +++ b/Mage.Client/src/main/java/mage/client/deckeditor/DeckImportClipboardDialog.java @@ -108,8 +108,8 @@ public class DeckImportClipboardDialog extends MageDialog { panelCommands = new javax.swing.JPanel(); buttonOK = new javax.swing.JButton(); buttonCancel = new javax.swing.JButton(); + buttonPaste = new javax.swing.JButton(); - setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE); setTitle("Import from clipboard"); setMinimumSize(new java.awt.Dimension(400, 400)); @@ -118,9 +118,10 @@ public class DeckImportClipboardDialog extends MageDialog { panelData.setViewportView(editData); labelData.setLabelFor(editData); - labelData.setText("Paste deck in text format to import:"); + labelData.setText("Deck in text format to import:"); buttonOK.setText("Import"); + buttonOK.setToolTipText("Import deck from current text"); buttonOK.addActionListener(new java.awt.event.ActionListener() { public void actionPerformed(java.awt.event.ActionEvent evt) { buttonOKActionPerformed(evt); @@ -134,23 +135,34 @@ public class DeckImportClipboardDialog extends MageDialog { } }); + buttonPaste.setIcon(new javax.swing.ImageIcon(getClass().getResource("/buttons/paste_24.png"))); // NOI18N + buttonPaste.setToolTipText("Paste text from clipboard"); + buttonPaste.addActionListener(new java.awt.event.ActionListener() { + public void actionPerformed(java.awt.event.ActionEvent evt) { + buttonPasteActionPerformed(evt); + } + }); + javax.swing.GroupLayout panelCommandsLayout = new javax.swing.GroupLayout(panelCommands); panelCommands.setLayout(panelCommandsLayout); panelCommandsLayout.setHorizontalGroup( panelCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelCommandsLayout.createSequentialGroup() - .addGap(0, 146, Short.MAX_VALUE) + .addComponent(buttonPaste, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) + .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 128, Short.MAX_VALUE) .addComponent(buttonOK, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(buttonCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 100, javax.swing.GroupLayout.PREFERRED_SIZE)) ); panelCommandsLayout.setVerticalGroup( panelCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) - .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelCommandsLayout.createSequentialGroup() - .addGap(0, 0, Short.MAX_VALUE) - .addGroup(panelCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) - .addComponent(buttonCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) - .addComponent(buttonOK, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))) + .addGroup(panelCommandsLayout.createSequentialGroup() + .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(panelCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING) + .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, panelCommandsLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE) + .addComponent(buttonCancel, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE) + .addComponent(buttonOK, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)) + .addComponent(buttonPaste, javax.swing.GroupLayout.Alignment.TRAILING, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE))) ); javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane()); @@ -160,7 +172,9 @@ public class DeckImportClipboardDialog extends MageDialog { .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup() .addContainerGap() .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING) - .addComponent(panelCommands, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE) + .addGroup(layout.createSequentialGroup() + .addGap(0, 0, 0) + .addComponent(panelCommands, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)) .addComponent(panelData, javax.swing.GroupLayout.Alignment.LEADING, javax.swing.GroupLayout.PREFERRED_SIZE, 0, Short.MAX_VALUE) .addGroup(javax.swing.GroupLayout.Alignment.LEADING, layout.createSequentialGroup() .addComponent(labelData) @@ -173,7 +187,7 @@ public class DeckImportClipboardDialog extends MageDialog { .addContainerGap() .addComponent(labelData) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) - .addComponent(panelData, javax.swing.GroupLayout.DEFAULT_SIZE, 448, Short.MAX_VALUE) + .addComponent(panelData, javax.swing.GroupLayout.DEFAULT_SIZE, 440, Short.MAX_VALUE) .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED) .addComponent(panelCommands, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE) .addContainerGap()) @@ -190,9 +204,14 @@ public class DeckImportClipboardDialog extends MageDialog { onOK(); }//GEN-LAST:event_buttonOKActionPerformed + private void buttonPasteActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_buttonPasteActionPerformed + onRefreshClipboard(); + }//GEN-LAST:event_buttonPasteActionPerformed + // Variables declaration - do not modify//GEN-BEGIN:variables private javax.swing.JButton buttonCancel; private javax.swing.JButton buttonOK; + private javax.swing.JButton buttonPaste; private javax.swing.JEditorPane editData; private javax.swing.JLabel labelData; private javax.swing.JPanel panelCommands; diff --git a/Mage.Client/src/main/resources/buttons/copy_128.png b/Mage.Client/src/main/resources/buttons/copy_128.png new file mode 100644 index 0000000000..cb3442c04c Binary files /dev/null and b/Mage.Client/src/main/resources/buttons/copy_128.png differ diff --git a/Mage.Client/src/main/resources/buttons/copy_24.png b/Mage.Client/src/main/resources/buttons/copy_24.png new file mode 100644 index 0000000000..9a2920c9a1 Binary files /dev/null and b/Mage.Client/src/main/resources/buttons/copy_24.png differ diff --git a/Mage.Client/src/main/resources/buttons/copy_32.png b/Mage.Client/src/main/resources/buttons/copy_32.png new file mode 100644 index 0000000000..9e8be51fac Binary files /dev/null and b/Mage.Client/src/main/resources/buttons/copy_32.png differ diff --git a/Mage.Client/src/main/resources/buttons/paste_128.png b/Mage.Client/src/main/resources/buttons/paste_128.png new file mode 100644 index 0000000000..45f8a68c34 Binary files /dev/null and b/Mage.Client/src/main/resources/buttons/paste_128.png differ diff --git a/Mage.Client/src/main/resources/buttons/paste_24.png b/Mage.Client/src/main/resources/buttons/paste_24.png new file mode 100644 index 0000000000..12ba4b619a Binary files /dev/null and b/Mage.Client/src/main/resources/buttons/paste_24.png differ diff --git a/Mage.Client/src/main/resources/buttons/paste_32.png b/Mage.Client/src/main/resources/buttons/paste_32.png new file mode 100644 index 0000000000..aa72ebba80 Binary files /dev/null and b/Mage.Client/src/main/resources/buttons/paste_32.png differ