forked from External/mage
Made a hack for Nimbus LAF to add transparency to JInternalFrames. Updated CombatDialog. Updated Mage-Theme-Plugin (jar) with background. Fixed "Games played:" title length, so game count can be seen for big numbers.
This commit is contained in:
parent
c6ff81e619
commit
a731fba667
7 changed files with 161 additions and 3 deletions
|
|
@ -0,0 +1,30 @@
|
|||
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 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;
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue