Fields Summary |
---|
private static javax.microedition.lcdui.Displayable | displayableThe Displayable associated with the DisplayAccess |
private static DisplayAccess | displayAccessThe DisplayAccess associated with the GameCanvas |
private static GraphicsAccess | graphicsAccessThe GraphicsAccess tunnel instance handed out from
javax.microedition.lcdui package |
private static GameAccess | gameAccessThe GameAccess tunnel instance handed out from
javax.microedition.lcdui.game package |
private static final Object | lockLock to ensure synchronized access to the displayable |
Methods Summary |
---|
public static DisplayAccess | getDisplayAccess(javax.microedition.lcdui.Displayable c)Gets the DisplayAccess object for this Displayable.
synchronized (lock) {
if (c == displayable) {
return displayAccess;
} else {
return null;
}
}
|
public static GameCanvasLFImpl | getGameCanvasImpl(javax.microedition.lcdui.game.GameCanvas c)Gets the GameCanvasLFImpl object for this GameCanvas.
if (gameAccess != null) {
return gameAccess.getGameCanvasLFImpl(c);
}
return null;
|
public static GraphicsAccess | getGraphicsAccess()Gets GraphicsAccess instance needed to access extended
Image and Graphics APIs
synchronized (lock) {
return graphicsAccess;
}
|
public static void | registerDisplayAccess(javax.microedition.lcdui.Displayable c, DisplayAccess d)Associates the given Displayable and DisplayAccess. This is a
one-way association.
synchronized (lock) {
displayable = c;
displayAccess = d;
}
|
public static void | registerGameAccess(GameAccess gameAccess)Register given game package accessor instance
synchronized (lock) {
GameMap.gameAccess = gameAccess;
}
|
public static void | registerGraphicsAccess(GraphicsAccess graphicsAccess)Sets graphics accessor instance from javax.microedition.lcdui package
to use extended package-private Image and Graphics APIs
synchronized (lock) {
GameMap.graphicsAccess = graphicsAccess;
}
|