|
|
|
@ -81,6 +81,8 @@ public class FineBreadcrumbPane <T> extends Row {
|
|
|
|
|
int size = files.size(); |
|
|
|
|
currentCrumb = new BreadcrumbButton<>(getRootdata((T) files.get(size-1)), files.get(size-1)); |
|
|
|
|
add(currentCrumb); |
|
|
|
|
currentCrumb.setSelected(true); |
|
|
|
|
currentCrumb.setForeground(FineUIUtils.getUIColor("Button.breadcrumbSelectedForeground", "Button.breadcrumbSelectedForeground")); |
|
|
|
|
final int index = getComponentCount(); |
|
|
|
|
addBreadcrumbListener(currentCrumb, index, backListener); |
|
|
|
|
for (int i = size-2; i >= 0; i--) { |
|
|
|
@ -274,7 +276,7 @@ public class FineBreadcrumbPane <T> extends Row {
|
|
|
|
|
BreadcrumbButton.this.content = content; |
|
|
|
|
setMargin(new Insets(0, 0, 0, 0)); |
|
|
|
|
setBorder(BorderFactory.createEmptyBorder()); |
|
|
|
|
FineUIStyle.setStyle(BreadcrumbButton.this, FineUIStyle.PLAIN_BUTTON); |
|
|
|
|
FineUIStyle.setStyle(BreadcrumbButton.this, FineUIStyle.BREADCRUMB_BUTTON); |
|
|
|
|
setBorderPainted(false); |
|
|
|
|
setOpaque(false); |
|
|
|
|
} |
|
|
|
@ -297,6 +299,10 @@ public class FineBreadcrumbPane <T> extends Row {
|
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 节点点击关联动作监听器 |
|
|
|
|
* @param <T> |
|
|
|
|
*/ |
|
|
|
|
public interface BreadcrumbBackListener <T> { |
|
|
|
|
void onBreadcrumbBack(T data); |
|
|
|
|
} |
|
|
|
|