Switch to the stylesheet world.
git-svn-id: svn+ssh://src.earth.threerings.net/narya/trunk@3801 542714f4-19e9-0310-aa3c-eee0fc999fb1
This commit is contained in:
@@ -21,6 +21,9 @@
|
||||
|
||||
package com.threerings.jme.client;
|
||||
|
||||
import java.io.InputStream;
|
||||
import java.io.InputStreamReader;
|
||||
|
||||
import com.jme.bounding.BoundingBox;
|
||||
import com.jme.math.FastMath;
|
||||
import com.jme.math.Matrix3f;
|
||||
@@ -29,6 +32,7 @@ import com.jme.renderer.ColorRGBA;
|
||||
import com.jme.scene.shape.Box;
|
||||
import com.jme.util.LoggingSystem;
|
||||
import com.jme.util.geom.BufferUtils;
|
||||
import com.jmex.bui.BStyleSheet;
|
||||
|
||||
import com.threerings.util.Name;
|
||||
|
||||
@@ -45,6 +49,9 @@ import com.threerings.jme.JmeApp;
|
||||
*/
|
||||
public class JabberApp extends JmeApp
|
||||
{
|
||||
/** Used to configure our user interface. */
|
||||
public BStyleSheet stylesheet;
|
||||
|
||||
// documentation inherited
|
||||
public boolean init ()
|
||||
{
|
||||
@@ -138,6 +145,18 @@ public class JabberApp extends JmeApp
|
||||
}
|
||||
}
|
||||
|
||||
// load up the default BUI stylesheet
|
||||
try {
|
||||
InputStream stin = getClass().getClassLoader().
|
||||
getResourceAsStream("rsrc/style.bss");
|
||||
stylesheet = new BStyleSheet(
|
||||
new InputStreamReader(stin),
|
||||
new BStyleSheet.DefaultResourceProvider());
|
||||
} catch (Exception e) {
|
||||
e.printStackTrace(System.err);
|
||||
System.exit(-1);
|
||||
}
|
||||
|
||||
String username = (args.length > 2) ? args[2] : null;
|
||||
String password = (args.length > 3) ? args[3] : null;
|
||||
|
||||
|
||||
@@ -4,7 +4,6 @@
|
||||
package com.threerings.jme.client;
|
||||
|
||||
import com.jmex.bui.BLabel;
|
||||
import com.jmex.bui.BLookAndFeel;
|
||||
import com.jmex.bui.BWindow;
|
||||
import com.jmex.bui.layout.BorderLayout;
|
||||
|
||||
@@ -23,7 +22,7 @@ public class JabberView extends BWindow
|
||||
{
|
||||
public JabberView (CrowdContext ctx)
|
||||
{
|
||||
super(BLookAndFeel.getDefaultLookAndFeel(), new BorderLayout());
|
||||
super(JabberApp.stylesheet, new BorderLayout());
|
||||
|
||||
_ctx = ctx;
|
||||
_jctx = (JmeContext)ctx;
|
||||
|
||||
Reference in New Issue
Block a user