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

📄 palettefactory.html

📁 Geotools是一个开源的Java GIS工具包,可利用它来开发符合标准的地理信息系统。Geotools提供了OGC(Open Geospatial Consortium)规范的一个实现来作为他们的
💻 HTML
📖 第 1 页 / 共 3 页
字号:
<TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=2><FONT SIZE="+2"><B>Method Summary</B></FONT></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/image/io/PaletteFactory.html#getAvailableNames()">getAvailableNames</A></B>()</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the list of available palette names. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Color.html" title="class or interface in java.awt">Color</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/image/io/PaletteFactory.html#getColors(java.lang.String)">getColors</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Load colors from a definition file.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Color.html" title="class or interface in java.awt">Color</A>[]</CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/image/io/PaletteFactory.html#getColors(java.net.URL)">getColors</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/net/URL.html" title="class or interface in java.net">URL</A>&nbsp;url)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<B>Deprecated.</B>&nbsp;<I>This method should not be defined here since  is all             about name relative to a directory specified at construction time. If a user             wants the functionality provided by this method, he should consider creating             a new instance of .</I></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/image/RenderedImage.html" title="class or interface in java.awt.image">RenderedImage</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/image/io/PaletteFactory.html#getImage(java.lang.String, java.awt.Dimension)">getImage</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name,         <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/Dimension.html" title="class or interface in java.awt">Dimension</A>&nbsp;size)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns the specified color palette as an image of the specified size.</TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/image/IndexColorModel.html" title="class or interface in java.awt.image">IndexColorModel</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/image/io/PaletteFactory.html#getIndexColorModel(java.lang.String)">getIndexColorModel</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Load an index color model from a definition file. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>&nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/awt/image/IndexColorModel.html" title="class or interface in java.awt.image">IndexColorModel</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/image/io/PaletteFactory.html#getIndexColorModel(java.lang.String, int, int)">getIndexColorModel</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name,                   int&nbsp;lower,                   int&nbsp;upper)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Load an index color model from a definition file. </TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD ALIGN="right" VALIGN="top" WIDTH="1%"><FONT SIZE="-1"><CODE>protected &nbsp;<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A></CODE></FONT></TD><TD><CODE><B><A HREF="../../../../org/geotools/image/io/PaletteFactory.html#getResourceAsStream(java.lang.String)">getResourceAsStream</A></B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name)</CODE><BR>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Returns an input stream for reading the specified resource. </TD></TR></TABLE>&nbsp;<A NAME="methods_inherited_from_class_Object"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#EEEEFF" CLASS="TableSubHeadingColor"><TD><B>Methods inherited from class <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html" title="class or interface in java.lang">Object</A></B></TD></TR><TR BGCOLOR="white" CLASS="TableRowColor"><TD><CODE><A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#clone()" title="class or interface in java.lang">clone</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#equals(java.lang.Object)" title="class or interface in java.lang">equals</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#finalize()" title="class or interface in java.lang">finalize</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#getClass()" title="class or interface in java.lang">getClass</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#hashCode()" title="class or interface in java.lang">hashCode</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notify()" title="class or interface in java.lang">notify</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#notifyAll()" title="class or interface in java.lang">notifyAll</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#toString()" title="class or interface in java.lang">toString</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait()" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long)" title="class or interface in java.lang">wait</A>, <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html#wait(long, int)" title="class or interface in java.lang">wait</A></CODE></TD></TR></TABLE>&nbsp;<P><!-- ============ FIELD DETAIL =========== --><!-- ========= CONSTRUCTOR DETAIL ======== --><A NAME="constructor_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Constructor Detail</B></FONT></TD></TR></TABLE><A NAME="PaletteFactory(org.geotools.image.io.PaletteFactory, java.lang.ClassLoader, java.io.File, java.lang.String, java.nio.charset.Charset, java.util.Locale)"><!-- --></A><H3>PaletteFactory</H3><PRE>public <B>PaletteFactory</B>(<A HREF="../../../../org/geotools/image/io/PaletteFactory.html" title="class in org.geotools.image.io">PaletteFactory</A>&nbsp;parent,                      <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang">ClassLoader</A>&nbsp;loader,                      <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A>&nbsp;directory,                      <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;extension,                      <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/nio/charset/Charset.html" title="class or interface in java.nio.charset">Charset</A>&nbsp;charset,                      <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Locale.html" title="class or interface in java.util">Locale</A>&nbsp;locale)</PRE><DL><DD>Constructs a palette factory using an optional <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang">class loader</A> for loading palette definition files.<P><DT><B>Parameters:</B><DD><CODE>parent</CODE> - An optional parent factory, or  if there is none. The parent                  factory will be queried if a palette was not found in the current factory.<DD><CODE>loader</CODE> - An optional class loader to use for loading the palette definition files.                  If , loading will occurs from the system current working                  directory.<DD><CODE>directory</CODE> - The base directory for palette definition files. It may be a Java package                  if a  were specified. If , then  is                  assumed.<DD><CODE>extension</CODE> - File name extension, or  if there is no extension                  to add to filename. If non-null, this extension will be automatically                  appended to filename. It should starts with the  character.<DD><CODE>charset</CODE> - The charset to use for parsing files, or  for the default.<DD><CODE>locale</CODE> - The locale to use for parsing files. or  for the default.</DL><HR><A NAME="PaletteFactory(org.geotools.image.io.PaletteFactory, java.lang.Class, java.io.File, java.lang.String, java.nio.charset.Charset, java.util.Locale)"><!-- --></A><H3>PaletteFactory</H3><PRE>public <B>PaletteFactory</B>(<A HREF="../../../../org/geotools/image/io/PaletteFactory.html" title="class in org.geotools.image.io">PaletteFactory</A>&nbsp;parent,                      <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Class.html" title="class or interface in java.lang">Class</A>&nbsp;loader,                      <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/File.html" title="class or interface in java.io">File</A>&nbsp;directory,                      <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;extension,                      <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/nio/charset/Charset.html" title="class or interface in java.nio.charset">Charset</A>&nbsp;charset,                      <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/util/Locale.html" title="class or interface in java.util">Locale</A>&nbsp;locale)</PRE><DL><DD>Constructs a palette factory using an optional <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Class.html" title="class or interface in java.lang">class</A> for loading palette definition files. Using a <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Class.html" title="class or interface in java.lang">class</A> instead of a <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/ClassLoader.html" title="class or interface in java.lang">class loader</A> can avoid security issue on some platforms (some platforms do not allow to load resources from a  because it can load from the root package).<P><DT><B>Parameters:</B><DD><CODE>parent</CODE> - An optional parent factory, or  if there is none. The parent                  factory will be queried if a palette was not found in the current factory.<DD><CODE>loader</CODE> - An optional class to use for loading the palette definition files.                  If , loading will occurs from the system current working                  directory.<DD><CODE>directory</CODE> - The base directory for palette definition files. It may be a Java package                  if a  were specified. If , then  is                  assumed.<DD><CODE>extension</CODE> - File name extension, or  if there is no extension                  to add to filename. If non-null, this extension will be automatically                  appended to filename. It should starts with the  character.<DD><CODE>charset</CODE> - The charset to use for parsing files, or  for the default.<DD><CODE>locale</CODE> - The locale to use for parsing files. or  for the default.<DT><B>Since:</B></DT>  <DD>2.2</DD></DL><!-- ============ METHOD DETAIL ========== --><A NAME="method_detail"><!-- --></A><TABLE BORDER="1" WIDTH="100%" CELLPADDING="3" CELLSPACING="0" SUMMARY=""><TR BGCOLOR="#CCCCFF" CLASS="TableHeadingColor"><TD COLSPAN=1><FONT SIZE="+2"><B>Method Detail</B></FONT></TD></TR></TABLE><A NAME="getResourceAsStream(java.lang.String)"><!-- --></A><H3>getResourceAsStream</H3><PRE>protected <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/io/InputStream.html" title="class or interface in java.io">InputStream</A> <B>getResourceAsStream</B>(<A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>&nbsp;name)</PRE><DL><DD>Returns an input stream for reading the specified resource. The default implementation delegates to the <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/Class.html#getResourceAsStream(java.lang.String)" title="class or interface in java.lang"><CODE>Class</CODE></A> or <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/ClassLoader.html#getResourceAsStream(java.lang.String)" title="class or interface in java.lang"><CODE>ClassLoader</CODE></A> method of the same name, according the  argument value given to the constructor. Subclasses may override this method if a more elaborated mechanism is wanted for fetching resources. This is sometime required in the context of applications using particular class loaders.<P><DD><DL><DT><B>Parameters:</B><DD><CODE>name</CODE> - The name of the resource to load, constructed as  +              +  where <var>directory</var> and <var>extension</var> were             specified to the constructor, while  was given to the             <A HREF="../../../../org/geotools/image/io/PaletteFactory.html#getColors(java.lang.String)"><CODE>getColors</CODE></A> method.<DT><B>Returns:</B><DD>The input stream, or  if the resources was not found.<DT><B>Since:</B></DT>  <DD>2.3</DD></DL></DD></DL><HR><A NAME="getAvailableNames()"><!-- --></A><H3>getAvailableNames</H3><PRE>public <A HREF="http://java.sun.com/j2se/1.4/docs/api/java/lang/String.html" title="class or interface in java.lang">String</A>[] <B>getAvailableNames</B>()</PRE><DL><DD>Returns the list of available palette names. Any item in this list can be specified as argument to <A HREF="../../../../org/geotools/image/io/PaletteFactory.html#getColors(java.lang.String)"><CODE>getColors(String)</CODE></A> or <A HREF="../../../../org/geotools/image/io/PaletteFactory.html#getIndexColorModel(java.lang.String)"><CODE>getIndexColorModel(String)</CODE></A> methods.

⌨️ 快捷键说明

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