Class BasicBreadcrumbBarUI
- java.lang.Object
-
- javax.swing.plaf.ComponentUI
-
- org.pushingpixels.radiance.component.internal.ui.bcb.BreadcrumbBarUI
-
- org.pushingpixels.radiance.component.internal.ui.bcb.BasicBreadcrumbBarUI
-
- Direct Known Subclasses:
RadianceBreadcrumbBarUI
public abstract class BasicBreadcrumbBarUI extends BreadcrumbBarUI
Basic UI for breadcrumb bar (JBreadcrumbBar).
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected classBasicBreadcrumbBarUI.BreadcrumbBarLayoutLayout for the breadcrumb bar.
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicIntegeratomicCounterprivate JBreadcrumbBar<java.lang.Object>breadcrumbBarThe associated breadcrumb bar.private java.util.LinkedList<JCommandButton>buttonStackprivate JIndeterminateCircularProgresscircularProgressprivate java.util.LinkedList<Command>commandStackprivate java.awt.event.ComponentListenercomponentListenerprivate booleanisShowingProgressprivate javax.swing.TimerloadingTimerprivate javax.swing.JPanelmainPanelprivate java.util.LinkedList<java.lang.Object>modelStackContains the item path.private javax.swing.SwingWorker<java.lang.Void,java.lang.Object>pathChangeWorkerprivate BreadcrumbPathListener<java.lang.Object>pathListenerprivate intpreferredHeightprivate JScrollablePanel<javax.swing.JPanel>scrollerPanel
-
Constructor Summary
Constructors Constructor Description BasicBreadcrumbBarUI()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidconfigureBreadcrumbButton(JCommandButton button)private voidconfigureMainAction(Command command, BreadcrumbItem<java.lang.Object> bi)private voidconfigurePopupAction(Command command, BreadcrumbItemChoices<java.lang.Object> bic)private voidconfigurePopupRollover(JCommandButton button)protected java.awt.LayoutManagercreateLayoutManager()Invoked byinstallUIto create a layout manager object to manage theJBreadcrumbBar.private voidinitAndRunPathChangeWorker(int indexOfFirstChange)protected voidinstallComponents(JBreadcrumbBar<?> bar)protected voidinstallDefaults(JBreadcrumbBar<?> bar)protected voidinstallListeners(JBreadcrumbBar<?> bar)voidinstallUI(javax.swing.JComponent c)protected java.lang.ObjectpushChoice(BreadcrumbItem bi)Pushes an item to the top position of the stack.private java.lang.ObjectpushChoices(BreadcrumbItemChoices<java.lang.Object> bic)Pushes a choice to the top position of the stack.private java.lang.ObjectpushChoices(BreadcrumbItemChoices<java.lang.Object> bic, boolean toUpdateUI)Pushes a choice to the top position of the stack.private voidstartLoadingTimer()private voidstopLoadingTimer()protected voiduninstallComponents(JBreadcrumbBar<?> bar)protected voiduninstallDefaults(JBreadcrumbBar<?> bar)protected voiduninstallListeners(JBreadcrumbBar<?> bar)voiduninstallUI(javax.swing.JComponent c)protected voidupdateComponents()
-
-
-
Field Detail
-
breadcrumbBar
private JBreadcrumbBar<java.lang.Object> breadcrumbBar
The associated breadcrumb bar.
-
circularProgress
private JIndeterminateCircularProgress circularProgress
-
mainPanel
private javax.swing.JPanel mainPanel
-
scrollerPanel
private JScrollablePanel<javax.swing.JPanel> scrollerPanel
-
componentListener
private java.awt.event.ComponentListener componentListener
-
modelStack
private java.util.LinkedList<java.lang.Object> modelStack
Contains the item path.
-
buttonStack
private java.util.LinkedList<JCommandButton> buttonStack
-
commandStack
private java.util.LinkedList<Command> commandStack
-
pathListener
private BreadcrumbPathListener<java.lang.Object> pathListener
-
atomicCounter
private java.util.concurrent.atomic.AtomicInteger atomicCounter
-
loadingTimer
private javax.swing.Timer loadingTimer
-
isShowingProgress
private boolean isShowingProgress
-
pathChangeWorker
private javax.swing.SwingWorker<java.lang.Void,java.lang.Object> pathChangeWorker
-
preferredHeight
private int preferredHeight
-
-
Method Detail
-
installUI
public void installUI(javax.swing.JComponent c)
- Overrides:
installUIin classjavax.swing.plaf.ComponentUI
-
uninstallUI
public void uninstallUI(javax.swing.JComponent c)
- Overrides:
uninstallUIin classjavax.swing.plaf.ComponentUI
-
installDefaults
protected void installDefaults(JBreadcrumbBar<?> bar)
-
installComponents
protected void installComponents(JBreadcrumbBar<?> bar)
-
installListeners
protected void installListeners(JBreadcrumbBar<?> bar)
-
initAndRunPathChangeWorker
private void initAndRunPathChangeWorker(int indexOfFirstChange)
-
uninstallDefaults
protected void uninstallDefaults(JBreadcrumbBar<?> bar)
-
uninstallComponents
protected void uninstallComponents(JBreadcrumbBar<?> bar)
-
uninstallListeners
protected void uninstallListeners(JBreadcrumbBar<?> bar)
-
startLoadingTimer
private void startLoadingTimer()
-
stopLoadingTimer
private void stopLoadingTimer()
-
createLayoutManager
protected java.awt.LayoutManager createLayoutManager()
Invoked byinstallUIto create a layout manager object to manage theJBreadcrumbBar.- Returns:
- a layout manager object
- See Also:
BasicBreadcrumbBarUI.BreadcrumbBarLayout
-
updateComponents
protected void updateComponents()
-
configureMainAction
private void configureMainAction(Command command, BreadcrumbItem<java.lang.Object> bi)
-
configurePopupAction
private void configurePopupAction(Command command, BreadcrumbItemChoices<java.lang.Object> bic)
-
configurePopupRollover
private void configurePopupRollover(JCommandButton button)
-
configureBreadcrumbButton
private void configureBreadcrumbButton(JCommandButton button)
-
pushChoices
private java.lang.Object pushChoices(BreadcrumbItemChoices<java.lang.Object> bic)
Pushes a choice to the top position of the stack. If the current top is already aBreadcrumbItemChoices, replace it.- Parameters:
bic- The choice item to push.- Returns:
- The item that has been pushed.
-
pushChoices
private java.lang.Object pushChoices(BreadcrumbItemChoices<java.lang.Object> bic, boolean toUpdateUI)
Pushes a choice to the top position of the stack. If the current top is already aBreadcrumbItemChoices, replace it.- Parameters:
bic- The choice item to push.toUpdateUI- Indication whether the bar should be repainted.- Returns:
- The item that has been pushed.
-
pushChoice
protected java.lang.Object pushChoice(BreadcrumbItem bi)
Pushes an item to the top position of the stack. If the current top is already aBreadcrumbItemChoices, replace it.- Parameters:
bi- The item to push.- Returns:
- The item that has been pushed.
-
-