|
|
|
@ -57,18 +57,18 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
|
|
|
|
|
|
|
|
|
|
JPanel categoryPane = new JPanel(new BorderLayout(4,0)); |
|
|
|
|
categoryPane.setBorder(BorderFactory.createMatteBorder(0, 0, 6, 1, getBackground())); |
|
|
|
|
UILabel categoryLabel = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Category_Name") + ":", SwingConstants.RIGHT) ; |
|
|
|
|
categoryLabel.setPreferredSize(new Dimension(75,20)); |
|
|
|
|
UILabel categoryLabel = new BoldFontTextLabel(Inter.getLocText("FR-Chart-Category_Name") + ":", SwingConstants.RIGHT) ; |
|
|
|
|
categoryLabel.setPreferredSize(new Dimension(75,20)); |
|
|
|
|
|
|
|
|
|
addButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png")); |
|
|
|
|
addButton.setPreferredSize(new Dimension(20, 20)); |
|
|
|
|
addButton = new UIButton(BaseUtils.readIcon("/com/fr/design/images/buttonicon/add.png")); |
|
|
|
|
addButton.setPreferredSize(new Dimension(20, 20)); |
|
|
|
|
|
|
|
|
|
categoryPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{categoryCombox, addButton,null,categoryLabel,null})); |
|
|
|
|
categoryPane.add(GUICoreUtils.createBorderLayoutPane(new Component[]{categoryCombox, addButton,null,categoryLabel,null})); |
|
|
|
|
|
|
|
|
|
boxPane = new JPanel(); |
|
|
|
|
boxPane.setLayout(new BoxLayout(boxPane, BoxLayout.Y_AXIS)); |
|
|
|
|
boxPane = new JPanel(); |
|
|
|
|
boxPane.setLayout(new BoxLayout(boxPane, BoxLayout.Y_AXIS)); |
|
|
|
|
|
|
|
|
|
categoryPane.add(boxPane, BorderLayout.SOUTH); |
|
|
|
|
categoryPane.add(boxPane, BorderLayout.SOUTH); |
|
|
|
|
|
|
|
|
|
this.setLayout(new BorderLayout()); |
|
|
|
|
this.add(categoryPane, BorderLayout.NORTH); |
|
|
|
@ -104,37 +104,37 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private UIComboBox addNewCombox() { |
|
|
|
|
final JPanel buttonPane = new JPanel(); |
|
|
|
|
buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 2)); |
|
|
|
|
final JPanel buttonPane = new JPanel(); |
|
|
|
|
buttonPane.setLayout(new FlowLayout(FlowLayout.RIGHT, 0, 2)); |
|
|
|
|
|
|
|
|
|
final UIComboBox combox = new UIComboBox(); |
|
|
|
|
combox.setPreferredSize(new Dimension(COMBOX_WIDTH, COMBOX_HEIGHT)); |
|
|
|
|
final UIComboBox combox = new UIComboBox(); |
|
|
|
|
combox.setPreferredSize(new Dimension(COMBOX_WIDTH, COMBOX_HEIGHT)); |
|
|
|
|
|
|
|
|
|
int count = categoryCombox.getItemCount(); |
|
|
|
|
for(int i = 0; i < count; i++) { |
|
|
|
|
combox.addItem(categoryCombox.getItemAt(i)); |
|
|
|
|
} |
|
|
|
|
int count = categoryCombox.getItemCount(); |
|
|
|
|
for(int i = 0; i < count; i++) { |
|
|
|
|
combox.addItem(categoryCombox.getItemAt(i)); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
combox.registerChangeListener(uiobListener); |
|
|
|
|
combox.addItemListener(new ItemListener() { |
|
|
|
|
combox.registerChangeListener(uiobListener); |
|
|
|
|
combox.addItemListener(new ItemListener() { |
|
|
|
|
@Override |
|
|
|
|
public void itemStateChanged(ItemEvent e) { |
|
|
|
|
makeToolTipUse(combox); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
|
|
|
|
|
combox.setSelectedItem(categoryCombox.getItemAt(0)); |
|
|
|
|
makeToolTipUse(combox); |
|
|
|
|
combox.setSelectedItem(categoryCombox.getItemAt(0)); |
|
|
|
|
makeToolTipUse(combox); |
|
|
|
|
|
|
|
|
|
buttonPane.add(combox); |
|
|
|
|
UIButton delButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/toolbarbtn/close.png")); |
|
|
|
|
buttonPane.add(delButton); |
|
|
|
|
boxPane.add(buttonPane); |
|
|
|
|
boxList.add(combox); |
|
|
|
|
buttonPane.add(combox); |
|
|
|
|
UIButton delButton = new UIButton(BaseUtils.readIcon("com/fr/design/images/toolbarbtn/close.png")); |
|
|
|
|
buttonPane.add(delButton); |
|
|
|
|
boxPane.add(buttonPane); |
|
|
|
|
boxList.add(combox); |
|
|
|
|
|
|
|
|
|
checkComponent(); |
|
|
|
|
|
|
|
|
|
delButton.addActionListener(new ActionListener() { |
|
|
|
|
delButton.addActionListener(new ActionListener() { |
|
|
|
|
@Override |
|
|
|
|
public void actionPerformed(ActionEvent e) { |
|
|
|
|
boxPane.remove(buttonPane); |
|
|
|
@ -143,9 +143,9 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
|
|
|
|
|
relayoutPane(); |
|
|
|
|
} |
|
|
|
|
}); |
|
|
|
|
delButton.registerChangeListener(uiobListener); |
|
|
|
|
delButton.registerChangeListener(uiobListener); |
|
|
|
|
|
|
|
|
|
return combox; |
|
|
|
|
return combox; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
private void checkAddButton() { |
|
|
|
@ -172,13 +172,13 @@ public class CategoryPlotMoreCateTableDataContentPane extends CategoryPlotTableD
|
|
|
|
|
checkComponent(); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
protected void refreshBoxListWithSelectTableData(List list) { |
|
|
|
|
super.refreshBoxListWithSelectTableData(list); |
|
|
|
|
protected void refreshBoxListWithSelectTableData(List list) { |
|
|
|
|
super.refreshBoxListWithSelectTableData(list); |
|
|
|
|
|
|
|
|
|
for(int i = 0, size = boxList.size(); i < size; i++) { |
|
|
|
|
refreshBoxItems(boxList.get(i), list); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
for(int i = 0, size = boxList.size(); i < size; i++) { |
|
|
|
|
refreshBoxItems(boxList.get(i), list); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
* 给组件登记一个观察者监听事件 |
|
|
|
|