source: josm/trunk/src/org/openstreetmap/josm/command/PseudoCommand.java@ 6215

Last change on this file since 6215 was 5926, checked in by bastiK, 11 years ago

clean up imports

  • Property svn:eol-style set to native
File size: 1.1 KB
Line 
1// License: GPL. For details, see LICENSE file.
2package org.openstreetmap.josm.command;
3
4import java.util.Collection;
5
6import javax.swing.Icon;
7
8import org.openstreetmap.josm.data.osm.OsmPrimitive;
9
10/**
11 * PseudoCommand is a reduced form of a command. It can be presented in a tree view
12 * as subcommand of real commands but it is just an empty shell and can not be
13 * executed or undone.
14 */
15abstract public class PseudoCommand {
16 /**
17 * Provides a description text representing this command.
18 */
19 abstract public String getDescriptionText();
20
21 /**
22 * Provides a descriptive icon of this command.
23 */
24 public Icon getDescriptionIcon() {
25 return null;
26 }
27
28 /**
29 * Return the primitives that take part in this command.
30 */
31 abstract public Collection<? extends OsmPrimitive> getParticipatingPrimitives();
32
33 /**
34 * Returns the subcommands of this command.
35 * Override for subclasses that have child commands.
36 * @return the subcommands, null if there are no child commands
37 */
38 public Collection<PseudoCommand> getChildren() {
39 return null;
40 }
41}
Note: See TracBrowser for help on using the repository browser.