+
+ }
+
+ private void maintainRenderingContext() {
+ int panelWidth = getWidth();
+ int panelHeight = getHeight();
+
+ if (panelWidth <= 0 || panelHeight <=0){
+ renderingContext = null;
+ return;
+ }
+
+ if ((renderingContext == null)
+ || (renderingContext.width != panelWidth)
+ || (renderingContext.height != panelHeight)) {
+ renderingContext = new RenderingContext(panelWidth, panelHeight);
+ }
+
+ renderingContext.mouseEvent = null;
+ renderingContext.objectUnderMouse = null;