⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 referencedcanvas2d.html

📁 Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理信息系统。Geotools提供了OGC(Open Geospatial Consortium)规范的一个实现来作为他们的
💻 HTML
📖 第 1 页 / 共 5 页
字号:
 If the specified CRS has more than two dimensions, then it must be a compound CRS with a two dimensional head.<P><DD><DL><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#setObjectiveCRS(org.opengis.referencing.crs.CoordinateReferenceSystem)">setObjectiveCRS</A></CODE> in class <CODE><A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html" title="class in org.geotools.display.canvas">ReferencedCanvas</A></CODE></DL></DD><DD><DL><DT><B>Throws:</B><DD><CODE>TransformException</CODE></DL></DD></DL><HR><A NAME="getEnvelope2D()"><!-- --></A><H3>getEnvelope2D</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/Rectangle2D.html" title="class or interface in java.awt.geom">Rectangle2D</A> <B>getEnvelope2D</B>()</PRE><DL><DD>Returns a rectangle that completly encloses all <A HREF="../../../../org/geotools/display/canvas/ReferencedGraphic.html#getEnvelope()">graphic envelopes</A> managed by this canvas. Note that there is no guarantee that the returned rectangle is the smallest bounding box that encloses the canvas, only that the canvas lies entirely within the indicated rectangle. <p> This envelope is different from <A HREF="../../../../org/geotools/display/canvas/map/DefaultMapState.html#getEnvelope()"><CODE>DefaultMapState.getEnvelope()</CODE></A>, since the later returns an envelope that encloses only the <em>visible</em> canvas area and is scale-dependent. This  method is scale-independent. Both envelopes are equal if the <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#getScale()">scale</A> is choosen in such a way that all graphics can fit in the <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas2D.html#getDisplayBounds()">canvas visible area</A>.<P><DD><DL><DT><B>Returns:</B><DD>The envelope for this canvas in terms of <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#getObjectiveCRS()">objective CRS</A>.<DT><B>See Also:</B><DD><A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#getEnvelope()"><CODE>ReferencedCanvas.getEnvelope()</CODE></A>, <A HREF="../../../../org/geotools/display/canvas/map/DefaultMapState.html#getEnvelope()"><CODE>DefaultMapState.getEnvelope()</CODE></A></DL></DD></DL><HR><A NAME="getDisplayBounds()"><!-- --></A><H3>getDisplayBounds</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Shape.html" title="class or interface in java.awt">Shape</A> <B>getDisplayBounds</B>()</PRE><DL><DD>Returns the display bounds in terms of <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#getDisplayCRS()">display CRS</A>. The display shape doesn't need to be <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Rectangle.html" title="class or interface in java.awt">rectangular</A>. The display bounds is often <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Component.html#getBounds()" title="class or interface in java.awt"><CODE>Component.getBounds()</CODE></A>. <p> If the display bounds is unknown, then this method returns a shape with infinite extends. This method should never returns .<P><DD><DL></DL></DD></DL><HR><A NAME="setDisplayBounds(java.awt.Shape)"><!-- --></A><H3>setDisplayBounds</H3><PRE>public void <B>setDisplayBounds</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Shape.html" title="class or interface in java.awt">Shape</A>&nbsp;bounds)</PRE><DL><DD>Sets the display bounds in terms of <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#getDisplayCRS()">display CRS</A>. The display shape is usually <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Rectangle.html" title="class or interface in java.awt">rectangular</A>, but this is not mandatory. <p> The display bounds could be the <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#getEnvelope()">envelope</A> of all graphics <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas2D.html#objectiveToDisplay">transformed</A> from objective to display CRS, in which case it would be zoom-dependent. But more often, this is rather the <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Component.html#getBounds()" title="class or interface in java.awt">widget bounds</A>, which is zoom-independent (instead, the content displayed in the widget changes). In the later case,  is usually not invoked after <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#setDisplayCRS(org.opengis.referencing.crs.DerivedCRS)"><CODE>ReferencedCanvas.setDisplayCRS(org.opengis.referencing.crs.DerivedCRS)</CODE></A>. <p> This method fires a {@value} property change event.<P><DD><DL></DL></DD></DL><HR><A NAME="objectiveToDisplay(java.awt.geom.Rectangle2D)"><!-- --></A><H3>objectiveToDisplay</H3><PRE>protected final <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Rectangle.html" title="class or interface in java.awt">Rectangle</A> <B>objectiveToDisplay</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/Rectangle2D.html" title="class or interface in java.awt.geom">Rectangle2D</A>&nbsp;bounds)</PRE><DL><DD>Transforms the specified rectangle from the <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#getObjectiveCRS()">objective CRS</A> to the <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#getDisplayCRS()">display CRS</A> used by <cite>Java2D</cite>. The transformation used is the <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas2D.html#objectiveToDisplay"><CODE>objectiveToDisplay</CODE></A> affine transform, which is usually the transform used the last time that the <A HREF="../../../../org/geotools/display/canvas/BufferedCanvas2D.html#paint(java.awt.Graphics2D, java.awt.geom.AffineTransform)"><CODE>BufferedCanvas2D.paint(java.awt.Graphics2D, java.awt.geom.AffineTransform)</CODE></A> method was invoked.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>bounds</CODE> - The rectangle in terms of <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#getObjectiveCRS()">objective CRS</A>.<DT><B>Returns:</B><DD>The rectangle in terms of <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#getDisplayCRS()">display CRS</A>.</DL></DD></DL><HR><A NAME="repaint(org.opengis.go.display.primitive.Graphic, java.awt.geom.Rectangle2D, java.awt.Rectangle)"><!-- --></A><H3>repaint</H3><PRE>public abstract void <B>repaint</B>(Graphic&nbsp;graphic,                             <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/Rectangle2D.html" title="class or interface in java.awt.geom">Rectangle2D</A>&nbsp;objectiveArea,                             <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Rectangle.html" title="class or interface in java.awt">Rectangle</A>&nbsp;displayArea)</PRE><DL><DD>Advises that at least a portion of this canvas need to be repainted. This canvas will not be repainted immediately, but at some later time depending on the widget implementation. This  method can be invoked from any thread; it doesn't need to be the <cite>Swing</cite> thread. <p> Usually only one of  and  arguments is provided. If both arguments are non-null, then this method repaint the <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Rectangle.html#add(int, int)" title="class or interface in java.awt">union</A> of those rectangles in display coordinates. <p> This method is invoked by <A HREF="../../../../org/geotools/display/canvas/ReferencedGraphic2D.html#refresh()"><CODE>ReferencedGraphic2D.refresh()</CODE></A> and usually don't need to be invoked directly.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>graphic</CODE> - The graphic to repaint, or  if unknown.<DD><CODE>objectiveArea</CODE> - The dirty region to repaint in terms of        <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#getObjectiveCRS()">objective CRS</A>, or .<DD><CODE>displayArea</CODE> - The dirty region to repaint in terms of        <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#getDisplayCRS()">display CRS</A>, or .</DL></DD></DL><HR><A NAME="paintStarted(java.awt.Shape)"><!-- --></A><H3>paintStarted</H3><PRE>protected void <B>paintStarted</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Shape.html" title="class or interface in java.awt">Shape</A>&nbsp;dirtyArea)</PRE><DL><DD>Invoked when this canvas is about to be painted. Subclasses should invokes this method at the begining of their  method.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>dirtyArea</CODE> - The area which is about the be painted, in terms of        <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#getDisplayCRS()">display CRS</A>.</DL></DD></DL><HR><A NAME="paintFinished(boolean)"><!-- --></A><H3>paintFinished</H3><PRE>protected void <B>paintFinished</B>(boolean&nbsp;success)</PRE><DL><DD>Invoked when this canvas painting finished, either successfully or after a failure. Subclasses should invokes this method at the end of their  method, typically in a  block.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>success</CODE> -  if the rendering has been successful, or         if a failure occured.</DL></DD></DL><HR><A NAME="isVisible(org.opengis.spatialschema.geometry.DirectPosition)"><!-- --></A><H3>isVisible</H3><PRE>public boolean <B>isVisible</B>(DirectPosition&nbsp;coordinate)</PRE><DL><DD>Returns  if the given coordinate is visible on this . The default implementation checks if the coordinate (transformed in terms of <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#getDisplayCRS()">display CRS</A>) is inside the <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas2D.html#getDisplayBounds()">display bounds</A>.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>isVisible</CODE> in interface <CODE>Canvas</CODE><DT><B>Overrides:</B><DD><CODE><A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#isVisible(org.opengis.spatialschema.geometry.DirectPosition)">isVisible</A></CODE> in class <CODE><A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html" title="class in org.geotools.display.canvas">ReferencedCanvas</A></CODE></DL></DD><DD><DL></DL></DD></DL><HR>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -