forked from External/mage
I used Intellij IDEA to automatically refactor code to achive 3 goals. 1) get rid of anonymouse classes, and replace the with lamba to get more readeable and clean code (like in TableWaitingDialog). 2) make effectively final variables actually final to avoid inadvertent changes on it in further releases and keep objects as immutable, as possible. 3) Get rid of unused imports (most of the changes) in whole project classes.
30 lines
No EOL
945 B
Java
30 lines
No EOL
945 B
Java
package mage.client.components;
|
|
|
|
import javax.swing.JComponent;
|
|
import javax.swing.plaf.synth.Region;
|
|
import javax.swing.plaf.synth.SynthStyle;
|
|
import javax.swing.plaf.synth.SynthStyleFactory;
|
|
|
|
/**
|
|
* Class makes {@link JInternalFrame} translucent background possible.
|
|
* This class provides fix that makes setOpaque(false) and setBackgroundColor(any color) working,
|
|
* especially for Nimbus LAF that has great problems with it.
|
|
*
|
|
* @version 0.1 16.11.2010
|
|
* @author nantuko
|
|
*/
|
|
public class MageSynthStyleFactory extends SynthStyleFactory {
|
|
private final SynthStyleFactory wrappedFactory;
|
|
|
|
public MageSynthStyleFactory(SynthStyleFactory factory) {
|
|
this.wrappedFactory = factory;
|
|
}
|
|
|
|
public SynthStyle getStyle(JComponent c, Region id) {
|
|
SynthStyle s = wrappedFactory.getStyle(c, id);
|
|
if (id == Region.INTERNAL_FRAME) {
|
|
s = new TranslucentSynthSytle(s);
|
|
}
|
|
return s;
|
|
}
|
|
} |