Class TLcdGXYViewGIFEncoder
java.lang.Object
com.luciad.wms.server.viewencoder.TLcdGXYViewGIFEncoder
- All Implemented Interfaces:
ILcdGXYViewEncoder
,ILcdWMSFeatureInfoRequestEncoder
@LcdService(service=ILcdGXYViewEncoder.class,
priority=20000)
public class TLcdGXYViewGIFEncoder
extends Object
implements ILcdGXYViewEncoder, ILcdWMSFeatureInfoRequestEncoder
This class implements
ILcdGXYViewEncoder
and ILcdWMSFeatureInfoRequestEncoder
.
This encoder encodes an ILcdGXYView
to a GIF image. The maximum number of
colors for GIF images is 256. When there are more colors in the image to be encoded, the number
of colors is automatically reduced before the GIF is generated. The encoding process and
color reduction step is done with the ImageIO library.- See Also:
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
encode
(ILcdGXYLayerSubsetList aSelectionSublist, OutputStream aOutputStream, ILcdGXYView aGXYView) Encodes theILcdGXYView
to a GIF and writes in to the givenOutputStrean
.void
encodeGXYView
(ILcdGXYView aGXYView, OutputStream aOutputStream) Encodes the givenILcdGXYView
as a GIF and sends it to the outputStream.Returns the content MIME type of the encoder.static void
setClassTraceOn
(boolean aClassTraceOn) Deprecated.This method has been deprecated.
-
Constructor Details
-
TLcdGXYViewGIFEncoder
public TLcdGXYViewGIFEncoder()
-
-
Method Details
-
setClassTraceOn
public static void setClassTraceOn(boolean aClassTraceOn) Deprecated.This method has been deprecated. It is recommended to use the standard Java logging framework directly.Enables tracing for all instances of this class. If the argument istrue
then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.- Parameters:
aClassTraceOn
- if true then all log messages are recorded, otherwise only the informative, warning and error messages are recorded.
-
encodeGXYView
Encodes the givenILcdGXYView
as a GIF and sends it to the outputStream.- Specified by:
encodeGXYView
in interfaceILcdGXYViewEncoder
- Parameters:
aGXYView
- the view to decide.aOutputStream
- the outputstream to send the result to.- Throws:
IOException
- for I/O errors.- See Also:
-
getContentType
Description copied from interface:ILcdGXYViewEncoder
Returns the content MIME type of the encoder.- Specified by:
getContentType
in interfaceILcdGXYViewEncoder
- Specified by:
getContentType
in interfaceILcdWMSFeatureInfoRequestEncoder
- Returns:
- the MIME-type as
String
.
-
encode
public void encode(ILcdGXYLayerSubsetList aSelectionSublist, OutputStream aOutputStream, ILcdGXYView aGXYView) throws jakarta.servlet.ServletException Encodes theILcdGXYView
to a GIF and writes in to the givenOutputStrean
. The elements of the givenTLcdGXYLayerSubsetList
are painted in theILcdGXYView
in the selection color.- Specified by:
encode
in interfaceILcdWMSFeatureInfoRequestEncoder
- Parameters:
aSelectionSublist
- aTLcdGXYLayerSubsetList
containing the selection to be encoded.aOutputStream
- theOutputStream
to write the output to.aGXYView
- theILcdGXYView
in which the elements are selected .- Throws:
jakarta.servlet.ServletException
- for writing and sending exceptions.- See Also:
-