|
|
|
@ -53,10 +53,6 @@ public class GroupPane extends JPanel {
|
|
|
|
|
private SharableWidgetProvider[] elCaseBindInfoList; |
|
|
|
|
private SortType sortType = WidgetSortType.INSTALL_TIME; |
|
|
|
|
|
|
|
|
|
private GroupPane(Group group) { |
|
|
|
|
this(group, DEFAULT_HEIGHT, group.isDefaultExpend()); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private GroupPane(Group group, boolean expendStatus) { |
|
|
|
|
this(group, DEFAULT_HEIGHT, expendStatus); |
|
|
|
|
} |
|
|
|
@ -90,7 +86,9 @@ public class GroupPane extends JPanel {
|
|
|
|
|
|
|
|
|
|
//按照筛选条件进行过滤
|
|
|
|
|
elCaseBindInfoList = LocalWidgetFilter.getInstance().filter(elCaseBindInfoList); |
|
|
|
|
boolean needExpendGroup = expendStatus || (isFiltering() && elCaseBindInfoList.length > 0); |
|
|
|
|
boolean needExpendGroup = expendStatus |
|
|
|
|
|| (isFiltering() && elCaseBindInfoList.length > 0) |
|
|
|
|
|| hasUpdatableWidget(); |
|
|
|
|
if (elCaseBindInfoList.length == 0 && isFiltering()) { |
|
|
|
|
this.setVisible(false); |
|
|
|
|
} |
|
|
|
@ -107,6 +105,16 @@ public class GroupPane extends JPanel {
|
|
|
|
|
expendGroup(needExpendGroup); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private boolean hasUpdatableWidget() { |
|
|
|
|
for (SharableWidgetProvider provider: elCaseBindInfoList) { |
|
|
|
|
boolean updatable = LocalWidgetRepoUpdater.getInstance().checkUpdatable(provider); |
|
|
|
|
if (updatable) { |
|
|
|
|
return true; |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
return false; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
public LocalWidgetSelectPane getWidgetListPane() { |
|
|
|
|
return contentPanel; |
|
|
|
|
} |
|
|
|
@ -375,7 +383,7 @@ public class GroupPane extends JPanel {
|
|
|
|
|
DEFAULT { |
|
|
|
|
@Override |
|
|
|
|
public GroupPane creteGroupPane(Group group) { |
|
|
|
|
return new GroupPane(group); |
|
|
|
|
return new GroupPane(group, group.isDefaultExpend()); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
EXPANDED { |
|
|
|
@ -384,7 +392,7 @@ public class GroupPane extends JPanel {
|
|
|
|
|
return new GroupPane(group, true); |
|
|
|
|
} |
|
|
|
|
}, |
|
|
|
|
CLOSURE { |
|
|
|
|
COLLAPSED { |
|
|
|
|
@Override |
|
|
|
|
public GroupPane creteGroupPane(Group group) { |
|
|
|
|
return new GroupPane(group, false); |
|
|
|
|