Class RibbonTask
java.lang.Object
org.pushingpixels.radiance.component.api.ribbon.RibbonTask
Single ribbon task in
JRibbon. This is a logical entity that groups
AbstractRibbonBand components.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate ArrayList<AbstractRibbonBand> List of all bands.private RibbonContextualTaskGroupThe group that this band belongs to.private StringThe key tip for the task button of this task.private RibbonBandResizeSequencingPolicyThe current resize sequencing policy.private JRibbonThe associated ribbon.private StringThe title of this task. -
Constructor Summary
ConstructorsConstructorDescriptionRibbonTask(String title, Iterable<AbstractRibbonBand> bands) Creates a ribbon task that contains the specified bands.RibbonTask(String title, AbstractRibbonBand... bands) Creates a ribbon task that contains the specified bands. -
Method Summary
Modifier and TypeMethodDescriptiongetBand(int index) Returns band at the specified index fromthistask.intReturns the number of bands inthistask.getBands()Returns an unmodifiable view on the ribbon bands of this task.Returns the contextual task group for this ribbon task.Returns the key tip for the task button of this task.Returns the current resize sequencing policy of this ribbon task.getTitle()Returns the title of this task.(package private) voidsetContextualGroup(RibbonContextualTaskGroup contextualGroup) Sets the contextual task group for this ribbon task.voidSets the specified parameter to be the new key tip for the task button of this task.voidsetResizeSequencingPolicy(RibbonBandResizeSequencingPolicy resizeSequencingPolicy) Sets the specified parameter as the new resize sequencing policy of this ribbon task.(package private) voidAssociates this ribbon task with the specified ribbon.voidChanges the title of this ribbon task.
-
Field Details
-
ribbon
The associated ribbon. -
bands
List of all bands. -
title
The title of this task. -
contextualGroup
The group that this band belongs to. For regular ribbon bands this field isnull. -
resizeSequencingPolicy
The current resize sequencing policy. -
keyTip
The key tip for the task button of this task.
-
-
Constructor Details
-
RibbonTask
Creates a ribbon task that contains the specified bands.- Parameters:
title- Ribbon task title.bands- Bands to add to the ribbon task.
-
RibbonTask
Creates a ribbon task that contains the specified bands.- Parameters:
title- Ribbon task title.bands- Bands to add to the ribbon task.
-
-
Method Details
-
getBandCount
public int getBandCount()Returns the number of bands inthistask.- Returns:
- Number of bands in
thistask. - See Also:
-
getBand
Returns band at the specified index fromthistask.- Parameters:
index- Band index.- Returns:
- Band at the specified index.
- See Also:
-
getTitle
-
setContextualGroup
Sets the contextual task group for this ribbon task. This method is package protected and is for internal use only.- Parameters:
contextualGroup- The contextual task group for this ribbon task.- See Also:
-
getContextualGroup
Returns the contextual task group for this ribbon task. Will returnnullfor general ribbon tasks.- Returns:
- The contextual task group for this ribbon task.
-
getBands
Returns an unmodifiable view on the ribbon bands of this task.- Returns:
- Unmodifiable view on the ribbon bands of this task.
- See Also:
-
setTitle
Changes the title of this ribbon task.- Parameters:
title- The new title for this ribbon task.
-
setRibbon
Associates this ribbon task with the specified ribbon. This method is package protected and is for internal use only.- Parameters:
ribbon- The associated ribbon.
-
getResizeSequencingPolicy
Returns the current resize sequencing policy of this ribbon task.- Returns:
- The current resize sequencing policy of this ribbon task.
- See Also:
-
setResizeSequencingPolicy
Sets the specified parameter as the new resize sequencing policy of this ribbon task.- Parameters:
resizeSequencingPolicy- The new resize sequencing policy of this ribbon task.- See Also:
-
getKeyTip
Returns the key tip for the task button of this task.- Returns:
- The key tip for the task button of this task.
- See Also:
-
setKeyTip
Sets the specified parameter to be the new key tip for the task button of this task.- Parameters:
keyTip- The new key tip for the task button of this task.
-