Skip to content

Commit

Permalink
Updated Javadoc
Browse files Browse the repository at this point in the history
  • Loading branch information
georgweiss committed Jul 6, 2024
1 parent e6461e2 commit 1a50552
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 11 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import org.csstudio.display.builder.model.Widget;

/**
* Interface to define a pluggable action runtime behavior.
* Interface to define action runtime behavior.
*/
public interface ActionHandler {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,16 +34,16 @@
public interface ActionInfo {

/**
* @param actionId Action id, e.g. open_display
* @param actionId Action id, e.g. open_display.
* @return <code>true</code> if the input string is implemented by the {@link ActionInfo}.
*/
default boolean matchesAction(String actionId) {
return false;
}

/**
* The type of action, which is either a fully qualified class name, or a legacy identifier
* string like 'open_display'.
* The id/type of action, which is either a fully qualified class name, or a legacy identifier
* string like 'open_display'. Must be unique between all implementations.
*
* @return The action 'type'.
*/
Expand All @@ -52,17 +52,17 @@ default boolean matchesAction(String actionId) {
/**
* Image shown in drop-down in editor and runtime.
*
* @return An {@link Image} representing the action.
* @return An {@link Image} representing the action in (for instance) editor and context menu.
*/
Image getImage();

/**
* @return Default or user-defined description string.
* @return Default or user-defined description string. Implementations should define a non-empty string.
*/
String getDescription();

/**
* @param description User-defined string, potentially overriding default.
* @param description User-defined string, overriding the default.
*/
void setDescription(String description);

Expand Down Expand Up @@ -93,7 +93,7 @@ default void setModifiers(MouseEvent event) {
}

/**
* @return A {@link List} of {@link MenuItem}s for the widget's context menu.
* @return A {@link List} of {@link MenuItem}s for the action in a widget's context menu.
* Defaults to <code>null</code>.
*/
default List<MenuItem> getContextMenuItems(Widget widget) {
Expand All @@ -107,13 +107,12 @@ default List<MenuItem> getContextMenuItems(Widget widget) {
Node getEditor(Widget widget);

/**
* Reverts edits made by user in the action editor UI, e.g. when user clicks CANCEL button in action editor dialog
* Reverts edits made by user in the action editor UI when CANCEL is clicked.
*/
void revert();

/**
* This must be called to commit edits, i.e. when user clicks OK button in action editor dialog.
* Commits edits in the action editor UI to the {@link ActionInfo} object
* Commits edits in the action editor UI to the {@link ActionInfo} object.
*
* @return The {@link ActionInfo} object with committed values.
*/
Expand Down

0 comments on commit 1a50552

Please sign in to comment.