forked from External/mage
Change main client window MagePanes from JInternalFrames to JLayeredPanes
* This change's purpose is to get rid of the extra borders shown around the window border. These arise from using JInternalFrames in a JDestopPane and are impossible to remove in a forwards compatible way when using JInternalFrames. The solution it to move to have MagePane inherit from a plain old JLayeredPane instead of JInternalFrame. All of the MagePanes are always maximized anyways, so this doesn't lose any functionality.
This commit is contained in:
parent
fee7e4a4e6
commit
321f5597b7
9 changed files with 131 additions and 186 deletions
|
|
@ -53,7 +53,6 @@ public class DeckEditorPane extends MagePane {
|
|||
* Creates new form TablesPane
|
||||
*/
|
||||
public DeckEditorPane() {
|
||||
this.setDefaultCloseOperation(DISPOSE_ON_CLOSE);
|
||||
boolean initialized = false;
|
||||
if (Plugins.instance.isThemePluginLoaded()) {
|
||||
Map<String, JComponent> uiMap = new HashMap<>();
|
||||
|
|
@ -105,8 +104,8 @@ public class DeckEditorPane extends MagePane {
|
|||
|
||||
deckEditorPanel1 = new mage.client.deckeditor.DeckEditorPanel();
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||
getContentPane().setLayout(layout);
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(deckEditorPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 885, Short.MAX_VALUE)
|
||||
|
|
@ -115,14 +114,12 @@ public class DeckEditorPane extends MagePane {
|
|||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(deckEditorPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, 626, Short.MAX_VALUE)
|
||||
);
|
||||
|
||||
pack();
|
||||
}// </editor-fold>//GEN-END:initComponents
|
||||
|
||||
private void initComponents(Component container) {
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||
getContentPane().setLayout(layout);
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(container, javax.swing.GroupLayout.DEFAULT_SIZE, 885, Short.MAX_VALUE)
|
||||
|
|
@ -132,7 +129,7 @@ public class DeckEditorPane extends MagePane {
|
|||
.addComponent(container, javax.swing.GroupLayout.DEFAULT_SIZE, 626, Short.MAX_VALUE)
|
||||
);
|
||||
|
||||
pack();
|
||||
|
||||
}
|
||||
|
||||
public DeckEditorPanel getPanel() {
|
||||
|
|
|
|||
|
|
@ -66,8 +66,8 @@ public class CollectionViewerPane extends MagePane {
|
|||
private void initComponents(Component container) {
|
||||
Component component = container != null ? container : new CollectionViewerPanel();
|
||||
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
|
||||
getContentPane().setLayout(layout);
|
||||
javax.swing.GroupLayout layout = new javax.swing.GroupLayout(this);
|
||||
this.setLayout(layout);
|
||||
layout.setHorizontalGroup(
|
||||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(component, javax.swing.GroupLayout.DEFAULT_SIZE, 885, Short.MAX_VALUE)
|
||||
|
|
@ -76,8 +76,6 @@ public class CollectionViewerPane extends MagePane {
|
|||
layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
|
||||
.addComponent(component, javax.swing.GroupLayout.DEFAULT_SIZE, 626, Short.MAX_VALUE)
|
||||
);
|
||||
|
||||
pack();
|
||||
}
|
||||
|
||||
@Override
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue