Revert StaticDisplayState; For hosted only allow debug to be used.
[SquirrelJME.git] / modules / midp-lcdui / src / main / java / cc / squirreljme / runtime / lcdui / gfx / ProxyGraphicsTarget.java
blobd40df984e3ba377339fb9e945dede3a950f2452e
1 // -*- Mode: Java; indent-tabs-mode: t; tab-width: 4 -*-
2 // ---------------------------------------------------------------------------
3 // SquirrelJME
4 // Copyright (C) Stephanie Gawroriski <xer@multiphasicapps.net>
5 // ---------------------------------------------------------------------------
6 // SquirrelJME is under the GNU General Public License v3+, or later.
7 // See license.mkd for licensing and copyright information.
8 // ---------------------------------------------------------------------------
10 package cc.squirreljme.runtime.lcdui.gfx;
12 import javax.microedition.lcdui.Graphics;
14 /**
15 * This is used for the target of any {@link ProxyGraphics}.
17 * @since 2022/02/25
19 public final class ProxyGraphicsTarget
21 /** The target graphics object. */
22 volatile Graphics _target;
24 /**
25 * Initializes the target graphics.
27 * @param __g The graphics to target.
28 * @throws NullPointerException On null arguments.
29 * @since 2022/02/25
31 public ProxyGraphicsTarget(Graphics __g)
32 throws NullPointerException
34 if (__g == null)
35 throw new NullPointerException("NARG");
37 this._target = __g;
40 /**
41 * Sets the graphics to draw onto.
43 * @param __g The graphics to target.
44 * @throws NullPointerException On null arguments.
45 * @since 2022/02/25
47 public void setGraphics(Graphics __g)
48 throws NullPointerException
50 if (__g == null)
51 throw new NullPointerException("NARG");
53 this._target = __g;