public class RecentRelationsAction extends java.lang.Object implements java.awt.event.ActionListener, OsmDataLayer.CommandQueueListener, MapView.LayerChangeListener
Modifier and Type | Class and Description |
---|---|
protected static class |
RecentRelationsAction.RecentRelationsMenuItem
A specialized
JMenuItem for presenting one entry of the relation history |
protected static class |
RecentRelationsAction.RecentRelationsPopupMenu |
Modifier and Type | Field and Description |
---|---|
private javax.swing.plaf.basic.BasicArrowButton |
arrow |
private SideButton |
editButton |
private Shortcut |
shortcut |
Constructor and Description |
---|
RecentRelationsAction(SideButton editButton)
Constructs a new
RecentRelationsAction . |
Modifier and Type | Method and Description |
---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
void |
activeLayerChange(Layer oldLayer,
Layer newLayer)
Notifies this listener that the active layer has changed.
|
void |
commandChanged(int queueSize,
int redoSize) |
void |
enableArrow()
Enables arrow button.
|
static Relation |
getLastRelation()
Returns the last relation.
|
static java.util.List<Relation> |
getRecentRelationsOnActiveLayer()
Returns the list of recent relations on active layer.
|
static boolean |
isRelationListable(Relation relation)
Determines if the given relation is listable in last relations.
|
void |
layerAdded(Layer newLayer)
Notifies this listener that a layer has been added.
|
void |
layerRemoved(Layer oldLayer)
Notifies this listener that a layer has been removed.
|
private final SideButton editButton
private final javax.swing.plaf.basic.BasicArrowButton arrow
public RecentRelationsAction(SideButton editButton)
RecentRelationsAction
.editButton
- edit buttonpublic void enableArrow()
public static Relation getLastRelation()
public static boolean isRelationListable(Relation relation)
relation
- relationtrue
if relation is non null, not deleted, and in current datasetpublic void actionPerformed(java.awt.event.ActionEvent e)
actionPerformed
in interface java.awt.event.ActionListener
public void commandChanged(int queueSize, int redoSize)
commandChanged
in interface OsmDataLayer.CommandQueueListener
public void activeLayerChange(Layer oldLayer, Layer newLayer)
MapView.LayerChangeListener
activeLayerChange
in interface MapView.LayerChangeListener
oldLayer
- The previous active layernewLayer
- The new activer layerpublic void layerAdded(Layer newLayer)
MapView.LayerChangeListener
layerAdded
in interface MapView.LayerChangeListener
newLayer
- The new added layerpublic void layerRemoved(Layer oldLayer)
MapView.LayerChangeListener
layerRemoved
in interface MapView.LayerChangeListener
oldLayer
- The old removed layerpublic static java.util.List<Relation> getRecentRelationsOnActiveLayer()