Skip to content

Commit

Permalink
added a new constructor method providing a custom sort string (#182)
Browse files Browse the repository at this point in the history
* added a new constructor method providing a custom sort string

* fixed checkstyle rule in method comment
  • Loading branch information
rsoika authored Nov 16, 2022
1 parent fbd330b commit a33b31a
Showing 1 changed file with 16 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,22 @@ public PaletteItem(final String id, final String label, final TriggerElementCrea
this.sortString = ("" + label.charAt(0));
}

/**
* Construct a PaletteItem providing a custom sort string.
*
* @param id
* @param label
* @param initalizeAction
* @param icon
* @param sortString
*/
public PaletteItem(final String id, final String label, final TriggerElementCreationAction initalizeAction,
final String icon, final String sortString) {
super(label, Arrays.asList(initalizeAction), icon);
this.id = id;
this.sortString = sortString;
}

public String getId() { return id; }

public void setId(final String id) { this.id = id; }
Expand Down

0 comments on commit a33b31a

Please sign in to comment.