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 class
BasicBreadcrumbBarUI.BreadcrumbBarLayout
Layout for the breadcrumb bar.
-
Field Summary
Fields Modifier and Type Field Description private java.util.concurrent.atomic.AtomicInteger
atomicCounter
private JBreadcrumbBar<java.lang.Object>
breadcrumbBar
The associated breadcrumb bar.private java.util.LinkedList<JCommandButton>
buttonStack
private JIndeterminateCircularProgress
circularProgress
private java.util.LinkedList<Command>
commandStack
private java.awt.event.ComponentListener
componentListener
private boolean
isShowingProgress
private javax.swing.Timer
loadingTimer
private javax.swing.JPanel
mainPanel
private java.util.LinkedList<java.lang.Object>
modelStack
Contains the item path.private javax.swing.SwingWorker<java.lang.Void,java.lang.Object>
pathChangeWorker
private BreadcrumbPathListener<java.lang.Object>
pathListener
private int
preferredHeight
private 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 void
configureBreadcrumbButton(JCommandButton button)
private void
configureMainAction(Command command, BreadcrumbItem<java.lang.Object> bi)
private void
configurePopupAction(Command command, BreadcrumbItemChoices<java.lang.Object> bic)
private void
configurePopupRollover(JCommandButton button)
protected java.awt.LayoutManager
createLayoutManager()
Invoked byinstallUI
to create a layout manager object to manage theJBreadcrumbBar
.private void
initAndRunPathChangeWorker(int indexOfFirstChange)
protected void
installComponents(JBreadcrumbBar<?> bar)
protected void
installDefaults(JBreadcrumbBar<?> bar)
protected void
installListeners(JBreadcrumbBar<?> bar)
void
installUI(javax.swing.JComponent c)
protected java.lang.Object
pushChoice(BreadcrumbItem bi)
Pushes an item to the top position of the stack.protected java.lang.Object
pushChoices(BreadcrumbItemChoices<java.lang.Object> bic)
Pushes a choice to the top position of the stack.protected java.lang.Object
pushChoices(BreadcrumbItemChoices<java.lang.Object> bic, boolean toUpdateUI)
Pushes a choice to the top position of the stack.private void
startLoadingTimer()
private void
stopLoadingTimer()
protected void
uninstallComponents(JBreadcrumbBar<?> bar)
protected void
uninstallDefaults(JBreadcrumbBar<?> bar)
protected void
uninstallListeners(JBreadcrumbBar<?> bar)
void
uninstallUI(javax.swing.JComponent c)
protected void
updateComponents()
-
-
-
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:
installUI
in classjavax.swing.plaf.ComponentUI
-
uninstallUI
public void uninstallUI(javax.swing.JComponent c)
- Overrides:
uninstallUI
in 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 byinstallUI
to 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
protected 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
protected 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.
-
-