public class PictureMarker extends AbstractTypeSymbolEditor implements 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 JLabel |
lblFileName |
protected JLabel |
lblSelFileName |
protected JLabel |
lblSize |
protected JLabel |
lblX |
protected JLabel |
lblY |
static double |
MARKER_IMAGE_DEFAULT_WIDTH |
protected ArrayList<JPanel> |
tabs |
protected JNumberSpinner |
txtSize |
protected JNumberSpinner |
txtX |
protected JNumberSpinner |
txtY |
owner
Constructor and Description |
---|
PictureMarker(SymbolEditor owner) |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(ActionEvent e) |
boolean |
canManageSymbol(ISymbol symbol) |
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.
|
String |
getName()
Returns the name of the config tabs that will be shown in the selector combo box.
|
JPanel[] |
getTabs()
Due to the complexity that many symbols settings can reach, the SymbolEditorPanel is
designed in a tabbed-based fashion.
|
void |
refreshControls(ISymbol layer)
Invoked when the user selects or adds a new layer.
|
protected void |
setValues(double size,
double xOffset,
double yOffset,
String fileName,
String selectionFileName) |
fireSymbolChangedEvent, toString
public static final double MARKER_IMAGE_DEFAULT_WIDTH
protected JNumberSpinner txtSize
protected JNumberSpinner txtX
protected JNumberSpinner txtY
protected JLabel lblFileName
protected JLabel lblSelFileName
protected JLabel lblSize
protected JLabel lblX
protected JLabel lblY
public PictureMarker(SymbolEditor owner)
public ISymbol getLayer()
TypeSymbolEditor
getLayer
in interface TypeSymbolEditor
public 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 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, String fileName, String selectionFileName)
public EditorTool[] getEditorTools()
TypeSymbolEditor
getEditorTools
in interface TypeSymbolEditor
public void actionPerformed(ActionEvent e)
actionPerformed
in interface ActionListener
public boolean canManageSymbol(ISymbol symbol)
canManageSymbol
in interface TypeSymbolEditor