public class RecentRelationsAction extends JosmAction implements UndoRedoHandler.CommandQueueListener
| Modifier and Type | Class and Description |
|---|---|
(package private) static class |
RecentRelationsAction.LaunchEditorAction |
(package private) static class |
RecentRelationsAction.RecentRelationsMenuItem
A specialized
JMenuItem for presenting one entry of the relation history |
(package private) static class |
RecentRelationsAction.RecentRelationsPopupMenu |
JosmAction.ActiveLayerChangeAdapter, JosmAction.LayerChangeAdapter, JosmAction.SelectionChangeAdapter| Modifier and Type | Field and Description |
|---|---|
private javax.swing.plaf.basic.BasicArrowButton |
arrow |
private SideButton |
editButton |
private RecentRelationsAction.LaunchEditorAction |
launchAction |
private Shortcut |
shortcut |
sc| Constructor and Description |
|---|
RecentRelationsAction(SideButton editButton)
Constructs a new
RecentRelationsAction. |
| Modifier and Type | Method and Description |
|---|---|
void |
actionPerformed(java.awt.event.ActionEvent e) |
void |
commandChanged(int queueSize,
int redoSize)
Notifies the listener about the new queue size
|
void |
destroy()
Called when the object has been destroyed.
|
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.
|
protected void |
updateEnabledState()
Override in subclasses to update the enabled state of the action when
something in the JOSM state changes, i.e.
|
checkAndConfirmOutlyingOperation, getLayerManager, getShortcut, initEnabledState, installAdapters, listenToLayerChange, listenToSelectionChange, setHelpId, setTooltip, updateEnabledState, updateEnabledStateOnCurrentSelection, updateEnabledStateOnCurrentSelection, updateEnabledStateOnModifiableSelection, waitFutureprivate final SideButton editButton
private final javax.swing.plaf.basic.BasicArrowButton arrow
private final RecentRelationsAction.LaunchEditorAction launchAction
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.ActionListenerpublic void commandChanged(int queueSize, int redoSize)
UndoRedoHandler.CommandQueueListenercommandChanged in interface UndoRedoHandler.CommandQueueListenerqueueSize - Undo stack sizeredoSize - Redo stack sizeprotected void updateEnabledState()
JosmActionJosmAction.updateEnabledState(Collection) to respond to changes in the collection
of selected primitives.
Default behavior is empty.updateEnabledState in class JosmActionJosmAction.updateEnabledState(Collection),
JosmAction.initEnabledState(),
JosmAction.listenToLayerChange()public void destroy()
Destroyabledestroy in interface Destroyabledestroy in class JosmActionpublic static java.util.List<Relation> getRecentRelationsOnActiveLayer()