/** * Adds the specified <code>region</code> to the top of this KML traversal context's Region stack. The specified * region is returned by any subsequent calls to <code>peekRegion</code> until either <code>pushRegion</code> or * <code>popRegion</code> are called. The <code>region</code> is removed from the stack by calling * <code>popRegion</code>. * * @param region the KML Region to add to the top of the stack. * * @throws ArgumentException if <code>region</code> is <code>null</code>. */ public void pushRegion(KMLRegion region) { if (region == null) { String message = Logging.getMessage("nullValue.RegionIsNull"); Logging.logger().severe(message); throw new ArgumentException(message); } this.regionStack.push(region); }
protected bool isFeatureActive(KMLTraversalContext tc, DrawContext dc) { if (this.getVisibility() != null && !this.getVisibility()) { return(false); } KMLRegion region = this.getRegion(); if (region == null) { region = tc.peekRegion(); } return(region == null || region.isActive(tc, dc)); }