AppletHarness?

Ok so I have been messing around with the idea of deploying my project as an applet but I have a few questions about the AppletHarness.


  1. Why isn’t the AppletHarness a AppState attached to the Application it is attaching to it’s self?
  2. Why doesn’t the AppletHarness have a full screen mode? “Like a undecorated Frame using the toolkit to get the screen dimensions”
  3. How do you force it to have a width and height of 100%?
  1. The AppletHarness (just like the Android “harness”) wraps the application to run on a different platform. What you suggest is “inverted” and doesn’t really work. The application doesn’t run w/o the harness, hence it cannot run the harness in an AppState :slight_smile:
  2. Yeah, it should support that more easily but I think with some hack you can in fact make it fullscreen @Momoko_Fan?
  3. You define that in the html file, check the template.

@normen

I was just thinking something like creating a AppState that allows you to control some aspects of the AppHarness and allow access to the underling Applet by modifying the createCanvas() method.



[java]

app.setSettings(settings);

app.createCanvas();

app.stateManager.attach(this);

[/java]



and add some methods like getApplet() that returns the AppHarness.



Just an idea! :smiley:

I just think that having access to your harness Android or Applet should be accessible from the Application.



EDIT:
I should stop being lazy and just do it for myself. This kind of access might not be standard because not many users will need or want to use it right?
@skidrunner said:
I just think that having access to your harness Android or Applet should be accessible from the Application.

No it shouldn't, the application is generic, the harness is platform specific. By definition it cannot be accessed just like the underlying platform is irrelevant to java applications.

@normen i am not talking about changing the Application class at all.



You would be able to access it by calling

[java]

AppletHarness appHarnes = (AppletHarness)stateManage.getState(AppletHarness.class);

[/java]



you wouldn’t even have to put anything into the AppState it would just allow you to get it back.



EDIT:
I saw this method of accessing a AppState in MonkeyZone actually you were the one that linked me to it.

Dude, you are getting it wrong. The harness should have no options that the application is supposed to change whatsoever. If you need that then make a “starter” application like many games have. If your application has OS specific code you already failed.

@normen said:
Dude, you are getting it wrong. The harness should have no options that the application is supposed to change whatsoever. If you need that then make a "starter" application like many games have. If your application has OS specific code you already failed.


Your right the idea of creating in java application is not to be platform specific, and actually since you have already commented about sizing and full screen I wouldn't need to access the harness.

Sorry for wasting your time