public class PictureFillSymbol extends AbstractFillSymbol implements IPictureFillSymbol
| Modifier and Type | Class and Description |
|---|---|
static class |
PictureFillSymbol.RegisterPersistence |
static class |
PictureFillSymbol.RegisterSymbol |
| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
PICTURE_FILL_SYMBOL_PERSISTENCE_DEFINITION_NAME |
FILL_SYMBOL_PERSISTENCE_DEFINITION_NAMESYMBOL_PERSISTENCE_DEFINITION_NAMESYMBOL_NAMESELECTION_COLORPAPER, WORLD| Constructor and Description |
|---|
PictureFillSymbol()
Constructor method
|
PictureFillSymbol(java.net.URL imageURL,
java.net.URL selImageURL)
Constructor method
|
| Modifier and Type | Method and Description |
|---|---|
java.lang.Object |
clone()
Creates a copy of the object.
|
void |
draw(java.awt.Graphics2D g,
java.awt.geom.AffineTransform affineTransform,
Geometry geom,
Feature f,
Cancellable cancel)
Used when a symbol is going to be drawn.The method to do
it will depend on the derived version of the symbol.
|
void |
drawInsideRectangle(java.awt.Graphics2D g,
java.awt.geom.AffineTransform scaleInstance,
java.awt.Rectangle r,
PrintAttributes properties)
Useful to render the symbol inside the TOC, or inside little
rectangles.
|
double |
getAngle()
Defines the angle for the rotation of the image when it is added to create the
padding
|
IBackgroundFileStyle |
getBackgroundFileStyle()
Returns the style associated to the image used in this symbol
|
java.lang.String |
getClassName() |
IMarkerFillPropertiesStyle |
getMarkerFillProperties()
Returns the IMarkerFillProperties that allows this class to treat the picture as
a marker in order to scale it, rotate it and so on.
|
IBackgroundFileStyle |
getSelectedBackgroundFileStyle()
Returns the style associated to the image used in this symbol
when the feature is selected
|
java.net.URL |
getSelectedSource()
Returns the URL of the image used when the polygon is selected
|
java.net.URL |
getSource()
Returns the URL of the image that is used to create the padding to fill the
polygon
|
ISymbol |
getSymbolForSelection()
Returns the derived version of the symbol that will be used to draw the
feature when it is selected.
|
int |
getSymbolType()
The use of this method -and its mechanism- is being valorated.
|
double |
getXScale()
Defines the scale for the x axis of the image when it is added to create the
padding
|
double |
getYScale()
Defines the scale for the y axis of the image when it is added to create the
padding
|
void |
loadFromState(PersistentState state)
Set the state of the object from the state passed as parameter.
|
void |
print(java.awt.Graphics2D g,
java.awt.geom.AffineTransform at,
Geometry geom,
PrintAttributes properties) |
void |
saveToState(PersistentState state)
Saves the internal state of the object on the provided
PersistentState object.
|
void |
setAngle(double angle)
Sets the angle for the rotation of the image when it is added to create the padding
|
void |
setImage(java.net.URL imageUrl)
Defines the URL from where the picture to fill the polygon is taken.
|
void |
setMarkerFillProperties(IMarkerFillPropertiesStyle prop)
Sets the MarkerFillProperties in order to allow the user to modify the picture as
a marker (it is possible to scale it, rotate it and so on)
|
void |
setSelImage(java.net.URL selImageUrl)
Sets the URL for the image to be used as a picture fill symbol (when it is selected in the map)
|
void |
setXScale(double xScale)
Returns the scale for the x axis of the image when it is added to create the
padding
|
void |
setYScale(double yScale)
Returns the scale for the y axis of the image when it is added to create the
padding
|
double |
toCartographicSize(ViewPort viewPort,
double dpi,
Geometry geom)
Computes and sets the size (in pixels) of the cartographic element according
to the current rendering context (output dpi, map scale, map units) and the
symbol cartgraphic settings (unit, size, and unit reference system).
|
getCartographicSize, getColor, getFillAlpha, getFillColor, getOnePointRgb, getOutline, getPixExtentPlus, hasFill, hasOutline, isSuitableFor, setCartographicSize, setColor, setFillColor, setHasFill, setHasOutline, setOutline, setUnitcloneForSelection, equals, getDescription, getID, getReferenceSystem, getUnit, isOneDotOrPixel, isShapeVisible, setDescription, setID, setIsShapeVisible, setReferenceSystemfinalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFillAlpha, getFillColor, getOnePointRgb, getOutline, hasFill, hasOutline, isSuitableFor, setFillColor, setHasFill, setHasOutline, setOutlinegetColor, getDescription, getPixExtentPlus, isOneDotOrPixel, isShapeVisible, setColor, setDescriptiongetCartographicSize, getReferenceSystem, getUnit, setCartographicSize, setReferenceSystem, setUnitpublic static final java.lang.String PICTURE_FILL_SYMBOL_PERSISTENCE_DEFINITION_NAME
public PictureFillSymbol()
public PictureFillSymbol(java.net.URL imageURL,
java.net.URL selImageURL)
throws java.io.IOException
imageURL, - URL of the normal imageselImageURL, - URL of the image when it is selected in the mapjava.io.IOExceptionpublic void setSelImage(java.net.URL selImageUrl)
throws java.io.IOException
setSelImage in interface IPictureFillSymbolimageFile, - Filejava.io.IOExceptionpublic void setImage(java.net.URL imageUrl)
throws java.io.IOException
setImage in interface IPictureFillSymbolimageFile - java.io.IOExceptionpublic void drawInsideRectangle(java.awt.Graphics2D g,
java.awt.geom.AffineTransform scaleInstance,
java.awt.Rectangle r,
PrintAttributes properties)
throws SymbolDrawingException
ISymboldrawInsideRectangle in interface ISymbolproperties - TODOSymbolDrawingException - TODOpublic ISymbol getSymbolForSelection()
ISymbolgetSymbolForSelection in interface ISymbolpublic int getSymbolType()
ISymbolgetSymbolType in interface ISymbolpublic java.lang.String getClassName()
public void print(java.awt.Graphics2D g,
java.awt.geom.AffineTransform at,
Geometry geom,
PrintAttributes properties)
print in interface IPrintablepublic IMarkerFillPropertiesStyle getMarkerFillProperties()
getMarkerFillProperties in interface IPictureFillSymbolpublic void setMarkerFillProperties(IMarkerFillPropertiesStyle prop)
setMarkerFillProperties in interface IPictureFillSymbolprop - public double getAngle()
getAngle in interface IPictureFillSymbolpublic void setAngle(double angle)
setAngle in interface IPictureFillSymbolangle - public double getXScale()
getXScale in interface IPictureFillSymbolpublic void setXScale(double xScale)
setXScale in interface IPictureFillSymbolxScale - public double getYScale()
getYScale in interface IPictureFillSymbolpublic void setYScale(double yScale)
setYScale in interface IPictureFillSymbolyScale - public java.net.URL getSource()
getSource in interface IPictureFillSymbolpublic java.net.URL getSelectedSource()
getSelectedSource in interface IPictureFillSymbolpublic double toCartographicSize(ViewPort viewPort, double dpi, Geometry geom)
CartographicSupporttoCartographicSize in interface CartographicSupporttoCartographicSize in class AbstractFillSymbolpublic void draw(java.awt.Graphics2D g,
java.awt.geom.AffineTransform affineTransform,
Geometry geom,
Feature f,
Cancellable cancel)
ISymbolpublic java.lang.Object clone()
throws java.lang.CloneNotSupportedException
Cloneableclone in class AbstractFillSymboljava.lang.CloneNotSupportedException - if the instance of the object cannot
be cloned. As this is extending Cloneable so
its sure it implements it, so this exception may be used for problems
on specific object instances.Object#clone()}.public void loadFromState(PersistentState state) throws PersistenceException
PersistentloadFromState in interface PersistentloadFromState in class AbstractFillSymbolPersistenceExceptionpublic void saveToState(PersistentState state) throws PersistenceException
PersistentsaveToState in interface PersistentsaveToState in class AbstractFillSymbolPersistenceExceptionpublic IBackgroundFileStyle getBackgroundFileStyle()
IPictureFillSymbolgetBackgroundFileStyle in interface IPictureFillSymbolpublic IBackgroundFileStyle getSelectedBackgroundFileStyle()
IPictureFillSymbolgetSelectedBackgroundFileStyle in interface IPictureFillSymbol