Last change
on this file since 13783 was 10599, checked in by Don-vip, 8 years ago |
see #11390 - sonar - squid:S1610 - Java 8: Abstract classes without fields should be converted to interfaces
|
-
Property svn:eol-style
set to
native
|
File size:
1.3 KB
|
Line | |
---|
1 | // License: GPL. For details, see LICENSE file.
|
---|
2 | package org.openstreetmap.josm.command;
|
---|
3 |
|
---|
4 | import java.util.Collection;
|
---|
5 |
|
---|
6 | import javax.swing.Icon;
|
---|
7 |
|
---|
8 | import 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 | * @since 3262 (creation)
|
---|
15 | * @since 10599 (functional interface)
|
---|
16 | */
|
---|
17 | public interface PseudoCommand {
|
---|
18 |
|
---|
19 | /**
|
---|
20 | * Provides a description text representing this command.
|
---|
21 | * @return description text representing this command
|
---|
22 | */
|
---|
23 | String getDescriptionText();
|
---|
24 |
|
---|
25 | /**
|
---|
26 | * Provides a descriptive icon of this command.
|
---|
27 | * @return descriptive icon of this command
|
---|
28 | */
|
---|
29 | default Icon getDescriptionIcon() {
|
---|
30 | return null;
|
---|
31 | }
|
---|
32 |
|
---|
33 | /**
|
---|
34 | * Return the primitives that take part in this command.
|
---|
35 | * @return primitives that take part in this command
|
---|
36 | */
|
---|
37 | Collection<? extends OsmPrimitive> getParticipatingPrimitives();
|
---|
38 |
|
---|
39 | /**
|
---|
40 | * Returns the subcommands of this command.
|
---|
41 | * Override for subclasses that have child commands.
|
---|
42 | * @return the subcommands, null if there are no child commands
|
---|
43 | */
|
---|
44 | default Collection<PseudoCommand> getChildren() {
|
---|
45 | return null;
|
---|
46 | }
|
---|
47 | }
|
---|
Note:
See
TracBrowser
for help on using the repository browser.