Class RibbonTask
- java.lang.Object
-
- org.pushingpixels.radiance.component.api.ribbon.RibbonTask
-
public class RibbonTask extends java.lang.Object
Single ribbon task inJRibbon
. This is a logical entity that groupsAbstractRibbonBand
components.
-
-
Field Summary
Fields Modifier and Type Field Description private java.util.ArrayList<AbstractRibbonBand>
bands
List of all bands.private RibbonContextualTaskGroup
contextualGroup
The group that this band belongs to.private java.lang.String
keyTip
The key tip for the task button of this task.private RibbonBandResizeSequencingPolicy
resizeSequencingPolicy
The current resize sequencing policy.private JRibbon
ribbon
The associated ribbon.private java.lang.String
title
The title of this task.
-
Constructor Summary
Constructors Constructor Description RibbonTask(java.lang.String title, java.lang.Iterable<AbstractRibbonBand> bands)
Creates a ribbon task that contains the specified bands.RibbonTask(java.lang.String title, AbstractRibbonBand... bands)
Creates a ribbon task that contains the specified bands.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description AbstractRibbonBand
getBand(int index)
Returns band at the specified index fromthis
task.int
getBandCount()
Returns the number of bands inthis
task.java.util.List<AbstractRibbonBand>
getBands()
Returns an unmodifiable view on the ribbon bands of this task.RibbonContextualTaskGroup
getContextualGroup()
Returns the contextual task group for this ribbon task.java.lang.String
getKeyTip()
Returns the key tip for the task button of this task.RibbonBandResizeSequencingPolicy
getResizeSequencingPolicy()
Returns the current resize sequencing policy of this ribbon task.java.lang.String
getTitle()
Returns the title of this task.(package private) void
setContextualGroup(RibbonContextualTaskGroup contextualGroup)
Sets the contextual task group for this ribbon task.void
setKeyTip(java.lang.String keyTip)
Sets the specified parameter to be the new key tip for the task button of this task.void
setResizeSequencingPolicy(RibbonBandResizeSequencingPolicy resizeSequencingPolicy)
Sets the specified parameter as the new resize sequencing policy of this ribbon task.(package private) void
setRibbon(JRibbon ribbon)
Associates this ribbon task with the specified ribbon.void
setTitle(java.lang.String title)
Changes the title of this ribbon task.
-
-
-
Field Detail
-
ribbon
private JRibbon ribbon
The associated ribbon.
-
bands
private java.util.ArrayList<AbstractRibbonBand> bands
List of all bands.
-
title
private java.lang.String title
The title of this task.
-
contextualGroup
private RibbonContextualTaskGroup contextualGroup
The group that this band belongs to. For regular ribbon bands this field isnull
.
-
resizeSequencingPolicy
private RibbonBandResizeSequencingPolicy resizeSequencingPolicy
The current resize sequencing policy.
-
keyTip
private java.lang.String keyTip
The key tip for the task button of this task.
-
-
Constructor Detail
-
RibbonTask
public RibbonTask(java.lang.String title, AbstractRibbonBand... bands)
Creates a ribbon task that contains the specified bands.- Parameters:
title
- Ribbon task title.bands
- Bands to add to the ribbon task.
-
RibbonTask
public RibbonTask(java.lang.String title, java.lang.Iterable<AbstractRibbonBand> bands)
Creates a ribbon task that contains the specified bands.- Parameters:
title
- Ribbon task title.bands
- Bands to add to the ribbon task.
-
-
Method Detail
-
getBandCount
public int getBandCount()
Returns the number of bands inthis
task.- Returns:
- Number of bands in
this
task. - See Also:
getBand(int)
,getBands()
-
getBand
public AbstractRibbonBand getBand(int index)
Returns band at the specified index fromthis
task.- Parameters:
index
- Band index.- Returns:
- Band at the specified index.
- See Also:
getBandCount()
,getBands()
-
getTitle
public java.lang.String getTitle()
Returns the title of this task.- Returns:
- The title of this task.
-
setContextualGroup
void setContextualGroup(RibbonContextualTaskGroup contextualGroup)
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()
-
getContextualGroup
public RibbonContextualTaskGroup getContextualGroup()
Returns the contextual task group for this ribbon task. Will returnnull
for general ribbon tasks.- Returns:
- The contextual task group for this ribbon task.
-
getBands
public java.util.List<AbstractRibbonBand> getBands()
Returns an unmodifiable view on the ribbon bands of this task.- Returns:
- Unmodifiable view on the ribbon bands of this task.
- See Also:
getBandCount()
,getBand(int)
-
setTitle
public void setTitle(java.lang.String title)
Changes the title of this ribbon task.- Parameters:
title
- The new title for this ribbon task.
-
setRibbon
void setRibbon(JRibbon ribbon)
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
public RibbonBandResizeSequencingPolicy getResizeSequencingPolicy()
Returns the current resize sequencing policy of this ribbon task.- Returns:
- The current resize sequencing policy of this ribbon task.
- See Also:
setResizeSequencingPolicy(RibbonBandResizeSequencingPolicy)
-
setResizeSequencingPolicy
public void setResizeSequencingPolicy(RibbonBandResizeSequencingPolicy resizeSequencingPolicy)
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:
getResizeSequencingPolicy()
-
getKeyTip
public java.lang.String 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(String)
-
setKeyTip
public void setKeyTip(java.lang.String keyTip)
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.
-
-