Skip to content

Commit dd49eef

Browse files
committed
Project Cleaned
-Project was tidied up and readied for submitting to the jMonkeyEngine community. TODO Section: - Font check/load code: required - Edit / rebuild of nimrodlf.jar to fix "disappearing" GridBagLayout situations: required *bug*
1 parent b7073ee commit dd49eef

111 files changed

Lines changed: 906 additions & 1119 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
Authors:
2+
Relic724 - Charles Anderson
3+
4+
Contributors - Assets:
5+
nehon - Rémy Bouquet

build/classes/org/jme3/netbeans/plaf/darkmonkey/Bundle.properties

Lines changed: 5 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -2,16 +2,9 @@ OpenIDE-Module-Name=DarkMonkey
22
OpenIDE-Module-Display-Category=Appearance
33
OpenIDE-Module-Short-Description=Contains DarkMonkey theme JME3.1 stable release
44
OpenIDE-Module-Long-Description=\
5-
<div style="background:#333333;color:#995500; font-family:'Kreon',serif;margin: 3px, #777777;"/> \
6-
<img src="http://hub.jmonkeyengine.org/uploads/default/1252/91fcc91347189c84.png" style="margin-left:auto;margin-right:auto"/><br/>\
7-
<h1 style="font-weight:bold;text-align:center;">DarkMonkey Theme</h1> \
8-
<p style="color:#aaaaaa;">This is a Fonts/Colors and LookAndFeel combo that utilizes \
9-
<a style="color:#999900" href="http://jamesmcfadden.co.uk/netbeans-obsidian-theme/" target="new">James McFadden's Obsidian Fonts/Colors</a>\
10-
and <a style="color:#999900" href="http://nilogonzalez.es/nimrodlf/download-en.html" target="new">Nilo Gonzalez's Nimrod LookAndFeel</a> which is\
11-
based on the Metal LookAndFeel. This module just checks and sees if the user already has the components, and if not,\
12-
installs theme and activates a few options under Tools - Options - Appearance - DarkMonkey. </p> \
13-
For More Information visit: \
14-
<a style="color:#999900" href="http://hub.jmonkeyengine.org/t/custom-theme-for-sdk-through-look-and-feel-setting/31449" target="new"> \
15-
Change to Actual Help Doc </a> </div> \
16-
5+
<div style="background:#333333;color:#995500; font-family:'Kreon',serif;margin: 3px, #777777;"/> <img src="http://hub.jmonkeyengine.org/uploads/default/1252/91fcc91347189c84.png" style="margin-left:auto;margin-right:auto"/><br/><h1 style="font-weight:bold;text-align:center;">DarkMonkey Theme</h1> <p style="color:#aaaaaa;">This is a Fonts/Colors and LookAndFeel combo that utilizes <a style="color:#999900" href="http://jamesmcfadden.co.uk/netbeans-obsidian-theme/" target="new">James McFadden's Obsidian Fonts/Colors</a>and <a style="color:#999900" href="http://nilogonzalez.es/nimrodlf/download-en.html" target="new">Nilo Gonzalez's Nimrod LookAndFeel</a> which isbased on the Metal LookAndFeel. \
6+
This module just checks and sees if the user already has the components, and if not, installs theme and activates a few options under Tools - Options - Appearance - DarkMonkey. \
7+
It also adds a Fonts/Colors Profile called "Dark Monkey". \
8+
We hope you like it!\
9+
</p> For More Information visit: <a style="color:#999900" href="http://hub.jmonkeyengine.org/t/darkmonkey-dev-blog/31566" target="new"> DarkMonkey Development Thread </a> </div>
1710

-974 Bytes
Binary file not shown.
Binary file not shown.
0 Bytes
Binary file not shown.
Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
public static void loadFontsFromJar(Object refObj, String relPath) {
2+
//first, we grab ahold of what all fonts are in the JRE's system
3+
GraphicsEnvironment ge = GraphicsEnvironment.getLocalGraphicsEnvironment();
4+
String[] fontFamilies = ge.getAvailableFontFamilyNames();
5+
//Next we get a listing of all of the fonts in the refObj's jar at relPath
6+
ZipFile zipFile = new ZipFile("C:/test.zip");
7+
InputStream stream;
8+
Enumeration<? extends ZipEntry> entries = zipFile.entries();
9+
try {
10+
bi = ImageIO.read(refObj.getClass().getResourceAsStream(fileName));
11+
} catch (IOException e) {
12+
// File is probably referenced wrong or "mispleled"... lol.
13+
e.printStackTrace();
14+
}
15+
16+
while (entries.hasMoreElements()) {
17+
ZipEntry entry = entries.nextElement();
18+
stream = zipFile.getInputStream(entry);
19+
stream.close();
20+
}
21+
22+
ge.registerFont(Font.createFont(Font.TRUETYPE_FONT, new File("A.ttf")));
23+
24+
}
25+
26+
/**
27+
* Note from Charles: DO NOT USE - Retain it though :) this method correctly
28+
* does get the path... of Netbeans.. lol... ... Todo: adjust this to work
29+
* with concepts from the LoadImagefromJar... ... and we can make it work
30+
* for custom defined themes dynamically in conjunction with the
31+
* functionality available from Nilo's NimROD base. END NOTE...
32+
*
33+
* @param relativePath
34+
* @return
35+
* @throws NoSuchFileException
36+
*/
37+
public static String relpath(String relativePath) {
38+
//TODO fix the following statement and we can start having dynamic LaF adjustment - Charles
39+
final File f = new File(DMUtils.class.getProtectionDomain().getCodeSource().getLocation().getPath());
40+
//END TODO - Charles
41+
String returnString;
42+
int i;
43+
returnString = f.getPath();
44+
i = returnString.indexOf("org-jme3-netbeans"); // This would have to be adjusted as well - Charles
45+
returnString = returnString.substring(0, i);
46+
returnString = returnString.replace(File.separatorChar, '/') + relativePath;
47+
File check = new File(returnString);
48+
49+
return returnString;
50+
51+
}
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
- Note from Charles -
2+
Ok, I think I have everything covered for community involvement:
3+
If you contribute make sure to toss your name into the AUTHORS.txt file
4+
for the proper directory. Make sure to toss in commenting and supply JavaDoc
5+
for Methods / Classes. Otherwise, have fun with it!
6+
7+
Structure:
8+
-layer.xml contains the FAC side of this project.
9+
-DarkMonkeyLookAndFeel contains the LAF side of this project.
10+
-Installer is responsible for making sure LAF side and unregistered fonts are
11+
available for each instance of netbeans.
12+
-DMUtils contains resource/file methods for base IO or resource transformations
13+
-DarkMonkeyValidator is a placeholder launchpoint snippet for conversion from
14+
nbm format to a form that would integrate with an SDK downloadable build
15+
(it is unnecessary as-is. Would replace Installer, functionally)
16+
-DarkMonkey.theme is the desired way to use nimrodlf (unimplemented at current time)
17+
-DarkMonkeyIconFactory produces images/icons for the small/fixed size level
18+
-Tree.expandedIcon is overridden
19+
-Tree.collapsedIcon is overridden
20+
- more can be added
21+
-Bundle.properties contains one of the cooler module description pages, ever*.
22+
-* COOLEST. DESCRIPTION. EVER. (I'm cereal! / lol! /omg!)
23+
24+
Directory Structure:
25+
org.jme3.netbeans.plaf.darkmonkey is considered root for the relative path calls
26+
that you will see in code. *Especially* if DMUtils is involved.
27+
-ext/ or external, currently contains nimrodlf.jar and nimrodlf_src.zip
28+
-fac/ or FontsColors, contains the FontsColors.xml files for layer.xml to
29+
place into netbean's xmlfilesytem.
30+
-fac/AnnotationTypes/ contains the Annotation.xml files for layer.xml to
31+
place into netbean's xmlfilesytem. *Unimplemented* Only if the sidebar
32+
icons for breakpoints and such should be replaced.
33+
-fac/AnnotationTypes/icons *Unimplemented* *Does not exist yet* see above.
34+
-fonts/ *unimplented* contains the physical .ttf fonts used by the LAF and FAC sides.
35+
-icons/ contains image resources for LAF side.
36+
37+
38+
Current Todo List:
39+
-fix bug in src for nimrodlf.jar rebuild in ext/
40+
- Bug has to do with GridBagLayout and other such stuff where preferredSize
41+
is derived.
42+
-add font check/load code for fonts/. see JunkSnippet.txt for some proto work.
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
- Note from Charles -
2+
Yeah, these are the full xml definitions for the
3+
annotations types. I've retained them from Nehon's
4+
conf.zip file, but these aren't added to the layer.xml.
5+
6+
Yet...
7+
8+
-Only if we want to override the various icons, n stuff.
9+
or
10+
-if these actually override the colors specified in
11+
the annotations fonts/colors.

0 commit comments

Comments
 (0)