package sun.awt.motif;
import java.awt.*;
import java.awt.peer.*;
import java.awt.event.PaintEvent;
import java.awt.event.MouseEvent;
import java.awt.event.InputEvent;
import sun.awt.*;
import sun.awt.image.ToolkitImage;
import sun.awt.image.SunVolatileImage;
import java.awt.image.ImageProducer;
import java.awt.image.ImageObserver;
import java.awt.image.ColorModel;
import java.awt.image.VolatileImage;
import java.awt.dnd.DropTarget;
import java.awt.dnd.peer.DropTargetPeer;
import sun.java2d.BackBufferCapsProvider;
import sun.java2d.SunGraphics2D;
import sun.java2d.SurfaceData;
import java.lang.reflect.Method;
import java.util.logging.*;
import sun.java2d.pipe.Region;
public
abstract class MComponentPeer implements BackBufferCapsProvider, ComponentPeer, DropTargetPeer, X11ComponentPeer {
private static final Logger log = Logger.getLogger("sun.awt.motif.MComponentPeer");
private static final Logger focusLog = Logger.getLogger("sun.awt.motif.focus.MComponentPeer");
Component target;
long pData;
long jniGlobalRef;
protected X11GraphicsConfig graphicsConfig;
SurfaceData surfaceData;
int oldWidth = -1;
int oldHeight = -1;
private RepaintArea paintArea;
boolean isLayouting = false;
boolean paintPending = false;
protected boolean disposed = false;
private static int JAWT_LOCK_ERROR=0x00000001;
private static int JAWT_LOCK_CLIP_CHANGED=0x00000002;
private static int JAWT_LOCK_BOUNDS_CHANGED=0x00000004;
private static int JAWT_LOCK_SURFACE_CHANGED=0x00000008;
private int drawState = JAWT_LOCK_CLIP_CHANGED |
JAWT_LOCK_BOUNDS_CHANGED |
JAWT_LOCK_SURFACE_CHANGED;
static final int MOTIF_NA = 0 ;
static final int MOTIF_V1 = 1 ;
static final int MOTIF_V2 = 2 ;
private Font font;
private long backBuffer = 0;
private VolatileImage xBackBuffer = null;
private BufferCapabilities backBufferCaps;
static {
initIDs();
}
private native static void initIDs();
public boolean isObscured() {
Container container = (target instanceof Container) ?
(Container)target : target.getParent();
if (container == null) {
return true;
}
Container parent;
while ((parent = container.getParent()) != null) {
container = parent;
}
if (container instanceof Window) {
MWindowPeer wpeer = (MWindowPeer)(container.getPeer());
if (wpeer != null) {
return (wpeer.winAttr.visibilityState !=
MWindowAttributes.AWT_UNOBSCURED);
}
}
return true;
}
public boolean canDetermineObscurity() {
return true;
}
abstract void create(MComponentPeer parent);
void create(MComponentPeer parent, Object arg) {
create(parent);
}
void EFcreate(MComponentPeer parent, int x){}
native void pInitialize();
native void pShow();
native void pHide();
native void pEnable();
native void pDisable();
native void pReshape(int x, int y, int width, int height);
native void pDispose();
native void pMakeCursorVisible();
native Point pGetLocationOnScreen();
native Point pGetLocationOnScreen2(Window win, MWindowPeer wpeer);
native void pSetForeground(Color c);
native void pSetBackground(Color c);
private native void pSetFont(Font f);
native int getNativeColor(Color clr, GraphicsConfiguration gc);
static native Container getParent_NoClientCode(Component component);
static native Component[] getComponents_NoClientCode(Container container);
void initialize() {
if (!target.isVisible()) {
hide();
}
Color c;
Font f;
Cursor cursor;
pInitialize();
if ((c = target.getForeground()) != null) {
setForeground(c);
}
if ((c = target.getBackground()) != null) {
setBackground(c);
}
if ((f = target.getFont()) != null) {
setFont(f);
}
pSetCursor(target.getCursor());
if (!target.isEnabled()) {
disable();
}
Rectangle r = target.getBounds();
reshape(r.x, r.y, r.width, r.height);
if (target.isVisible()) {
show();
}
surfaceData = graphicsConfig.createSurfaceData(this);
}
public void init(Component target, Object arg) {
this.target = target;
this.paintArea = new RepaintArea();
Container parent = MToolkit.getNativeContainer(target);
MComponentPeer parentPeer = (MComponentPeer) MToolkit.targetToPeer(parent);
create(parentPeer, arg);
initialize();
}
MComponentPeer(Component target, Object arg) {
init(target, arg);
}
MComponentPeer() {}
public void init(Component target) {
this.target = target;
this.paintArea = new RepaintArea();
Container parent = MToolkit.getNativeContainer(target);
MComponentPeer parentPeer = (MComponentPeer) MToolkit.targetToPeer(parent);
create(parentPeer);
if (parent != null && parent instanceof ScrollPane) {
MScrollPanePeer speer = (MScrollPanePeer) parentPeer;
speer.setScrollChild(this);
}
initialize();
}
MComponentPeer(Component target) {
init(target);
}
protected void finalize() throws Throwable {
dispose();
super.finalize();
}
public void setForeground(Color c) {
pSetForeground(c);
}
public void setBackground(Color c) {
pSetBackground(c);
}
public void updateCursorImmediately() {
MGlobalCursorManager.getCursorManager().updateCursorImmediately();
}
public void setFont(Font f) {
ComponentPeer peer;
if (f == null) {
f = defaultFont;
}
pSetFont(f);
if ( target instanceof Container ) {
Container container = (Container) target;
int count = container.getComponentCount();
Component[] children = container.getComponents();
for (int i=0; i<count; i++) {
if ( children[i] != null ) {
peer = children[i].getPeer();
if (peer != null) {
Font rightFont = children[i].getFont();
if (!f.equals(rightFont)) {
peer.setFont(rightFont);
} else
if (children[i] instanceof Container) {
peer.setFont(f);
}
}
}
}
}
font = f;
}
public native void setTargetBackground(Color c);
public native void pSetCursor(Cursor c);
public native void pSetScrollbarBackground(Color c);
public native void pSetInnerForeground(Color c);
public boolean isFocusable() {
return false;
}
public SurfaceData getSurfaceData() {
return surfaceData;
}
public ColorModel getColorModel() {
return graphicsConfig.getColorModel();
}
public ColorModel getColorModel(int transparency) {
return graphicsConfig.getColorModel(transparency);
}
public int updatePriority() {
return Thread.NORM_PRIORITY;
}
public void repaint(long tm, int x, int y, int width, int height) {
}
public void paint(Graphics g) {
Dimension d = target.getSize();
if (g instanceof Graphics2D ||
g instanceof sun.awt.Graphics2Delegate) {
g.clearRect(0, 0, d.width, d.height);
} else {
g.setColor(target.getBackground());
g.fillRect(0, 0, d.width, d.height);
g.setColor(target.getForeground());
}
target.paint(g);
}
public void print(Graphics g) {
Dimension d = target.getSize();
if (g instanceof Graphics2D ||
g instanceof sun.awt.Graphics2Delegate) {
g.clearRect(0, 0, d.width, d.height);
} else {
g.setColor(target.getBackground());
g.fillRect(0, 0, d.width, d.height);
g.setColor(target.getForeground());
}
target.print(g);
}
public void coalescePaintEvent(PaintEvent e) {
Rectangle r = e.getUpdateRect();
paintArea.add(r, e.getID());
if (log.isLoggable(Level.FINEST)) {
switch(e.getID()) {
case PaintEvent.UPDATE:
log.log(Level.FINEST, "coalescePaintEvent: UPDATE: add: x = " +
r.x + ", y = " + r.y + ", width = " + r.width + ", height = " + r.height);
return;
case PaintEvent.PAINT:
log.log(Level.FINEST, "coalescePaintEvent: PAINT: add: x = " +
r.x + ", y = " + r.y + ", width = " + r.width + ", height = " + r.height);
return;
}
}
}
native void nativeHandleEvent(AWTEvent e);
protected boolean shouldFocusOnClick() {
return isFocusable();
}
static boolean canBeFocusedByClick(Component component) {
if (component == null) {
return false;
} else {
return component.isDisplayable() && component.isVisible() && component.isEnabled() && component.isFocusable();
}
}
static Method requestFocusWithCause;
static void callRequestFocusInWindow(Component target, CausedFocusEvent.Cause cause) {
AWTAccessor.getComponentAccessor().requestFocusInWindow(target, cause);
}
public void handleEvent(AWTEvent e) {
int id = e.getID();
switch(id) {
case PaintEvent.PAINT:
paintPending = false;
case PaintEvent.UPDATE:
if (!isLayouting && !paintPending) {
paintArea.paint(target,false);
}
return;
case MouseEvent.MOUSE_PRESSED:
if (target == e.getSource() && !((InputEvent)e).isConsumed() && shouldFocusOnClick()
&& !target.isFocusOwner() && canBeFocusedByClick(target))
{
callRequestFocusInWindow(target, CausedFocusEvent.Cause.MOUSE_EVENT);
}
break;
default:
break;
}
nativeHandleEvent(e);
}
public Dimension getMinimumSize() {
return target.getSize();
}
public Dimension getPreferredSize() {
return getMinimumSize();
}
public void layout() {}
public Rectangle getBounds() {
return ((Component)target).getBounds();
}
public Object getTarget() {
return target;
}
public java.awt.Toolkit getToolkit() {
return Toolkit.getDefaultToolkit();
}
final static Font defaultFont = new Font(Font.DIALOG, Font.PLAIN, 12);
public synchronized Graphics getGraphics() {
if (!disposed) {
Component target = (Component) this.target;
Color bgColor = target.getBackground();
if (bgColor == null) {
bgColor = SystemColor.window;
}
Color fgColor = target.getForeground();
if (fgColor == null) {
fgColor = SystemColor.windowText;
}
Font font = target.getFont();
if (font == null) {
font = defaultFont;
}
return new SunGraphics2D(surfaceData, fgColor, bgColor, font);
}
return null;
}
public Image createImage(ImageProducer producer) {
return new ToolkitImage(producer);
}
public Image createImage(int width, int height) {
return graphicsConfig.createAcceleratedImage(target, width, height);
}
public VolatileImage createVolatileImage(int width, int height) {
return new SunVolatileImage(target, width, height);
}
public boolean prepareImage(Image img, int w, int h, ImageObserver o) {
return getToolkit().prepareImage(img, w, h, o);
}
public int checkImage(Image img, int w, int h, ImageObserver o) {
return getToolkit().checkImage(img, w, h, o);
}
public FontMetrics getFontMetrics(Font font) {
return X11FontMetrics.getFontMetrics(font);
}
protected void disposeImpl() {
SurfaceData oldData = surfaceData;
surfaceData = null;
oldData.invalidate();
MToolkit.targetDisposedPeer(target, this);
pDispose();
}
public final void dispose() {
boolean call_disposeImpl = false;
if (!disposed) {
synchronized (this) {
SunToolkit.awtLock();
try {
if (!disposed) {
disposed = call_disposeImpl = true;
}
} finally {
SunToolkit.awtUnlock();
}
}
}
if (call_disposeImpl) {
disposeImpl();
}
}
native static boolean processSynchronousLightweightTransfer(Component heavyweight, Component descendant,
boolean temporary, boolean focusedWindowChangeAllowed,
long time);
public boolean requestFocus
(Component lightweightChild, boolean temporary,
boolean focusedWindowChangeAllowed, long time, CausedFocusEvent.Cause cause) {
if (processSynchronousLightweightTransfer((Component)target, lightweightChild, temporary,
focusedWindowChangeAllowed, time)) {
return true;
} else {
if (focusLog.isLoggable(Level.FINER)) {
focusLog.log(Level.FINER, "Current native focused window " + getNativeFocusedWindow());
}
Container parent = (target instanceof Container) ? ((Container)target) : (target.getParent());
while (parent != null && !(parent instanceof Window)) {
parent = getParent_NoClientCode(parent);
}
if (parent != null) {
Window parentWindow = (Window)parent;
if (focusLog.isLoggable(Level.FINER)) {
focusLog.log(Level.FINER, "Parent window " + parentWindow);
}
if (!parentWindow.isFocused() && getNativeFocusedWindow() == parentWindow) {
return true;
} else if (getNativeFocusedWindow() != parentWindow) {
WindowPeer wpeer = (WindowPeer)parentWindow.getPeer();
boolean res = wpeer.requestWindowFocus();
if (focusLog.isLoggable(Level.FINER)) {
focusLog.log(Level.FINER, "Requested window focus: " + res);
}
if (!(res && parentWindow.isFocused())) {
focusLog.finer("Waiting for asynchronous processing of window focus request");
KeyboardFocusManagerPeerImpl.removeLastFocusRequest(target);
return false;
}
}
}
return _requestFocus(lightweightChild, temporary, focusedWindowChangeAllowed, time, cause);
}
}
native boolean _requestFocus
(Component lightweightChild, boolean temporary,
boolean focusedWindowChangeAllowed, long time, CausedFocusEvent.Cause cause);
static native Window getNativeFocusedWindow();
void postEvent(AWTEvent event) {
MToolkit.postEvent(MToolkit.targetToAppContext(target), event);
}
void handleExpose(int x, int y, int w, int h) {
if ( !ComponentAccessor.getIgnoreRepaint(target) ) {
postEvent(new PaintEvent(target, PaintEvent.PAINT,
new Rectangle(x, y, w, h)));
}
}
void handleRepaint(int x, int y, int w, int h) {
if ( !ComponentAccessor.getIgnoreRepaint(target) ) {
postEvent(new PaintEvent(target, PaintEvent.UPDATE,
new Rectangle(x, y, w, h)));
}
}
public int getZOrderPosition_NoClientCode() {
Container p = getParent_NoClientCode(target);
if (p != null) {
Component children[] = getComponents_NoClientCode(p);
int i;
int index = 0;
for (i = 0; i < children.length; i++) {
if (children[i] == target) {
return index;
} else {
Object cpeer = MToolkit.targetToPeer(children[i]);
if (cpeer != null &&
!(cpeer instanceof java.awt.peer.LightweightPeer)) {
index++;
}
}
}
}
return -1;
}
void draw3DOval(Graphics g, Color bg,
int x, int y, int w, int h, boolean raised) {
Color c = g.getColor();
Color shadow = bg.darker();
Color highlight = bg.brighter();
g.setColor(raised ? highlight : shadow);
g.drawArc(x, y, w, h, 45, 180);
g.setColor(raised ? shadow : highlight);
g.drawArc(x, y, w, h, 225, 180);
g.setColor(c);
}
void draw3DRect(Graphics g, Color bg,
int x, int y, int width, int height,
boolean raised) {
Color c = g.getColor();
Color shadow = bg.darker();
Color highlight = bg.brighter();
g.setColor(raised ? highlight : shadow);
g.drawLine(x, y, x, y + height);
g.drawLine(x + 1, y, x + width - 1, y);
g.setColor(raised ? shadow : highlight);
g.drawLine(x + 1, y + height, x + width, y + height);
g.drawLine(x + width, y, x + width, y + height - 1);
g.setColor(c);
}
void drawScrollbar(Graphics g, Color bg, int thickness, int length,
int min, int max, int val, int vis, boolean horizontal) {
Color c = g.getColor();
double f = (double)(length - 2*(thickness-1)) / Math.max(1, ((max - min) + vis));
int v1 = thickness + (int)(f * (val - min));
int v2 = (int)(f * vis);
int w2 = thickness-4;
int tpts_x[] = new int[3];
int tpts_y[] = new int[3];
if (length < 3*w2 ) {
v1 = v2 = 0;
if (length < 2*w2 + 2) {
w2 = (length-2)/2;
}
} else if (v2 < 7) {
v1 = Math.max(0, v1 - ((7 - v2)>>1));
v2 = 7;
}
int ctr = thickness/2;
int sbmin = ctr - w2/2;
int sbmax = ctr + w2/2;
{
Color d = new Color((int) (bg.getRed() * 0.85),
(int) (bg.getGreen() * 0.85),
(int) (bg.getBlue() * 0.85));
g.setColor(d);
if (horizontal) {
g.fillRect(0, 0, length, thickness);
} else {
g.fillRect(0, 0, thickness, length);
}
}
g.setColor(bg);
if (v1 > 0) {
if (horizontal) {
g.fillRect(v1, 3, v2, thickness-3);
} else {
g.fillRect(3, v1, thickness-3, v2);
}
}
tpts_x[0] = ctr; tpts_y[0] = 2;
tpts_x[1] = sbmin; tpts_y[1] = w2;
tpts_x[2] = sbmax; tpts_y[2] = w2;
if (horizontal) {
g.fillPolygon(tpts_y, tpts_x, 3);
} else {
g.fillPolygon(tpts_x, tpts_y, 3);
}
tpts_y[0] = length-2;
tpts_y[1] = length-w2;
tpts_y[2] = length-w2;
if (horizontal) {
g.fillPolygon(tpts_y, tpts_x, 3);
} else {
g.fillPolygon(tpts_x, tpts_y, 3);
}
Color highlight = bg.brighter();
g.setColor(highlight);
if (horizontal) {
g.drawLine(1, thickness, length - 1, thickness);
g.drawLine(length - 1, 1, length - 1, thickness);
g.drawLine(1, ctr, w2, sbmin);
g.drawLine(length - w2, sbmin, length - w2, sbmax);
g.drawLine(length - w2, sbmin, length - 2, ctr);
} else {
g.drawLine(thickness, 1, thickness, length - 1);
g.drawLine(1, length - 1, thickness, length - 1);
g.drawLine(ctr, 1, sbmin, w2);
g.drawLine(sbmin, length - w2, sbmax, length - w2);
g.drawLine(sbmin, length - w2, ctr, length - 2);
}
if (v1 > 0) {
if (horizontal) {
g.drawLine(v1, 2, v1 + v2, 2);
g.drawLine(v1, 2, v1, thickness-3);
} else {
g.drawLine(2, v1, 2, v1 + v2);
g.drawLine(2, v1, thickness-3, v1);
}
}
Color shadow = bg.darker();
g.setColor(shadow);
if (horizontal) {
g.drawLine(0, 0, 0, thickness);
g.drawLine(0, 0, length - 1, 0);
g.drawLine(w2, sbmin, w2, sbmax);
g.drawLine(w2, sbmax, 1, ctr);
g.drawLine(length-2, ctr, length-w2, sbmax);
} else {
g.drawLine(0, 0, thickness, 0);
g.drawLine(0, 0, 0, length - 1);
g.drawLine(sbmin, w2, sbmax, w2);
g.drawLine(sbmax, w2, ctr, 1);
g.drawLine(ctr, length-2, sbmax, length-w2);
}
if (v1 > 0) {
if (horizontal) {
g.drawLine(v1 + v2, 2, v1 + v2, thickness-2);
g.drawLine(v1, thickness-2, v1 + v2, thickness-2);
} else {
g.drawLine(2, v1 + v2, thickness-2, v1 + v2);
g.drawLine(thickness-2, v1, thickness-2, v1 + v2);
}
}
g.setColor(c);
}
public String toString() {
return getClass().getName() + "[" + target + "]";
}
public void setVisible(boolean b) {
if (b) {
Dimension s = target.getSize();
oldWidth = s.width;
oldHeight = s.height;
pShow();
} else {
pHide();
}
}
public void setEnabled(boolean b) {
if (b) {
pEnable();
} else {
pDisable();
}
}
public Point getLocationOnScreen() {
synchronized (target.getTreeLock()) {
Component comp = target;
while (comp != null && !(comp instanceof Window)) {
comp = getParent_NoClientCode(comp);
}
if (comp == null || comp instanceof sun.awt.EmbeddedFrame) {
return pGetLocationOnScreen();
}
MWindowPeer wpeer = (MWindowPeer)(MToolkit.targetToPeer(comp));
if (wpeer == null) {
return pGetLocationOnScreen();
}
return pGetLocationOnScreen2((Window)comp, wpeer);
}
}
public int serialNum = 0;
public boolean checkNativePaintOnSetBounds(int width, int height) {
return (width != oldWidth) || (height != oldHeight);
}
void setBounds(int x, int y, int width, int height) {
setBounds(x, y, width, height, SET_BOUNDS);
}
public void setBounds(int x, int y, int width, int height, int op) {
if (disposed) return;
Container parent = getParent_NoClientCode(target);
paintPending = false;
if (parent != null && parent instanceof ScrollPane) {
MScrollPanePeer speer = (MScrollPanePeer)parent.getPeer();
if (!speer.ignore) {
pReshape(x, y, width, height);
speer.childResized(width, height);
}
} else {
pReshape(x, y, width, height);
}
if ((width != oldWidth) || (height != oldHeight)) {
SurfaceData oldData = surfaceData;
if (oldData != null) {
surfaceData = graphicsConfig.createSurfaceData(this);
oldData.invalidate();
}
oldWidth = width;
oldHeight = height;
}
validateSurface(width, height);
serialNum++;
}
void validateSurface(int width, int height) {
SunToolkit.awtLock();
try {
if (!disposed && (width != oldWidth || height != oldHeight)) {
SurfaceData oldData = surfaceData;
if (oldData != null) {
surfaceData = graphicsConfig.createSurfaceData(this);
oldData.invalidate();
}
oldWidth = width;
oldHeight = height;
}
} finally {
SunToolkit.awtUnlock();
}
}
public void beginValidate() {
}
native void restoreFocus();
public void endValidate() {
restoreFocus();
}
public void beginLayout() {
isLayouting = true;
}
public void endLayout() {
if (!paintPending && !paintArea.isEmpty() &&
!((Component)target).getIgnoreRepaint()) {
postEvent(new PaintEvent((Component)target, PaintEvent.PAINT,
new Rectangle()));
}
isLayouting = false;
}
public void show() {
setVisible(true);
}
public void hide() {
setVisible(false);
}
public void enable() {
setEnabled(true);
}
public void disable() {
setEnabled(false);
}
public void reshape(int x, int y, int width, int height) {
setBounds(x, y, width, height);
}
public Dimension minimumSize() {
return getMinimumSize();
}
public Dimension preferredSize() {
return getPreferredSize();
}
public void addDropTarget(DropTarget dt) {
if (MToolkit.useMotifDnD()) {
addNativeDropTarget(dt);
} else {
Component comp = target;
while(!(comp == null || comp instanceof java.awt.Window)) {
comp = getParent_NoClientCode(comp);
}
if (comp instanceof Window) {
MWindowPeer wpeer = (MWindowPeer)(comp.getPeer());
if (wpeer != null) {
wpeer.addDropTarget();
}
}
}
}
public void removeDropTarget(DropTarget dt) {
if (MToolkit.useMotifDnD()) {
removeNativeDropTarget(dt);
} else {
Component comp = target;
while(!(comp == null || comp instanceof java.awt.Window)) {
comp = getParent_NoClientCode(comp);
}
if (comp instanceof Window) {
MWindowPeer wpeer = (MWindowPeer)(comp.getPeer());
if (wpeer != null) {
wpeer.removeDropTarget();
}
}
}
}
public void notifyTextComponentChange(boolean add){
Container parent = getParent_NoClientCode(target);
while(!(parent == null ||
parent instanceof java.awt.Frame ||
parent instanceof java.awt.Dialog)) {
parent = getParent_NoClientCode(parent);
}
if (parent instanceof java.awt.Frame ||
parent instanceof java.awt.Dialog) {
if (add)
((MInputMethodControl)parent.getPeer()).addTextComponent((MComponentPeer)this);
else
((MInputMethodControl)parent.getPeer()).removeTextComponent((MComponentPeer)this);
}
}
native void addNativeDropTarget(DropTarget dt);
native void removeNativeDropTarget(DropTarget dt);
public GraphicsConfiguration getGraphicsConfiguration() {
GraphicsConfiguration ret = graphicsConfig;
if (ret == null) {
ret = target.getGraphicsConfiguration();
}
return ret;
}
public boolean isPaintPending() {
return paintPending && isLayouting;
}
public boolean handlesWheelScrolling() {
return false;
}
private native long getWindow(long pData);
public long getContentWindow() {
return getWindow(pData);
}
public void createBuffers(int numBuffers, BufferCapabilities caps)
throws AWTException
{
backBufferCaps = caps;
backBuffer = graphicsConfig.createBackBuffer(this, numBuffers, caps);
xBackBuffer = graphicsConfig.createBackBufferImage(target,
backBuffer);
}
public BufferCapabilities getBackBufferCaps() {
return backBufferCaps;
}
public void flip(int x1, int y1, int x2, int y2,
BufferCapabilities.FlipContents flipAction)
{
if (backBuffer == 0) {
throw new IllegalStateException("Buffers have not been created");
}
graphicsConfig.flip(this, target, xBackBuffer,
x1, y1, x2, y2, flipAction);
}
public Image getBackBuffer() {
if (backBuffer == 0) {
throw new IllegalStateException("Buffers have not been created");
}
return xBackBuffer;
}
public void destroyBuffers() {
graphicsConfig.destroyBackBuffer(backBuffer);
backBuffer = 0;
xBackBuffer = null;
}
public boolean isReparentSupported() {
return false;
}
public void reparent(ContainerPeer newNativeParent) {
throw new UnsupportedOperationException();
}
public void applyShape(Region shape) {
}
}