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 String |
PICTURE_FILL_SYMBOL_PERSISTENCE_DEFINITION_NAME |
FILL_SYMBOL_PERSISTENCE_DEFINITION_NAME
SYMBOL_PERSISTENCE_DEFINITION_NAME
SYMBOL_NAME
SELECTION_COLOR
PAPER, WORLD
Constructor and Description |
---|
PictureFillSymbol()
Constructor method
|
PictureFillSymbol(URL imageURL,
URL selImageURL)
Constructor method
|
Modifier and Type | Method and Description |
---|---|
Object |
clone()
Creates a copy of the object.
|
void |
draw(Graphics2D g,
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(Graphics2D g,
AffineTransform scaleInstance,
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
|
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
|
URL |
getSelectedSource()
Returns the URL of the image used when the polygon is selected
|
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(Graphics2D g,
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(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(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, setUnit
cloneForSelection, equals, getDescription, getID, getReferenceSystem, getUnit, isOneDotOrPixel, isShapeVisible, setDescription, setID, setIsShapeVisible, setReferenceSystem
finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getFillAlpha, getFillColor, getOnePointRgb, getOutline, hasFill, hasOutline, isSuitableFor, setFillColor, setHasFill, setHasOutline, setOutline
getColor, getDescription, getPixExtentPlus, isOneDotOrPixel, isShapeVisible, setColor, setDescription
getCartographicSize, getReferenceSystem, getUnit, setCartographicSize, setReferenceSystem, setUnit
public static final String PICTURE_FILL_SYMBOL_PERSISTENCE_DEFINITION_NAME
public PictureFillSymbol()
public PictureFillSymbol(URL imageURL, URL selImageURL) throws IOException
imageURL,
- URL of the normal imageselImageURL,
- URL of the image when it is selected in the mapIOException
public void setSelImage(URL selImageUrl) throws IOException
setSelImage
in interface IPictureFillSymbol
imageFile,
- FileIOException
public void setImage(URL imageUrl) throws IOException
setImage
in interface IPictureFillSymbol
imageFile
- IOException
public void drawInsideRectangle(Graphics2D g, AffineTransform scaleInstance, Rectangle r, PrintAttributes properties) throws SymbolDrawingException
ISymbol
drawInsideRectangle
in interface ISymbol
properties
- TODOSymbolDrawingException
- TODOpublic ISymbol getSymbolForSelection()
ISymbol
getSymbolForSelection
in interface ISymbol
public int getSymbolType()
ISymbol
getSymbolType
in interface ISymbol
public String getClassName()
public void print(Graphics2D g, AffineTransform at, Geometry geom, PrintAttributes properties)
print
in interface IPrintable
public IMarkerFillPropertiesStyle getMarkerFillProperties()
getMarkerFillProperties
in interface IPictureFillSymbol
public void setMarkerFillProperties(IMarkerFillPropertiesStyle prop)
setMarkerFillProperties
in interface IPictureFillSymbol
prop
- public double getAngle()
getAngle
in interface IPictureFillSymbol
public void setAngle(double angle)
setAngle
in interface IPictureFillSymbol
angle
- public double getXScale()
getXScale
in interface IPictureFillSymbol
public void setXScale(double xScale)
setXScale
in interface IPictureFillSymbol
xScale
- public double getYScale()
getYScale
in interface IPictureFillSymbol
public void setYScale(double yScale)
setYScale
in interface IPictureFillSymbol
yScale
- public URL getSource()
getSource
in interface IPictureFillSymbol
public URL getSelectedSource()
getSelectedSource
in interface IPictureFillSymbol
public double toCartographicSize(ViewPort viewPort, double dpi, Geometry geom)
CartographicSupport
toCartographicSize
in interface CartographicSupport
toCartographicSize
in class AbstractFillSymbol
public void draw(Graphics2D g, AffineTransform affineTransform, Geometry geom, Feature f, Cancellable cancel)
ISymbol
public Object clone() throws CloneNotSupportedException
Cloneable
clone
in class AbstractFillSymbol
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
Persistent
loadFromState
in interface Persistent
loadFromState
in class AbstractFillSymbol
PersistenceException
public void saveToState(PersistentState state) throws PersistenceException
Persistent
saveToState
in interface Persistent
saveToState
in class AbstractFillSymbol
PersistenceException
public IBackgroundFileStyle getBackgroundFileStyle()
IPictureFillSymbol
getBackgroundFileStyle
in interface IPictureFillSymbol
public IBackgroundFileStyle getSelectedBackgroundFileStyle()
IPictureFillSymbol
getSelectedBackgroundFileStyle
in interface IPictureFillSymbol