public class PictureMarker extends AbstractTypeSymbolEditor implements java.awt.event.ActionListener
This functionality is carried out thanks to a tab (simple marker)which is included in the panel to edit the properities of a symbol (SymbolEditor)how is explained in AbstractTypeSymbolEditor.
First of all, in the above mentioned tab the user will have options to change the files from where the pictures for the symbol are taken (one for the symbol when it is not selected in the map and the other when it is done) .
Secondly, the user will have options to modify the pictures which had been selected before (width and offset) .
AbstractTypeSymbolEditor
Modifier and Type | Field and Description |
---|---|
protected ExpressionPickerController |
colorExpPicker |
protected ColorPickerController |
colorLinePicker |
protected static Logger |
LOGGER |
static double |
MARKER_IMAGE_DEFAULT_WIDTH |
protected ExpressionPickerController |
rotationExpPicker |
protected java.util.List<javax.swing.JPanel> |
tabs |
protected PictureMarkerView |
view |
protected ExpressionPickerController |
xoffsetExpPicker |
protected ExpressionPickerController |
yoffsetExpPicker |
featureStore, owner
Constructor and Description |
---|
PictureMarker(SymbolEditor owner) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
boolean |
canManageSymbol(ISymbol symbol) |
protected java.awt.Color |
getColorLine() |
EditorTool[] |
getEditorTools()
Returns the editor tools that are handled by this configuration panel.
|
ISymbol |
getLayer()
Produces and returns the ISymbol according with the user settings.
|
protected java.awt.Color |
getLineToOffsetColor() |
protected Expression |
getLineToOffsetColorExpression() |
java.lang.String |
getName()
Returns the name of the config tabs that will be shown in the selector combo box.
|
protected java.io.File |
getPictureFile() |
protected java.lang.String |
getPictureFileName() |
protected java.net.URL |
getPictureURL() |
protected double |
getRotation() |
protected Expression |
getRotationExpression() |
protected java.io.File |
getSelectedPictureFile() |
protected java.lang.String |
getSelectedPictureFileName() |
protected java.net.URL |
getSelectedPictureURL() |
protected double |
getSize() |
protected Expression |
getSizeExpression() |
javax.swing.JPanel[] |
getTabs()
Due to the complexity that many symbols settings can reach, the SymbolEditorPanel is
designed in a tabbed-based fashion.
|
protected double |
getX() |
protected Expression |
getXOffsetExpression() |
protected double |
getY() |
protected Expression |
getYOffsetExpression() |
protected void |
initComponents()
Initializes the parameters that define a picturmarker.To do it, a tab is
created inside the SymbolEditor panel with default values for the
different attributes of the picture marker.
|
protected boolean |
isSelectedDrawLineToOffset() |
void |
refreshControls(ISymbol layer)
Invoked when the user selects or adds a new layer.
|
protected void |
setColorLine(java.awt.Color color) |
void |
setFeatureStore(FeatureStore store) |
protected void |
setPicture(java.net.URL picture) |
protected void |
setRotation(double degrees) |
protected void |
setSelectedPicture(java.net.URL selectedPicture) |
protected void |
setSize(double d) |
protected void |
setValues(double size,
double rotation,
double xOffset,
double yOffset,
java.net.URL picture,
java.net.URL selectedPicture,
java.lang.String sizeExpression,
java.lang.String offsetXExpression,
java.lang.String offsetYExpression,
java.awt.Color lineToOffsetColor,
java.lang.String lineToOffsetColorExpression,
java.lang.String rotationExpression,
boolean isDrawLineToOffset) |
protected void |
setValues(double size,
double xOffset,
double yOffset,
java.net.URL picture,
java.net.URL selectedPicture,
java.lang.String sizeExpression,
java.lang.String offsetXExpression,
java.lang.String offsetYExpression,
java.awt.Color lineToOffsetColor,
java.lang.String lineToOffsetColorExpression,
java.lang.String rotationExpression,
boolean isDrawLineToOffset) |
protected void |
setX(double d) |
protected void |
setY(double d) |
fireSymbolChangedEvent, getSampleFeature, toString
protected static final Logger LOGGER
public static final double MARKER_IMAGE_DEFAULT_WIDTH
protected final PictureMarkerView view
protected java.util.List<javax.swing.JPanel> tabs
protected ColorPickerController colorLinePicker
protected ExpressionPickerController xoffsetExpPicker
protected ExpressionPickerController yoffsetExpPicker
protected ExpressionPickerController rotationExpPicker
protected ExpressionPickerController colorExpPicker
public PictureMarker(SymbolEditor owner)
protected void initComponents()
public ISymbol getLayer()
TypeSymbolEditor
getLayer
in interface TypeSymbolEditor
protected java.awt.Color getLineToOffsetColor()
protected boolean isSelectedDrawLineToOffset()
protected Expression getSizeExpression()
protected Expression getYOffsetExpression()
protected Expression getLineToOffsetColorExpression()
protected Expression getXOffsetExpression()
protected Expression getRotationExpression()
public java.lang.String getName()
TypeSymbolEditor
Returns the name of the config tabs that will be shown in the selector combo box.
This is typically a human-readable (and also translatable) name for the symbol that
this TypeEditorPanel deals with, but maybe you prefer to use any other one.
The order of the entries in the combo is alphabetically-based. So you can force a position by defining a name that suits your needs.
getName
in interface TypeSymbolEditor
public javax.swing.JPanel[] getTabs()
TypeSymbolEditor
Due to the complexity that many symbols settings can reach, the SymbolEditorPanel is
designed in a tabbed-based fashion. So, you can use as many of pages you want to put
your components. This pages are regular JPanels that will be automatically added to
the SymbolEditor dialog.
In case you need only one page, just return a JPanel array with a length of 1.
getTabs
in interface TypeSymbolEditor
public void refreshControls(ISymbol layer)
TypeSymbolEditor
refreshControls
in interface TypeSymbolEditor
protected void setValues(double size, double xOffset, double yOffset, java.net.URL picture, java.net.URL selectedPicture, java.lang.String sizeExpression, java.lang.String offsetXExpression, java.lang.String offsetYExpression, java.awt.Color lineToOffsetColor, java.lang.String lineToOffsetColorExpression, java.lang.String rotationExpression, boolean isDrawLineToOffset)
protected void setValues(double size, double rotation, double xOffset, double yOffset, java.net.URL picture, java.net.URL selectedPicture, java.lang.String sizeExpression, java.lang.String offsetXExpression, java.lang.String offsetYExpression, java.awt.Color lineToOffsetColor, java.lang.String lineToOffsetColorExpression, java.lang.String rotationExpression, boolean isDrawLineToOffset)
public EditorTool[] getEditorTools()
TypeSymbolEditor
getEditorTools
in interface TypeSymbolEditor
public void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public boolean canManageSymbol(ISymbol symbol)
canManageSymbol
in interface TypeSymbolEditor
protected java.lang.String getPictureFileName()
protected java.lang.String getSelectedPictureFileName()
protected java.net.URL getPictureURL()
protected java.net.URL getSelectedPictureURL()
protected java.io.File getPictureFile()
protected java.io.File getSelectedPictureFile()
protected double getSize()
protected double getRotation()
protected double getX()
protected double getY()
protected void setPicture(java.net.URL picture)
protected void setSelectedPicture(java.net.URL selectedPicture)
protected void setSize(double d)
protected void setRotation(double degrees)
protected void setX(double d)
protected void setY(double d)
protected java.awt.Color getColorLine()
protected void setColorLine(java.awt.Color color)
public void setFeatureStore(FeatureStore store)
setFeatureStore
in class AbstractTypeSymbolEditor