ilog.views.maps.raster.datasource
Class IlvRasterStyle

java.lang.Object
  extended by ilog.views.maps.graphic.style.IlvMapStyle
      extended by ilog.views.maps.raster.datasource.IlvRasterStyle
All Implemented Interfaces:
IlvPersistentObject, IlvInheritable, StyleListener
Direct Known Subclasses:
IlvShadeableRasterStyle

public class IlvRasterStyle
extends IlvMapStyle
implements StyleListener

IlvRasterStyle represents a map style for raster data.

Since:
JViews 7.5

Field Summary
static String BRIGHTNESS
          The Brightness attribute name.
static String COLORMODEL
          The ColorModel attribute name.
static String CONTRAST
          The Contrast attribute name.
protected  IlvRasterAbstractReader reader
          A reader that is able to recreate the images.
static String SATURATION
          The Saturation attribute name.
 
Fields inherited from class ilog.views.maps.graphic.style.IlvMapStyle
ALPHA, ALWAYS_ON_TOP, ATTRIBUTE_INFO, CATEGORY, LABEL_ATTRIBUTE, LEGEND_GROUP, PARENT, THIN_CLIENT_BACKGROUND, VISIBLE_IN_3DVIEW, VISIBLE_IN_OVERVIEW, VISIBLE_IN_TREE, VISIBLE_IN_VIEW
 
Constructor Summary
IlvRasterStyle()
          The default constructor.
IlvRasterStyle(IlvInputStream stream)
          Constructs a style from saved data.
IlvRasterStyle(IlvRasterAbstractReader reader)
          Constructs a style for the specified reader.
IlvRasterStyle(IlvRasterStyle source)
          The copy constructor.
 
Method Summary
 IlvMapStyle copy()
          Returns a copy of this style.
 boolean equals(Object o)
          Indicates whether some other object is "equal to" this one.
 Double getBrightness()
          Returns the brightness to apply to the original images.
 ColorModel getColorModel()
          Returns the color model used by the images.
 Double getContrast()
          Returns the contrast to apply to the original images.
 Double getSaturation()
          Returns the saturation to apply to the original images.
 int hashCode()
          
 void setBrightness(Double v)
          Changes the color brightness.
 void setColorModel(ColorModel v)
          Changes the color model to use.
 void setContrast(Double v)
          Changes the color contrast.
 void setSaturation(Double v)
          Changes the color saturation.
 void styleChanged(StyleEvent event)
          Invoked when a change has occurred in the IlvMapStyle
 void updateReader(IlvRasterProperties props)
          Updates the color model to reflect the brightness, saturation and contrast of the style.
 void write(IlvOutputStream stream)
          Write a IlvMapStyle on a IlvOutputStream
 
Methods inherited from class ilog.views.maps.graphic.style.IlvMapStyle
addAttributeListener, addChild, addStyleListener, addWeakStyleListener, getAlpha, getAttribute, getAttribute, getAttributeFilter, getAttributeInfo, getAttributeListeners, getCategory, getChildren, getDefaultValues, getGraphic, getLabelAttribute, getLegendGroup, getListeners, getParent, getStyleListeners, isAlwaysOnTop, isInherited, isThinClientBackground, isVisibleIn3DView, isVisibleInOverview, isVisibleInTree, isVisibleInView, objectEquals, removeAttributeListener, removeChild, removeStyleListener, setAlpha, setAlwaysOnTop, setAttribute, setAttributeFilter, setAttributeInfo, setCategory, setGraphic, setInherited, setLabelAttribute, setLegendGroup, setParent, setThinClientBackground, setVisibleIn3DView, setVisibleInOverview, setVisibleInTree, setVisibleInView
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

BRIGHTNESS

public static final String BRIGHTNESS
The Brightness attribute name.

See Also:
Constant Field Values

COLORMODEL

public static final String COLORMODEL
The ColorModel attribute name.

See Also:
Constant Field Values

CONTRAST

public static final String CONTRAST
The Contrast attribute name.

See Also:
Constant Field Values

SATURATION

public static final String SATURATION
The Saturation attribute name.

See Also:
Constant Field Values

reader

protected IlvRasterAbstractReader reader
A reader that is able to recreate the images.

Constructor Detail

IlvRasterStyle

public IlvRasterStyle()
The default constructor.


IlvRasterStyle

public IlvRasterStyle(IlvRasterStyle source)
The copy constructor.

Parameters:
source - The source style to copy.

IlvRasterStyle

public IlvRasterStyle(IlvInputStream stream)
               throws IlvReadFileException
Constructs a style from saved data.

Parameters:
stream - The stream to read from.
Throws:
IlvReadFileException - if there is a problem reading from style.

IlvRasterStyle

public IlvRasterStyle(IlvRasterAbstractReader reader)
Constructs a style for the specified reader.

Parameters:
reader - An image reader.
Method Detail

copy

public IlvMapStyle copy()
Returns a copy of this style.

Overrides:
copy in class IlvMapStyle
Returns:
A new IlvRasterStyle instance.

write

public void write(IlvOutputStream stream)
           throws IOException
Write a IlvMapStyle on a IlvOutputStream

Specified by:
write in interface IlvPersistentObject
Overrides:
write in class IlvMapStyle
Parameters:
stream - The stream to write to.
Throws:
IOException - thrown when an exception occurs during the write operation for this object.
See Also:
IlvMapStyle.write(ilog.views.io.IlvOutputStream)

hashCode

public int hashCode()

Overrides:
hashCode in class IlvMapStyle

equals

public boolean equals(Object o)
Indicates whether some other object is "equal to" this one.

Overrides:
equals in class IlvMapStyle
See Also:
IlvMapStyle.equals(java.lang.Object)

getBrightness

public Double getBrightness()
Returns the brightness to apply to the original images. The value returned is in a range between 0 and 2.

Returns:
The brightness to apply to the original images.

getColorModel

public ColorModel getColorModel()
Returns the color model used by the images.

Returns:
The color model used by the images.

getContrast

public Double getContrast()
Returns the contrast to apply to the original images. The value returned is in a range between 0 and 2.

Returns:
The contrast to apply to the original images.

getSaturation

public Double getSaturation()
Returns the saturation to apply to the original images. The value returned is in a range between 0 and 2.

Returns:
The saturation to apply to the original images.

setBrightness

public void setBrightness(Double v)
Changes the color brightness.

Parameters:
v - The brightness to apply to the original images. This value must be in a range between 0 and 2.

setContrast

public void setContrast(Double v)
Changes the color contrast.

Parameters:
v - The contrast to apply to the original images. This value must be in a range between 0 and 2.

setColorModel

public void setColorModel(ColorModel v)
Changes the color model to use.

Parameters:
v - The new color model.

setSaturation

public void setSaturation(Double v)
Changes the color saturation.

Parameters:
v - The saturation to apply to the original images. This value must be in a range between 0 and 2.

styleChanged

public void styleChanged(StyleEvent event)
Invoked when a change has occurred in the IlvMapStyle

Specified by:
styleChanged in interface StyleListener
Parameters:
event - The event containing informations about the style change.
See Also:
StyleListener.styleChanged(ilog.views.maps.graphic.style.StyleEvent)

updateReader

public void updateReader(IlvRasterProperties props)
Updates the color model to reflect the brightness, saturation and contrast of the style. This method is usually called by IlvRasterIcon when it needs to update the image it contains.

Parameters:
props - The raster properties used.


Copyright © 1996-2007 ILOG S.A. All rights reserved.   Documentation homepage.   . All Rights Reserved.