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

Last change on this file since 7760 was 6883, checked in by Don-vip, 10 years ago

fix some Sonar issues

  • 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 */
15public abstract class PseudoCommand {
16
17 /**
18 * Provides a description text representing this command.
19 */
20 public abstract String getDescriptionText();
21
22 /**
23 * Provides a descriptive icon of this command.
24 */
25 public Icon getDescriptionIcon() {
26 return null;
27 }
28
29 /**
30 * Return the primitives that take part in this command.
31 */
32 public abstract Collection<? extends OsmPrimitive> getParticipatingPrimitives();
33
34 /**
35 * Returns the subcommands of this command.
36 * Override for subclasses that have child commands.
37 * @return the subcommands, null if there are no child commands
38 */
39 public Collection<PseudoCommand> getChildren() {
40 return null;
41 }
42}
Note: See TracBrowser for help on using the repository browser.