Class BasicRibbonBandUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- org.pushingpixels.flamingo.internal.ui.ribbon.RibbonBandUI
-
- org.pushingpixels.flamingo.internal.ui.ribbon.BasicRibbonBandUI
-
public class BasicRibbonBandUI extends RibbonBandUI
Basic UI for ribbon bandJRibbonBand.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected static classBasicRibbonBandUI.CollapsedButtonPopupPanelPopup panel that shows the contents of the ribbon band when it is in a collapsed state.protected static classBasicRibbonBandUI.RoundBorderRound border for the ribbon bands.
-
Field Summary
Fields Modifier and Type Field Description protected JCommandButtoncollapsedButtonThe button for collapsed state.protected AbstractCommandButtonexpandButtonThe band expand button.protected ActionListenerexpandButtonActionListenerAction listener on the expand button.protected MouseListenermouseListenerMouse listener on the associated ribbon band.protected PropertyChangeListenerpropertyChangeListenerListens to property changes on the associated ribbon band.protected AbstractRibbonBand<AbstractBandControlPanel>ribbonBandThe associated ribbon band.protected floatrolloverAmountprotected org.pushingpixels.trident.TimelinerolloverTimeline
-
Constructor Summary
Constructors Constructor Description BasicRibbonBandUI()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected voidconfigureExpandButton()protected JCommandButtoncreateExpandButton()Creates the expand button for the associated ribbon band.protected LayoutManagercreateLayoutManager()Invoked byinstallUIto create a layout manager object to manage theJCommandButtonStrip.static ComponentUIcreateUI(JComponent c)intgetBandTitleHeight()Returns the height of the ribbon band title area.AbstractCommandButtongetCollapsedButton()Deprecated.AbstractCommandButtongetExpandButton()Deprecated.intgetPreferredCollapsedWidth()floatgetRolloverAmount()protected voidinstallComponents()Installs subcomponents on the associated ribbon band.protected voidinstallDefaults()Installs default parameters on the associated ribbon band.protected voidinstallListeners()Installs listeners on the associated ribbon band.voidinstallUI(JComponent c)voidpaint(Graphics g, JComponent c)protected voidpaintBandBackground(Graphics graphics, Rectangle toFill)Paints band background.protected voidpaintBandTitle(Graphics g, Rectangle titleRectangle, String title)Paints band title pane.protected voidpaintBandTitleBackground(Graphics g, Rectangle titleRectangle, String title)Paints band title pane.voidsetRolloverAmount(float rolloverAmount)protected voidsyncExpandButtonIcon()voidtrackMouseCrossing(boolean isMouseIn)protected voidunconfigureExpandButton()protected voiduninstallComponents()Uninstalls components from the associated ribbon band.protected voiduninstallDefaults()Uninstalls default parameters from the associated ribbon band.protected voiduninstallListeners()Uninstalls listeners from the associated ribbon band.voiduninstallUI(JComponent c)voidupdate(Graphics g, JComponent c)-
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize
-
-
-
-
Field Detail
-
ribbonBand
protected AbstractRibbonBand<AbstractBandControlPanel> ribbonBand
The associated ribbon band.
-
collapsedButton
protected JCommandButton collapsedButton
The button for collapsed state.
-
expandButton
protected AbstractCommandButton expandButton
The band expand button. Is visible when theAbstractRibbonBand.getExpandActionListener()of the associated ribbon band is notnull.
-
rolloverAmount
protected float rolloverAmount
-
rolloverTimeline
protected org.pushingpixels.trident.Timeline rolloverTimeline
-
mouseListener
protected MouseListener mouseListener
Mouse listener on the associated ribbon band.
-
propertyChangeListener
protected PropertyChangeListener propertyChangeListener
Listens to property changes on the associated ribbon band.
-
expandButtonActionListener
protected ActionListener expandButtonActionListener
Action listener on the expand button.
-
-
Method Detail
-
createUI
public static ComponentUI createUI(JComponent c)
-
installUI
public void installUI(JComponent c)
- Overrides:
installUIin classComponentUI
-
uninstallUI
public void uninstallUI(JComponent c)
- Overrides:
uninstallUIin classComponentUI
-
installDefaults
protected void installDefaults()
Installs default parameters on the associated ribbon band.
-
installComponents
protected void installComponents()
Installs subcomponents on the associated ribbon band.
-
createExpandButton
protected JCommandButton createExpandButton()
Creates the expand button for the associated ribbon band.- Returns:
- Expand button for the associated ribbon band.
-
syncExpandButtonIcon
protected void syncExpandButtonIcon()
-
installListeners
protected void installListeners()
Installs listeners on the associated ribbon band.
-
configureExpandButton
protected void configureExpandButton()
-
uninstallDefaults
protected void uninstallDefaults()
Uninstalls default parameters from the associated ribbon band.
-
uninstallComponents
protected void uninstallComponents()
Uninstalls components from the associated ribbon band.
-
uninstallListeners
protected void uninstallListeners()
Uninstalls listeners from the associated ribbon band.
-
unconfigureExpandButton
protected void unconfigureExpandButton()
-
createLayoutManager
protected LayoutManager createLayoutManager()
Invoked byinstallUIto create a layout manager object to manage theJCommandButtonStrip.- Returns:
- a layout manager object
-
update
public void update(Graphics g, JComponent c)
- Overrides:
updatein classComponentUI
-
paint
public void paint(Graphics g, JComponent c)
- Overrides:
paintin classComponentUI
-
paintBandTitle
protected void paintBandTitle(Graphics g, Rectangle titleRectangle, String title)
Paints band title pane.- Parameters:
g- Graphics context.titleRectangle- Rectangle for the title pane.title- Title string.
-
paintBandTitleBackground
protected void paintBandTitleBackground(Graphics g, Rectangle titleRectangle, String title)
Paints band title pane.- Parameters:
g- Graphics context.titleRectangle- Rectangle for the title pane.title- Title string.
-
setRolloverAmount
public void setRolloverAmount(float rolloverAmount)
-
paintBandBackground
protected void paintBandBackground(Graphics graphics, Rectangle toFill)
Paints band background.- Parameters:
graphics- Graphics context.toFill- Rectangle for the background.
-
getRolloverAmount
public float getRolloverAmount()
- Specified by:
getRolloverAmountin classRibbonBandUI
-
getBandTitleHeight
public int getBandTitleHeight()
Returns the height of the ribbon band title area.- Specified by:
getBandTitleHeightin classRibbonBandUI- Returns:
- The height of the ribbon band title area.
-
getPreferredCollapsedWidth
public int getPreferredCollapsedWidth()
- Specified by:
getPreferredCollapsedWidthin classRibbonBandUI
-
trackMouseCrossing
public void trackMouseCrossing(boolean isMouseIn)
- Specified by:
trackMouseCrossingin classRibbonBandUI
-
getExpandButton
@Deprecated public AbstractCommandButton getExpandButton()
Deprecated.This method is for unit tests only and should not be called by the application code.- Returns:
- The expand button of the matching ribbon band.
-
getCollapsedButton
@Deprecated public AbstractCommandButton getCollapsedButton()
Deprecated.This method is for unit tests only and should not be called by the application code.- Returns:
- The expand button of the matching ribbon band.
-
-