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