Package com.axelor.ui
Class QuickMenuItem
- java.lang.Object
-
- com.axelor.ui.QuickMenuItem
-
public class QuickMenuItem extends Object
An item in the quick menu dropdown
-
-
Constructor Summary
Constructors Constructor Description QuickMenuItem()Create a new instance of theQuickMenuItemQuickMenuItem(String title, String action)Create a new instance of theQuickMenuItemQuickMenuItem(String title, String action, Context context)Create a new instance of theQuickMenuItemQuickMenuItem(String title, String action, Context context, boolean selected)Create a new instance of theQuickMenuItem
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetAction()Name of action triggered when item is selectedContextgetContext()Context to pass to the actionClass<?>getModel()Model of the contextStringgetTitle()Title of the itembooleanisSelected()Selected state of the itemvoidsetAction(String action)Set the action triggered when item is selectedvoidsetContext(Context context)Set the context to pass to the actionvoidsetSelected(boolean selected)Set the selected state of the itemvoidsetTitle(String title)Set the title of the itemStringtoString()
-
-
-
Constructor Detail
-
QuickMenuItem
public QuickMenuItem()
Create a new instance of theQuickMenuItem
-
QuickMenuItem
public QuickMenuItem(String title, String action, Context context, boolean selected)
Create a new instance of theQuickMenuItem- Parameters:
title- titleaction- actioncontext- contextselected- selected state
-
QuickMenuItem
public QuickMenuItem(String title, String action, Context context)
Create a new instance of theQuickMenuItem- Parameters:
title- titleaction- actioncontext- context
-
QuickMenuItem
public QuickMenuItem(String title, String action)
Create a new instance of theQuickMenuItem- Parameters:
title- titleaction- action
-
-
Method Detail
-
getTitle
public String getTitle()
Title of the item- Returns:
- item title
-
setTitle
public void setTitle(String title)
Set the title of the item- Parameters:
title- title
-
getAction
public String getAction()
Name of action triggered when item is selected- Returns:
- action
-
setAction
public void setAction(String action)
Set the action triggered when item is selected- Parameters:
action- action
-
getContext
public Context getContext()
Context to pass to the action- Returns:
- action context
-
setContext
public void setContext(Context context)
Set the context to pass to the action- Parameters:
context- context
-
getModel
public Class<?> getModel()
Model of the context- Returns:
- context model
-
isSelected
public boolean isSelected()
Selected state of the item- Returns:
- selected state
-
setSelected
public void setSelected(boolean selected)
Set the selected state of the item- Parameters:
selected- true or false
-
-