Class RibbonContextualTaskGroup
java.lang.Object
org.pushingpixels.flamingo.api.ribbon.RibbonContextualTaskGroup
A contextual group of
RibbonTask
s. The contextual ribbon task groups
allow showing and hiding ribbon tasks based on the current selection in the
application. For example, Word only shows the table tasks when a table is
selected in the document. By default, tasks belonging to the groups added by
JRibbon.addContextualTaskGroup(RibbonContextualTaskGroup)
are not
visible. To show the tasks belonging to the specific group, call
JRibbon.setVisible(RibbonContextualTaskGroup, boolean)
API. Note that
you can have multiple task groups visible at the same time. This class is a
logical entity that groups ribbon tasks belonging to the same contextual
group.-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final double
Alpha factor for colorizing the toggle tab buttons of tasks in contextual groups. -
Constructor Summary
ConstructorsConstructorDescriptionRibbonContextualTaskGroup
(String title, Color hueColor, RibbonTask... tasks) Creates a task contextual group that contains the specified tasks. -
Method Summary
Modifier and TypeMethodDescriptionReturns the hue color for this group.getTask
(int index) Returns task at the specified index fromthis
group.int
Returns the number of tasks inthis
group.getTitle()
Returns the name of this group.void
Changes the title of this ribbon contextual task group.toString()
-
Field Details
-
HUE_ALPHA
public static final double HUE_ALPHAAlpha factor for colorizing the toggle tab buttons of tasks in contextual groups.- See Also:
-
-
Constructor Details
-
RibbonContextualTaskGroup
Creates a task contextual group that contains the specified tasks.- Parameters:
title
- Group title.hueColor
- Hue color for this group. Should be a saturated non-dark color for good visuals.tasks
- Tasks to add to the group.
-
-
Method Details
-
getTaskCount
public int getTaskCount()Returns the number of tasks inthis
group.- Returns:
- Number of tasks in
this
group. - See Also:
-
getTask
Returns task at the specified index fromthis
group.- Parameters:
index
- Task index.- Returns:
- Task at the specified index.
- See Also:
-
getTitle
Returns the name of this group.- Returns:
- The name of this group.
- See Also:
-
getHueColor
Returns the hue color for this group.- Returns:
- The hue color for this group.
-
setTitle
Changes the title of this ribbon contextual task group.- Parameters:
title
- The new title for this ribbon contextual task group.- See Also:
-
toString
-