Class QMenuItemBase
java.lang.Object
com.kingsrook.qqq.backend.core.model.metadata.menus.items.QMenuItemBase
- All Implemented Interfaces:
QMenuItemInterface,QMetaDataObject,Serializable,Cloneable
- Direct Known Subclasses:
QMenuItemBuiltIn,QMenuItemDivider,QMenuItemDownloadFile,QMenuItemRunProcess,QMenuItemSubList,QMenuItemSubMenu
abstract base class for menu items. provides fields for basic methods
required by the interface
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface com.kingsrook.qqq.backend.core.model.metadata.menus.items.QMenuItemInterface
getItemType, getValues, validate
-
Constructor Details
-
QMenuItemBase
public QMenuItemBase()
-
-
Method Details
-
getLabel
Getter for label- Specified by:
getLabelin interfaceQMenuItemInterface- See Also:
-
setLabel
-
withLabel
Fluent setter for label- Parameters:
label- user-facing text to display as the label for this menu item. e.g., "New", "Copy", or "Process Orders".- Returns:
- this
-
clone
Creates and returns a shallow copy of this menu item.The cloned item will have its own copy of the label and icon fields. Subclasses should override this method to provide deep cloning if they contain additional mutable state.
- Specified by:
clonein interfaceQMenuItemInterface- Overrides:
clonein classObject- Returns:
- a clone of this menu item
- Throws:
RuntimeException- if cloning is not supported (should not occur)
-
getIcon
Getter for icon- Specified by:
getIconin interfaceQMenuItemInterface- See Also:
-
setIcon
-
withIcon
Fluent setter for icon- Parameters:
icon- Optional icon to display with this menu item.- Returns:
- this
-