Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
12c3fbc
commit 27bfdb4
Showing
5 changed files
with
67 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
package snowblossom.iceleaf; | ||
|
||
import java.awt.Component; | ||
import java.awt.Container; | ||
import javax.swing.JTextArea; | ||
import javax.swing.JTextField; | ||
import javax.swing.JLabel; | ||
import javax.swing.JTabbedPane; | ||
|
||
public class UIUtil | ||
{ | ||
public static void applyLook(Component comp, IceLeaf ice_leaf) | ||
{ | ||
|
||
if (comp instanceof Container) | ||
{ | ||
Container ct = (Container) comp; | ||
for(Component c : ct.getComponents()) | ||
{ | ||
applyLook(c, ice_leaf); | ||
} | ||
} | ||
|
||
if (comp instanceof JTextArea) | ||
{ | ||
JTextArea e = (JTextArea)comp; | ||
if (!e.isEditable()) | ||
{ | ||
comp.setBackground(ice_leaf.getTextAreaBGColor()); | ||
} | ||
comp.setFont(ice_leaf.getFixedFont().deriveFont(0,12)); | ||
} | ||
else if (comp instanceof JTextField) | ||
{ | ||
comp.setFont(ice_leaf.getFixedFont().deriveFont(0,12)); | ||
} | ||
else if (comp instanceof JLabel) | ||
{ | ||
//int size = comp.getFont().getSize(); | ||
//comp.setFont(ice_leaf.getVariableFont().deriveFont(0,size)); | ||
|
||
} | ||
else if (comp instanceof JTabbedPane) | ||
{ | ||
//int size = comp.getFont().getSize(); | ||
//comp.setFont(ice_leaf.getVariableFont().deriveFont(0,size)); | ||
|
||
} | ||
|
||
|
||
} | ||
|
||
} |