psmith 2003/06/19 23:17:16 Modified: src/java/org/apache/log4j/chainsaw/icons ChainsawIcons.java src/java/org/apache/log4j/chainsaw ReceiversPanel.java Added: src/java/org/apache/log4j/chainsaw/icons New24.gif Edit16.gif Edit24.gif New16.gif Log: added New, and Edit Receiver icons, and action shells to the Receiver toolbar. Both icons enable/disable correctly according to selected node in the tree, but they both just say "Not implemented yet" right now. Receiver configuration dialogue coming. Revision Changes Path 1.21 +8 -0 jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/icons/ChainsawIcons.java Index: ChainsawIcons.java =================================================================== RCS file: /home/cvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/icons/ChainsawIcons.java,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- ChainsawIcons.java 20 Jun 2003 04:48:43 -0000 1.20 +++ ChainsawIcons.java 20 Jun 2003 06:17:16 -0000 1.21 @@ -148,6 +148,14 @@ ChainsawIcons.class.getClassLoader().getResource( BASE_ICON_PATH + "Stop16.gif");; + public static final URL ICON_NEW_RECEIVER = + ChainsawIcons.class.getClassLoader().getResource( + BASE_ICON_PATH + "New16.gif");; + + public static final URL ICON_EDIT_RECEIVER = + ChainsawIcons.class.getClassLoader().getResource( + BASE_ICON_PATH + "Edit16.gif");; + public static final URL ICON_RESUME_RECEIVER = ICON_ACTIVE_RECEIVER; 1.1 jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/icons/New24.gif <<Binary file>> 1.1 jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/icons/Edit16.gif <<Binary file>> 1.1 jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/icons/Edit24.gif <<Binary file>> 1.1 jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/icons/New16.gif <<Binary file>> 1.10 +41 -0 jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/ReceiversPanel.java Index: ReceiversPanel.java =================================================================== RCS file: /home/cvs/jakarta-log4j-sandbox/src/java/org/apache/log4j/chainsaw/ReceiversPanel.java,v retrieving revision 1.9 retrieving revision 1.10 diff -u -r1.9 -r1.10 --- ReceiversPanel.java 20 Jun 2003 05:22:09 -0000 1.9 +++ ReceiversPanel.java 20 Jun 2003 06:17:16 -0000 1.10 @@ -333,10 +333,33 @@ final Action playReceiverButtonAction; final Action shutdownReceiverButtonAction; final Action pauseReceiverButtonAction; + + final Action newReceiverButtonAction; + final Action editReceiverButtonAction; private ReceiverToolbar() { setFloatable(false); + newReceiverButtonAction = + new AbstractAction() { + public void actionPerformed(ActionEvent e) { + JOptionPane.showMessageDialog(logui, "Not Implemented yet, sorry"); + } + }; + newReceiverButtonAction.putValue(Action.SMALL_ICON, new ImageIcon(ChainsawIcons.ICON_NEW_RECEIVER)); + newReceiverButtonAction.putValue(Action.SHORT_DESCRIPTION, "Creates and configures a new Receiver"); + newReceiverButtonAction.setEnabled(true); + + editReceiverButtonAction = + new AbstractAction() { + public void actionPerformed(ActionEvent e) { + JOptionPane.showMessageDialog(logui, "Not Implemented yet, sorry"); + } + }; + editReceiverButtonAction.putValue(Action.SMALL_ICON, new ImageIcon(ChainsawIcons.ICON_EDIT_RECEIVER)); + editReceiverButtonAction.putValue(Action.SHORT_DESCRIPTION, "Edits the configuration of the selected Receiver"); + editReceiverButtonAction.setEnabled(false); + playReceiverButtonAction = new AbstractAction() { public void actionPerformed(ActionEvent e) { @@ -390,6 +413,17 @@ SmallButton restartAllButton = new SmallButton(startAllAction); restartAllButton.setText(null); + SmallButton newReceiverButton = new SmallButton(newReceiverButtonAction); + newReceiverButton.setText(null); + + SmallButton editReceiverButton = new SmallButton(editReceiverButtonAction); + editReceiverButton.setText(null); + + + add(newReceiverButton); + add(editReceiverButton); + addSeparator(); + add(playReceiverButton); add(pauseReceiverButton); add(shutdownReceiverButton); @@ -426,15 +460,22 @@ shutdownReceiverButtonAction.setEnabled(true); pauseReceiverButtonAction.setEnabled(true); playReceiverButtonAction.setEnabled(false); + editReceiverButtonAction.setEnabled(true); + newReceiverButtonAction.setEnabled(false); + } else { shutdownReceiverButtonAction.setEnabled(false); pauseReceiverButtonAction.setEnabled(false); playReceiverButtonAction.setEnabled(true); + editReceiverButtonAction.setEnabled(true); + newReceiverButtonAction.setEnabled(false); } } else { shutdownReceiverButtonAction.setEnabled(false); pauseReceiverButtonAction.setEnabled(false); playReceiverButtonAction.setEnabled(false); + editReceiverButtonAction.setEnabled(false); + newReceiverButtonAction.setEnabled(true); } } }
--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]