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

📄 abstractcanvas.html

📁 Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理信息系统。Geotools提供了OGC(Open Geospatial Consortium)规范的一个实现来作为他们的
💻 HTML
📖 第 1 页 / 共 5 页
字号:
<DD>Removes the given listener.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>removeCanvasListener</CODE> in interface <CODE>Canvas</CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="enableCanvasHandler(org.opengis.go.display.canvas.CanvasHandler)"><!-- --></A><H3>enableCanvasHandler</H3><PRE>public void <B>enableCanvasHandler</B>(CanvasHandler&nbsp;handler)</PRE><DL><DD>Enables the given , removing the current handler (if any).<P><DD><DL><DT><B>Specified by:</B><DD><CODE>enableCanvasHandler</CODE> in interface <CODE>Canvas</CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="removeCanvasHandler(org.opengis.go.display.canvas.CanvasHandler)"><!-- --></A><H3>removeCanvasHandler</H3><PRE>public void <B>removeCanvasHandler</B>(CanvasHandler&nbsp;handler)</PRE><DL><DD>Removes the given  from this .<P><DD><DL><DT><B>Specified by:</B><DD><CODE>removeCanvasHandler</CODE> in interface <CODE>Canvas</CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getActiveCanvasHandler()"><!-- --></A><H3>getActiveCanvasHandler</H3><PRE>public CanvasHandler <B>getActiveCanvasHandler</B>()</PRE><DL><DD>Returns the currently active  or  if no handler is active.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getActiveCanvasHandler</CODE> in interface <CODE>Canvas</CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getDisplayCoordinateReferenceSystem()"><!-- --></A><H3>getDisplayCoordinateReferenceSystem</H3><PRE>public final CoordinateReferenceSystem <B>getDisplayCoordinateReferenceSystem</B>()</PRE><DL><DD>Synonymous for <A HREF="../../../../org/geotools/display/canvas/AbstractCanvas.html#getDisplayCRS()"><CODE>getDisplayCRS()</CODE></A> provided for the <CODE>Canvas</CODE> contract.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getDisplayCoordinateReferenceSystem</CODE> in interface <CODE>Canvas</CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="getObjectiveCoordinateReferenceSystem()"><!-- --></A><H3>getObjectiveCoordinateReferenceSystem</H3><PRE>public final CoordinateReferenceSystem <B>getObjectiveCoordinateReferenceSystem</B>()</PRE><DL><DD>Synonymous for <A HREF="../../../../org/geotools/display/canvas/AbstractCanvas.html#getObjectiveCRS()"><CODE>getObjectiveCRS()</CODE></A> provided for the <CODE>Canvas</CODE> contract.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>getObjectiveCoordinateReferenceSystem</CODE> in interface <CODE>Canvas</CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="setObjectiveCoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem)"><!-- --></A><H3>setObjectiveCoordinateReferenceSystem</H3><PRE>public final void <B>setObjectiveCoordinateReferenceSystem</B>(CoordinateReferenceSystem&nbsp;crs)</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>Use <A HREF="../../../../org/geotools/display/canvas/AbstractCanvas.html#setObjectiveCRS(org.opengis.referencing.crs.CoordinateReferenceSystem)"><CODE>setObjectiveCRS(org.opengis.referencing.crs.CoordinateReferenceSystem)</CODE></A> instead. A coordinate transformation may fails,             but unfortunatly the method signature for this method can't declare a             <CODE>TransformException</CODE> for such case.</I><P><DD>Synonymous for <code><A HREF="../../../../org/geotools/display/canvas/AbstractCanvas.html#setObjectiveCRS(org.opengis.referencing.crs.CoordinateReferenceSystem)">setObjectiveCRS</A>(crs)</code> provided for the <CODE>Canvas</CODE> contract.<P><DD><DL><DT><B>Specified by:</B><DD><CODE>setObjectiveCoordinateReferenceSystem</CODE> in interface <CODE>Canvas</CODE></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="setObjectiveCoordinateReferenceSystem(org.opengis.referencing.crs.CoordinateReferenceSystem, org.opengis.referencing.operation.MathTransform, org.opengis.referencing.operation.MathTransform)"><!-- --></A><H3>setObjectiveCoordinateReferenceSystem</H3><PRE>public void <B>setObjectiveCoordinateReferenceSystem</B>(CoordinateReferenceSystem&nbsp;crs,                                                  MathTransform&nbsp;objectiveToDisplay,                                                  MathTransform&nbsp;displayToObjective)                                           throws IncompatibleOperationException</PRE><DL><DD><B>Deprecated.</B>&nbsp;<I>Use <A HREF="../../../../org/geotools/display/canvas/AbstractCanvas.html#setObjectiveCRS(org.opengis.referencing.crs.CoordinateReferenceSystem)"><CODE>setObjectiveCRS</CODE></A> followed by             <A HREF="../../../../org/geotools/display/canvas/AbstractCanvas.html#setObjectiveToDisplayTransform(org.opengis.referencing.operation.MathTransform)"><CODE>setObjectiveToDisplayTransform</CODE></A> instead.             The former is typically invoked only once, while the later is invoked everytime             the zoom changes.</I><P><DD>Sets the objective Coordinate Reference System for this .<P><DD><DL><DT><B>Specified by:</B><DD><CODE>setObjectiveCoordinateReferenceSystem</CODE> in interface <CODE>Canvas</CODE></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>crs</CODE> - the objective Coordinate Reference System<DD><CODE>objectiveToDisplay</CODE> - the trasformation that converts between this objective Coordinate         Reference System and the Canvas display Coordinate Reference System.<DD><CODE>displayToObjective</CODE> - the trasformation that converts between the Canvas display         Coordinate Reference System and this objective Coordinate Reference System.<DT><B>Throws:</B><DD><CODE>IncompatibleOperationException</CODE> - when the specified transformation does not apply to         either the objective or the display Coordinate Reference Systems.</DL></DD></DL><HR><A NAME="getObjectiveCRS()"><!-- --></A><H3>getObjectiveCRS</H3><PRE>public abstract CoordinateReferenceSystem <B>getObjectiveCRS</B>()</PRE><DL><DD>Returns the objective Coordinate Reference System (the projection of a georeferenced CRS) for this . This is the "real world" CRS used for displaying all graphics. Note that underlying data in graphic primitives don't need to be in terms of this CRS. Transformations will be applied on the fly as needed at rendering time.<P><DD><DL></DL></DD><DD><DL></DL></DD></DL><HR><A NAME="setObjectiveCRS(org.opengis.referencing.crs.CoordinateReferenceSystem)"><!-- --></A><H3>setObjectiveCRS</H3><PRE>public abstract void <B>setObjectiveCRS</B>(CoordinateReferenceSystem&nbsp;crs)                              throws TransformException</PRE><DL><DD>Sets the objective Coordinate Reference System for this .<P><DD><DL></DL></DD><DD><DL><DT><B>Parameters:</B><DD><CODE>crs</CODE> - The objective coordinate reference system.<DT><B>Throws:</B><DD><CODE>TransformException</CODE> - If the data can't be transformed.</DL></DD></DL><HR><A NAME="getDisplayCRS()"><!-- --></A><H3>getDisplayCRS</H3><PRE>public abstract DerivedCRS <B>getDisplayCRS</B>()</PRE><DL><DD>Returns the Coordinate Reference System associated with the display of this . Its coordinate system corresponds to the geometry of the display device. It is usually a cartesian one for video monitor, but may also be a spherical one for planetarium. <p> When rendering on a flat screen using <cite>Java2D</cite>, axis are oriented as in the <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Graphics2D.html" title="class or interface in java.awt">Java2D space</A>: coordinates are in "dots" (about 1/72 of inch), <var>x</var> values increasing right and <var>y</var> values increasing <strong>down</strong>. <p> In the Geotools implementation, the display CRS must be derived from the <A HREF="../../../../org/geotools/display/canvas/AbstractCanvas.html#getObjectiveCRS()">objective CRS</A>. The conversion from base is usually an <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/AffineTransform.html" title="class or interface in java.awt.geom">affine transform</A> with the scale terms proportional to the map <A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#getScale()">scale factor</A>. The <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/geom/AffineTransform.html#getScaleY()" title="class or interface in java.awt.geom">y scale value</A> is often negative because of the <var>y</var> axis oriented toward down.<P><DD><DL></DL></DD><DD><DL><DT><B>See Also:</B><DD><A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#setDisplayCRS(org.opengis.referencing.crs.DerivedCRS)"><CODE>ReferencedCanvas.setDisplayCRS(org.opengis.referencing.crs.DerivedCRS)</CODE></A></DL></DD></DL><HR><A NAME="getDeviceCRS()"><!-- --></A><H3>getDeviceCRS</H3><PRE>public DerivedCRS <B>getDeviceCRS</B>()</PRE><DL><DD>Returns the Coordinate Reference System associated with the device of this . The device CRS is related to the <A HREF="../../../../org/geotools/display/canvas/AbstractCanvas.html#getDisplayCRS()">display CRS</A> in a device dependent (but zoom independent) way. <p> When rendering on screen, device CRS and <A HREF="../../../../org/geotools/display/canvas/AbstractCanvas.html#getDisplayCRS()">display CRS</A> are usually identical. Those CRS differ more often during printing, in which case the <cite>display to device</cite> transform depends on the printer resolution. For example in the specific case of <cite>Java2D</cite>, the <A HREF="../../../../org/geotools/display/canvas/AbstractCanvas.html#getDisplayCRS()">display CRS</A> is defined in such a way that one display unit is approximatively equals to 1/72 of inch no matter what the printer resolution is. The display CRS is then what <cite>Java2D</cite> calls <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Graphics2D.html" title="class or interface in java.awt">user space</A>, and the <cite>display to device</cite> transform is the <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/GraphicsConfiguration.html#getDefaultTransform()" title="class or interface in java.awt">transform mapping display units do device units</A>. <p> The default implementation returns the <A HREF="../../../../org/geotools/display/canvas/AbstractCanvas.html#getDisplayCRS()">display CRS</A>, i.e. assumes that the <cite>display to device</cite> transform is the identity transform. Subclasses need to override this method if they can manage device-dependent transformations. In any cases, the device coordinate system must be the same one then the display coordinate system (not to be confused with coordinate <em>reference</em> system). <p> Most users will deal with the <A HREF="../../../../org/geotools/display/canvas/AbstractCanvas.html#getDisplayCRS()">display CRS</A> rather than this device CRS.<P><DD><DL></DL></DD><DD><DL><DT><B>See Also:</B><DD><A HREF="../../../../org/geotools/display/canvas/ReferencedCanvas.html#setDeviceCRS(org.opengis.referencing.crs.DerivedCRS)"><CODE>ReferencedCanvas.setDeviceCRS(org.opengis.referencing.crs.DerivedCRS)</CODE></A></DL></DD></DL><HR><A NAME="setObjective

⌨️ 快捷键说明

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