public class RecentRelationsAction extends java.lang.Object implements java.awt.event.ActionListener, OsmDataLayer.CommandQueueListener, LayerManager.LayerChangeListener, MainLayerManager.ActiveLayerChangeListener
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 |
activeOrEditLayerChanged(MainLayerManager.ActiveLayerChangeEvent e)
Called whenever the active or edit layer 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(LayerManager.LayerAddEvent e)
Notifies this listener that a layer has been added.
|
void |
layerOrderChanged(LayerManager.LayerOrderChangeEvent e)
Notifies this listener that the order of layers was changed.
|
void |
layerRemoving(LayerManager.LayerRemoveEvent e)
Notifies this listener that a layer is about to be 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 layerAdded(LayerManager.LayerAddEvent e)
LayerManager.LayerChangeListener
Listeners are called in the EDT thread and you can manipulate the layer manager in the current thread.
layerAdded
in interface LayerManager.LayerChangeListener
e
- The new added layer eventpublic void layerRemoving(LayerManager.LayerRemoveEvent e)
LayerManager.LayerChangeListener
Listeners are called in the EDT thread and you can manipulate the layer manager in the current thread.
layerRemoving
in interface LayerManager.LayerChangeListener
e
- The layer to be removed (as event)public void layerOrderChanged(LayerManager.LayerOrderChangeEvent e)
LayerManager.LayerChangeListener
Listeners are called in the EDT thread and you can manipulate the layer manager in the current thread.
layerOrderChanged
in interface LayerManager.LayerChangeListener
e
- The order change event.public void activeOrEditLayerChanged(MainLayerManager.ActiveLayerChangeEvent e)
MainLayerManager.ActiveLayerChangeListener
You can be sure that this layer is still contained in this set.
Listeners are called in the EDT thread and you can manipulate the layer manager in the current thread.
activeOrEditLayerChanged
in interface MainLayerManager.ActiveLayerChangeListener
e
- The change event.public static java.util.List<Relation> getRecentRelationsOnActiveLayer()