MoMeak 7 years ago
parent
commit
8fcd901660
  1. 2
      designer/src/com/fr/design/expand/SortExpandAttrPane.java
  2. 4
      designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java

2
designer/src/com/fr/design/expand/SortExpandAttrPane.java

@ -30,7 +30,7 @@ public class SortExpandAttrPane extends JPanel {
{BaseUtils.readIcon("/com/fr/design/images/expand/des.png"), BaseUtils.readIcon("/com/fr/design/images/expand/des_selected.png")} {BaseUtils.readIcon("/com/fr/design/images/expand/des.png"), BaseUtils.readIcon("/com/fr/design/images/expand/des_selected.png")}
}; };
String[] nameArray = { Inter.getLocText("Sort-Original"), Inter.getLocText("Sort-Ascending"), Inter.getLocText("Sort-Descending") }; String[] nameArray = { Inter.getLocText("Sort-Original"), Inter.getLocText("Sort-Ascending"), Inter.getLocText("Sort-Descending") };
sort_type_pane = new UIButtonGroup(iconArray, null); sort_type_pane = new UIButtonGroup(iconArray);
sort_type_pane.setAllToolTips(nameArray); sort_type_pane.setAllToolTips(nameArray);
sort_type_pane.setGlobalName(Inter.getLocText("ExpandD-Sort_After_Expand")); sort_type_pane.setGlobalName(Inter.getLocText("ExpandD-Sort_After_Expand"));
this.add(sort_type_pane, BorderLayout.NORTH); this.add(sort_type_pane, BorderLayout.NORTH);

4
designer_base/src/com/fr/design/gui/ibutton/UIButtonGroup.java

@ -44,6 +44,10 @@ public class UIButtonGroup<T> extends JPanel implements GlobalNameObserver {
this(iconArray, null); this(iconArray, null);
} }
public UIButtonGroup(Icon[][] iconArray) {
this(iconArray, null);
}
public UIButtonGroup(Icon[] iconArray, T[] objects) { public UIButtonGroup(Icon[] iconArray, T[] objects) {
if (!ArrayUtils.isEmpty(objects) && iconArray.length == objects.length) { if (!ArrayUtils.isEmpty(objects) && iconArray.length == objects.length) {
this.objectList = Arrays.asList(objects); this.objectList = Arrays.asList(objects);

Loading…
Cancel
Save