Package dev.turboism.sdk.ui.context
Record Class ContextMenuRegistry.ContextMenuContribution
java.lang.Object
java.lang.Record
dev.turboism.sdk.ui.context.ContextMenuRegistry.ContextMenuContribution
- Enclosing interface:
- ContextMenuRegistry
public static record ContextMenuRegistry.ContextMenuContribution(String id, String actionId, String label, String icon, String context, ContextMenuRegistry.Location location, Set<ContextMenuRegistry.ObjectKind> objectKinds, int priority, ContextMenuRegistry.Target target, ContextMenuRegistry.Operation operation, ContextMenuRegistry.ContextMenuEntry entry, ContextMenuRegistry.Placement placement, Predicate<ContextMenuSelection> visibleWhen)
extends Record
-
Constructor Summary
ConstructorsConstructorDescriptionContextMenuContribution(String id, ContextMenuRegistry.Location location, Set<ContextMenuRegistry.ObjectKind> objectKinds, int priority, ContextMenuRegistry.ContextMenuEntry entry) ContextMenuContribution(String id, String label, String icon, String context, int priority) Compatibility constructor for the earlier context-string Preview shape.ContextMenuContribution(String id, String label, String icon, String context, int priority, ContextMenuRegistry.Target target, ContextMenuRegistry.Operation operation) Compatibility constructor retained for panel-tab host contributions.ContextMenuContribution(String id, String actionId, String label, String icon, ContextMenuRegistry.Location location, Set<ContextMenuRegistry.ObjectKind> objectKinds, int priority) ContextMenuContribution(String id, String actionId, String label, String icon, ContextMenuRegistry.Location location, Set<ContextMenuRegistry.ObjectKind> objectKinds, int priority, Predicate<ContextMenuSelection> visibleWhen) ContextMenuContribution(String id, String actionId, String label, String icon, String context, ContextMenuRegistry.Location location, Set<ContextMenuRegistry.ObjectKind> objectKinds, int priority, ContextMenuRegistry.Target target, ContextMenuRegistry.Operation operation, ContextMenuRegistry.ContextMenuEntry entry, ContextMenuRegistry.Placement placement) ContextMenuContribution(String id, String actionId, String label, String icon, String context, ContextMenuRegistry.Location location, Set<ContextMenuRegistry.ObjectKind> objectKinds, int priority, ContextMenuRegistry.Target target, ContextMenuRegistry.Operation operation, ContextMenuRegistry.ContextMenuEntry entry, ContextMenuRegistry.Placement placement, Predicate<ContextMenuSelection> visibleWhen) Creates an instance of aContextMenuContributionrecord class. -
Method Summary
Modifier and TypeMethodDescriptionactionId()Returns the value of theactionIdrecord component.context()Returns the value of thecontextrecord component.entry()Returns the value of theentryrecord component.final booleanIndicates whether some other object is "equal to" this one.final inthashCode()Returns a hash code value for this object.icon()Returns the value of theiconrecord component.id()Returns the value of theidrecord component.label()Returns the value of thelabelrecord component.location()Returns the value of thelocationrecord component.Returns the value of theobjectKindsrecord component.Returns the value of theoperationrecord component.Returns the value of theplacementrecord component.intpriority()Returns the value of thepriorityrecord component.target()Returns the value of thetargetrecord component.final StringtoString()Returns a string representation of this record class.Returns the value of thevisibleWhenrecord component.
-
Constructor Details
-
ContextMenuContribution
public ContextMenuContribution(String id, String actionId, String label, String icon, String context, ContextMenuRegistry.Location location, Set<ContextMenuRegistry.ObjectKind> objectKinds, int priority, ContextMenuRegistry.Target target, ContextMenuRegistry.Operation operation, ContextMenuRegistry.ContextMenuEntry entry, ContextMenuRegistry.Placement placement, Predicate<ContextMenuSelection> visibleWhen) Creates an instance of aContextMenuContributionrecord class.- Parameters:
id- the value for theidrecord componentactionId- the value for theactionIdrecord componentlabel- the value for thelabelrecord componenticon- the value for theiconrecord componentcontext- the value for thecontextrecord componentlocation- the value for thelocationrecord componentobjectKinds- the value for theobjectKindsrecord componentpriority- the value for thepriorityrecord componenttarget- the value for thetargetrecord componentoperation- the value for theoperationrecord componententry- the value for theentryrecord componentplacement- the value for theplacementrecord componentvisibleWhen- the value for thevisibleWhenrecord component
-
ContextMenuContribution
public ContextMenuContribution(String id, String actionId, String label, String icon, ContextMenuRegistry.Location location, Set<ContextMenuRegistry.ObjectKind> objectKinds, int priority) -
ContextMenuContribution
public ContextMenuContribution(String id, String actionId, String label, String icon, ContextMenuRegistry.Location location, Set<ContextMenuRegistry.ObjectKind> objectKinds, int priority, Predicate<ContextMenuSelection> visibleWhen) -
ContextMenuContribution
public ContextMenuContribution(String id, ContextMenuRegistry.Location location, Set<ContextMenuRegistry.ObjectKind> objectKinds, int priority, ContextMenuRegistry.ContextMenuEntry entry) -
ContextMenuContribution
public ContextMenuContribution(String id, String actionId, String label, String icon, String context, ContextMenuRegistry.Location location, Set<ContextMenuRegistry.ObjectKind> objectKinds, int priority, ContextMenuRegistry.Target target, ContextMenuRegistry.Operation operation, ContextMenuRegistry.ContextMenuEntry entry, ContextMenuRegistry.Placement placement) -
ContextMenuContribution
Compatibility constructor for the earlier context-string Preview shape. -
ContextMenuContribution
public ContextMenuContribution(String id, String label, String icon, String context, int priority, ContextMenuRegistry.Target target, ContextMenuRegistry.Operation operation) Compatibility constructor retained for panel-tab host contributions.
-
-
Method Details
-
toString
Returns a string representation of this record class. The representation contains the name of the class, followed by the name and value of each of the record components. -
hashCode
public final int hashCode()Returns a hash code value for this object. The value is derived from the hash code of each of the record components. -
equals
Indicates whether some other object is "equal to" this one. The objects are equal if the other object is of the same class and if all the record components are equal. Reference components are compared withObjects::equals(Object,Object); primitive components are compared with '=='. -
id
Returns the value of theidrecord component.- Returns:
- the value of the
idrecord component
-
actionId
Returns the value of theactionIdrecord component.- Returns:
- the value of the
actionIdrecord component
-
label
Returns the value of thelabelrecord component.- Returns:
- the value of the
labelrecord component
-
icon
Returns the value of theiconrecord component.- Returns:
- the value of the
iconrecord component
-
context
Returns the value of thecontextrecord component.- Returns:
- the value of the
contextrecord component
-
location
Returns the value of thelocationrecord component.- Returns:
- the value of the
locationrecord component
-
objectKinds
Returns the value of theobjectKindsrecord component.- Returns:
- the value of the
objectKindsrecord component
-
priority
public int priority()Returns the value of thepriorityrecord component.- Returns:
- the value of the
priorityrecord component
-
target
Returns the value of thetargetrecord component.- Returns:
- the value of the
targetrecord component
-
operation
Returns the value of theoperationrecord component.- Returns:
- the value of the
operationrecord component
-
entry
Returns the value of theentryrecord component.- Returns:
- the value of the
entryrecord component
-
placement
Returns the value of theplacementrecord component.- Returns:
- the value of the
placementrecord component
-
visibleWhen
Returns the value of thevisibleWhenrecord component.- Returns:
- the value of the
visibleWhenrecord component
-