Class PictureMarker
- All Implemented Interfaces:
ActionListener,EventListener,TypeSymbolEditor
- Direct Known Subclasses:
PictureLine
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) .
- Author:
- gvSIG Team
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.gvsig.expressionevaluator.swing.ExpressionPickerControllerprotected org.gvsig.tools.swing.api.pickercontroller.ColorPickerControllerprotected static final org.slf4j.Loggerstatic final doubleprotected org.gvsig.expressionevaluator.swing.ExpressionPickerControllerprotected final PictureMarkerViewprotected org.gvsig.expressionevaluator.swing.ExpressionPickerControllerprotected org.gvsig.expressionevaluator.swing.ExpressionPickerControllerFields inherited from class org.gvsig.app.gui.styling.AbstractTypeSymbolEditor
featureStore, owner -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidbooleancanManageSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbol) protected ColorReturns the editor tools that are handled by this configuration panel.org.gvsig.fmap.mapcontext.rendering.symbols.ISymbolgetLayer()Produces and returns the ISymbol according with the user settings.protected Colorprotected org.gvsig.expressionevaluator.ExpressiongetName()Returns the name of the config tabs that will be shown in the selector combo box.protected Fileprotected Stringprotected URLprotected doubleprotected org.gvsig.expressionevaluator.Expressionprotected Fileprotected Stringprotected URLprotected doublegetSize()protected org.gvsig.expressionevaluator.ExpressionJPanel[]getTabs()Due to the complexity that many symbols settings can reach, the SymbolEditorPanel is designed in a tabbed-based fashion.protected doublegetX()protected org.gvsig.expressionevaluator.Expressionprotected doublegetY()protected org.gvsig.expressionevaluator.Expressionprotected voidInitializes 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 booleanvoidrefreshControls(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol layer) Invoked when the user selects or adds a new layer.protected voidsetColorLine(Color color) voidsetFeatureStore(org.gvsig.fmap.dal.feature.FeatureStore store) protected voidsetPicture(URL picture) protected voidsetRotation(double degrees) protected voidsetSelectedPicture(URL selectedPicture) protected voidsetSize(double d) protected voidsetValues(double size, double rotation, double xOffset, double yOffset, URL picture, URL selectedPicture, String sizeExpression, String offsetXExpression, String offsetYExpression, Color lineToOffsetColor, String lineToOffsetColorExpression, String rotationExpression, boolean isDrawLineToOffset) protected voidsetValues(double size, double xOffset, double yOffset, URL picture, URL selectedPicture, String sizeExpression, String offsetXExpression, String offsetYExpression, Color lineToOffsetColor, String lineToOffsetColorExpression, String rotationExpression, boolean isDrawLineToOffset) protected voidsetX(double d) protected voidsetY(double d) Methods inherited from class org.gvsig.app.gui.styling.AbstractTypeSymbolEditor
fireSymbolChangedEvent, getSampleFeature, toString
-
Field Details
-
LOGGER
protected static final org.slf4j.Logger LOGGER -
MARKER_IMAGE_DEFAULT_WIDTH
public static final double MARKER_IMAGE_DEFAULT_WIDTH- See Also:
-
view
-
tabs
-
colorLinePicker
protected org.gvsig.tools.swing.api.pickercontroller.ColorPickerController colorLinePicker -
xoffsetExpPicker
protected org.gvsig.expressionevaluator.swing.ExpressionPickerController xoffsetExpPicker -
yoffsetExpPicker
protected org.gvsig.expressionevaluator.swing.ExpressionPickerController yoffsetExpPicker -
rotationExpPicker
protected org.gvsig.expressionevaluator.swing.ExpressionPickerController rotationExpPicker -
colorExpPicker
protected org.gvsig.expressionevaluator.swing.ExpressionPickerController colorExpPicker
-
-
Constructor Details
-
PictureMarker
-
-
Method Details
-
initComponents
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. -
getLayer
public org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol getLayer()Description copied from interface:TypeSymbolEditorProduces and returns the ISymbol according with the user settings.- Specified by:
getLayerin interfaceTypeSymbolEditor- Returns:
- the ISymbol.
-
getLineToOffsetColor
-
isSelectedDrawLineToOffset
protected boolean isSelectedDrawLineToOffset() -
getSizeExpression
protected org.gvsig.expressionevaluator.Expression getSizeExpression() -
getYOffsetExpression
protected org.gvsig.expressionevaluator.Expression getYOffsetExpression() -
getLineToOffsetColorExpression
protected org.gvsig.expressionevaluator.Expression getLineToOffsetColorExpression() -
getXOffsetExpression
protected org.gvsig.expressionevaluator.Expression getXOffsetExpression() -
getRotationExpression
protected org.gvsig.expressionevaluator.Expression getRotationExpression() -
getName
Description copied from interface:TypeSymbolEditorReturns 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.
- Specified by:
getNamein interfaceTypeSymbolEditor- Returns:
- A human-readable text naming this panel
-
getTabs
Description copied from interface:TypeSymbolEditorDue 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.
- Specified by:
getTabsin interfaceTypeSymbolEditor- Returns:
- An array of JPanel containing the setting's interface.
-
refreshControls
public void refreshControls(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol layer) Description copied from interface:TypeSymbolEditorInvoked when the user selects or adds a new layer. This method fills up the components on the right according on the layer properties- Specified by:
refreshControlsin interfaceTypeSymbolEditor
-
setValues
-
setValues
protected void setValues(double size, double rotation, double xOffset, double yOffset, URL picture, URL selectedPicture, String sizeExpression, String offsetXExpression, String offsetYExpression, Color lineToOffsetColor, String lineToOffsetColorExpression, String rotationExpression, boolean isDrawLineToOffset) -
getEditorTools
Description copied from interface:TypeSymbolEditorReturns the editor tools that are handled by this configuration panel.- Specified by:
getEditorToolsin interfaceTypeSymbolEditor- Returns:
- EditorTool
-
actionPerformed
- Specified by:
actionPerformedin interfaceActionListener
-
canManageSymbol
public boolean canManageSymbol(org.gvsig.fmap.mapcontext.rendering.symbols.ISymbol symbol) - Specified by:
canManageSymbolin interfaceTypeSymbolEditor
-
getPictureFileName
-
getSelectedPictureFileName
-
getPictureURL
-
getSelectedPictureURL
-
getPictureFile
-
getSelectedPictureFile
-
getSize
protected double getSize() -
getRotation
protected double getRotation() -
getX
protected double getX() -
getY
protected double getY() -
setPicture
-
setSelectedPicture
-
setSize
protected void setSize(double d) -
setRotation
protected void setRotation(double degrees) -
setX
protected void setX(double d) -
setY
protected void setY(double d) -
getColorLine
-
setColorLine
-
setFeatureStore
public void setFeatureStore(org.gvsig.fmap.dal.feature.FeatureStore store) - Overrides:
setFeatureStorein classAbstractTypeSymbolEditor
-