org.jvnet.flamingo.bcb.ui
Class BasicBreadcrumbBarUI

java.lang.Object
  extended by javax.swing.plaf.ComponentUI
      extended by org.jvnet.flamingo.bcb.ui.BreadcrumbBarUI
          extended by org.jvnet.flamingo.bcb.ui.BasicBreadcrumbBarUI
All Implemented Interfaces:
ScrollablePanel.ScrollableSupport

public class BasicBreadcrumbBarUI
extends BreadcrumbBarUI
implements ScrollablePanel.ScrollableSupport

Basic UI for breadcrumb bar (JBreadcrumbBar).

Author:
Topologi, Kirill Grouchnikov, Pawel Hajda

Constructor Summary
BasicBreadcrumbBarUI()
           
 
Method Summary
 JCommandButton createLeftScroller()
           
 JCommandButton createRightScroller()
           
static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)
           
 BreadcrumbParticle getParticle(int selectorIndex)
           
 javax.swing.JPopupMenu getPopup()
          Returns the popup menu of this breadcrumb bar.
 int getPopupInitiatorIndex()
          Returns the index of the popup initiator.
 ChoicesSelector getSelector(int selectorIndex)
           
 void hidePopup()
          Hides the popup menu.
 void installUI(javax.swing.JComponent c)
           
 boolean popup(int componentIndex)
           
 boolean showPopup(int selectorIndex, BreadcrumbItemChoices bic)
          Shows the popup menu based on the specified parameters.
 void uninstallUI(javax.swing.JComponent c)
           
 
Methods inherited from class javax.swing.plaf.ComponentUI
contains, getAccessibleChild, getAccessibleChildrenCount, getBaseline, getBaselineResizeBehavior, getMaximumSize, getMinimumSize, getPreferredSize, paint, update
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicBreadcrumbBarUI

public BasicBreadcrumbBarUI()
Method Detail

createUI

public static javax.swing.plaf.ComponentUI createUI(javax.swing.JComponent c)

installUI

public void installUI(javax.swing.JComponent c)
Overrides:
installUI in class javax.swing.plaf.ComponentUI

uninstallUI

public void uninstallUI(javax.swing.JComponent c)
Overrides:
uninstallUI in class javax.swing.plaf.ComponentUI

getPopup

public javax.swing.JPopupMenu getPopup()
Returns the popup menu of this breadcrumb bar.

Specified by:
getPopup in class BreadcrumbBarUI
Returns:
The popup menu of this breadcrumb bar.

hidePopup

public void hidePopup()
Hides the popup menu.

Specified by:
hidePopup in class BreadcrumbBarUI

popup

public boolean popup(int componentIndex)
Specified by:
popup in class BreadcrumbBarUI

showPopup

public boolean showPopup(int selectorIndex,
                         BreadcrumbItemChoices bic)
Shows the popup menu based on the specified parameters.

Parameters:
selectorIndex - The index of the originating selector.
bic - The choice element.
Returns:
If true, the popup was shown (the choice element was not empty). If false, the popup was not shown.

getParticle

public BreadcrumbParticle getParticle(int selectorIndex)
Specified by:
getParticle in class BreadcrumbBarUI

getSelector

public ChoicesSelector getSelector(int selectorIndex)
Specified by:
getSelector in class BreadcrumbBarUI

createLeftScroller

public JCommandButton createLeftScroller()
Specified by:
createLeftScroller in interface ScrollablePanel.ScrollableSupport

createRightScroller

public JCommandButton createRightScroller()
Specified by:
createRightScroller in interface ScrollablePanel.ScrollableSupport

getPopupInitiatorIndex

public int getPopupInitiatorIndex()
Returns the index of the popup initiator.

Specified by:
getPopupInitiatorIndex in class BreadcrumbBarUI
Returns:
The index of the popup initiator.