New 'blue' look and feel for icons
@ -864,24 +864,20 @@ public class CompositionPanel extends GeneralPanel {
|
||||
|
||||
GrendelToolBar toolBar = new GrendelToolBar();
|
||||
|
||||
addToolbarButton(toolBar, new SendNow(),
|
||||
toolBar.addButton( new SendNow(),
|
||||
"send", "Send", "Send this message");
|
||||
addToolbarButton(toolBar, new QuoteOriginalText(),
|
||||
"quote", "Quote", "Quote the previous document");
|
||||
addToolbarButton(toolBar, new SelectAddresses(),
|
||||
toolBar.addButton( new SelectAddresses(),
|
||||
"address", "Address", "Address this message");
|
||||
addToolbarButton(toolBar, new AttachFile(),
|
||||
toolBar.addButton( new AttachFile(),
|
||||
"attach", "Attach", "Include an attachment");
|
||||
addToolbarButton(toolBar, null,
|
||||
toolBar.addButton( null,
|
||||
"spelling", "Spelling", "Check Spelling");
|
||||
addToolbarButton(toolBar, new SaveDraft(),
|
||||
toolBar.addButton( new SaveDraft(),
|
||||
"save", "Save", "Save this message as a draft");
|
||||
addToolbarButton(toolBar, null,
|
||||
"security", "Security", "Show security Information");
|
||||
addToolbarButton(toolBar, null,
|
||||
toolBar.addButton( null,
|
||||
"print", "Print", "Print this message");
|
||||
toolBar.addButton( null,
|
||||
"stop", "Stop", "Stop the current Transfer (ESC)" );
|
||||
//addToolbarButton(toolBar, new AddSignatureAction(),
|
||||
// "signature", "Add the signature of the current personality" );
|
||||
|
||||
return toolBar;
|
||||
}
|
||||
|
@ -121,23 +121,21 @@ public class GeneralPanel extends JPanel {
|
||||
res = new GrendelToolBar();
|
||||
// res.setLayout(new ToolBarLayout());
|
||||
|
||||
ResourceBundle resources = ResourceBundle.getBundle(fResourceBase + ".Menus");
|
||||
String toolbar = resources.getString(aToolbar);
|
||||
ResourceBundle toolbarresources = ResourceBundle.getBundle(fResourceBase + ".Toolbar");
|
||||
ResourceBundle menuresources = ResourceBundle.getBundle(fResourceBase + ".Menus");
|
||||
String toolbar = menuresources.getString(aToolbar);
|
||||
StringTokenizer tokens = new StringTokenizer(toolbar, " ", false);
|
||||
while (tokens.hasMoreTokens()) {
|
||||
String token = tokens.nextToken();
|
||||
if (DEBUG) {
|
||||
System.out.println("Local token = " + token);
|
||||
}
|
||||
JButton button = makeToolbarButton(token);
|
||||
UIAction action = (UIAction)commands.get(token);
|
||||
|
||||
if (action != null) {
|
||||
button.addActionListener(action);
|
||||
} else {
|
||||
button.setEnabled(false);
|
||||
}
|
||||
res.add(button);
|
||||
String icon = toolbarresources.getString(token + "Icon");
|
||||
String label = toolbarresources.getString(token + "Label");
|
||||
String tooltip = toolbarresources.getString(token + "Tooltip");
|
||||
|
||||
res.addButton(action, icon, label, tooltip);
|
||||
}
|
||||
} catch (MissingResourceException e) {
|
||||
System.err.println(e);
|
||||
|
@ -16,12 +16,30 @@
|
||||
# (C) 1999 Edwin Woudt. All Rights Reserved.
|
||||
#
|
||||
|
||||
msgGetNew=Get Msg
|
||||
msgNew=New Msg
|
||||
msgReply=Reply
|
||||
msgForward=Forward
|
||||
markAllRead=Mark Rd
|
||||
print=Print
|
||||
msgDelete=Delete
|
||||
stop=Stop
|
||||
msgGetNewLabel=Get Msg
|
||||
msgNewLabel=New Msg
|
||||
msgReplyLabel=Reply
|
||||
msgForwardLabel=Forward
|
||||
markAllReadLabel=Mark Rd
|
||||
printLabel=Print
|
||||
msgDeleteLabel=Delete
|
||||
stopLabel=Stop
|
||||
|
||||
msgGetNewIcon=getmsg
|
||||
msgNewIcon=newmsg
|
||||
msgReplyIcon=reply
|
||||
msgForwardIcon=forward
|
||||
markAllReadIcon=markallread
|
||||
printIcon=print
|
||||
msgDeleteIcon=delete
|
||||
stopIcon=stop
|
||||
|
||||
msgGetNewTooltip=Get new messages
|
||||
msgNewTooltip=Compose a new message
|
||||
msgReplyTooltip=Reply
|
||||
msgForwardTooltip=Forward
|
||||
markAllReadTooltip=Mark all messages read
|
||||
printTooltip=Print this message
|
||||
msgDeleteTooltip=Delete this message
|
||||
stopTooltip=Stop the current action (ESC)
|
||||
|
||||
|
@ -16,15 +16,25 @@
|
||||
* <talisman@anamorphic.com>. Portions created by Jeff Galyan are
|
||||
* Copyright (C) 1997 Jeff Galyan. All Rights Reserved.
|
||||
*
|
||||
* Contributors: Edwin Woudt <edwin@woudt.nl>
|
||||
*/
|
||||
|
||||
package grendel.widgets;
|
||||
|
||||
import java.awt.Dimension;
|
||||
import java.awt.Font;
|
||||
import java.awt.GridBagConstraints;
|
||||
import java.awt.Insets;
|
||||
|
||||
import java.net.URL;
|
||||
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JToolBar;
|
||||
import javax.swing.JButton;
|
||||
|
||||
import grendel.ui.ToolBarLayout;
|
||||
import grendel.ui.UIAction;
|
||||
|
||||
import grendel.widgets.Animation;
|
||||
import grendel.widgets.Spring;
|
||||
@ -44,5 +54,56 @@ public class GrendelToolBar extends JToolBar {
|
||||
return layout.createSpring();
|
||||
}
|
||||
|
||||
public void addButton(UIAction aActionListener,
|
||||
String aImageName,
|
||||
String aText,
|
||||
String aToolTip) {
|
||||
JButton b = new JButton();
|
||||
|
||||
b.setHorizontalTextPosition(JButton.CENTER);
|
||||
b.setVerticalTextPosition(JButton.BOTTOM);
|
||||
Font f=b.getFont();
|
||||
Font nf=new Font(f.getName(), Font.PLAIN, f.getSize()-1);
|
||||
b.setFont(nf);
|
||||
b.setText(aText);
|
||||
|
||||
b.setRolloverEnabled(true);
|
||||
b.setBorder(BorderFactory.createEmptyBorder());
|
||||
b.setMargin(new Insets(5,5,5,5));
|
||||
b.setToolTipText(aToolTip);
|
||||
|
||||
System.out.println(aImageName);
|
||||
|
||||
URL iconUrl = getClass().getResource("toolbar/mozilla/" + aImageName + ".gif");
|
||||
b.setIcon(new ImageIcon(iconUrl));
|
||||
//iconUrl = getClass().getResource("toolbar/mozilla/" + aImageName + "-disabled.gif");
|
||||
//b.setDisabledIcon(new ImageIcon(iconUrl));
|
||||
//iconUrl = getClass().getResource("toolbar/mozilla/" + aImageName + "-pressed.gif");
|
||||
//b.setPressedIcon(new ImageIcon(iconUrl));
|
||||
//iconUrl = getClass().getResource("toolbar/mozilla/" + aImageName + "-rollover.gif");
|
||||
//b.setRolloverIcon(new ImageIcon(iconUrl));
|
||||
|
||||
Dimension d=b.getPreferredSize();
|
||||
System.out.println(d.getWidth());
|
||||
System.out.println(d.getHeight());
|
||||
double w=d.getWidth();
|
||||
if (w > 48) {
|
||||
d.setSize(w, 38);
|
||||
} else {
|
||||
d.setSize(48, 38);
|
||||
}
|
||||
b.setMinimumSize(d);
|
||||
b.setMaximumSize(d);
|
||||
b.setPreferredSize(d);
|
||||
|
||||
if (aActionListener != null) {
|
||||
b.addActionListener(aActionListener);
|
||||
} else {
|
||||
b.setEnabled(false);
|
||||
}
|
||||
|
||||
add(b);
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
BIN
grendel/widgets/toolbar/mozilla/address.gif
Normal file
After Width: | Height: | Size: 922 B |
BIN
grendel/widgets/toolbar/mozilla/attach.gif
Normal file
After Width: | Height: | Size: 895 B |
BIN
grendel/widgets/toolbar/mozilla/copy.gif
Normal file
After Width: | Height: | Size: 913 B |
BIN
grendel/widgets/toolbar/mozilla/delete.gif
Normal file
After Width: | Height: | Size: 887 B |
BIN
grendel/widgets/toolbar/mozilla/expunge.gif
Normal file
After Width: | Height: | Size: 897 B |
BIN
grendel/widgets/toolbar/mozilla/expunge1.gif
Normal file
After Width: | Height: | Size: 894 B |
BIN
grendel/widgets/toolbar/mozilla/expunge2.gif
Normal file
After Width: | Height: | Size: 913 B |
BIN
grendel/widgets/toolbar/mozilla/expunge3.gif
Normal file
After Width: | Height: | Size: 902 B |
BIN
grendel/widgets/toolbar/mozilla/expunge4.gif
Normal file
After Width: | Height: | Size: 899 B |
BIN
grendel/widgets/toolbar/mozilla/file.gif
Normal file
After Width: | Height: | Size: 906 B |
BIN
grendel/widgets/toolbar/mozilla/forward.gif
Normal file
After Width: | Height: | Size: 905 B |
BIN
grendel/widgets/toolbar/mozilla/getmsg.gif
Normal file
After Width: | Height: | Size: 912 B |
BIN
grendel/widgets/toolbar/mozilla/ignorethread.gif
Normal file
After Width: | Height: | Size: 911 B |
BIN
grendel/widgets/toolbar/mozilla/markallread.gif
Normal file
After Width: | Height: | Size: 921 B |
BIN
grendel/widgets/toolbar/mozilla/markread.gif
Normal file
After Width: | Height: | Size: 909 B |
BIN
grendel/widgets/toolbar/mozilla/markthreadread.gif
Normal file
After Width: | Height: | Size: 911 B |
BIN
grendel/widgets/toolbar/mozilla/markunread.gif
Normal file
After Width: | Height: | Size: 899 B |
BIN
grendel/widgets/toolbar/mozilla/move.gif
Normal file
After Width: | Height: | Size: 907 B |
BIN
grendel/widgets/toolbar/mozilla/move2.gif
Normal file
After Width: | Height: | Size: 906 B |
BIN
grendel/widgets/toolbar/mozilla/newcard.gif
Normal file
After Width: | Height: | Size: 909 B |
BIN
grendel/widgets/toolbar/mozilla/newlist.gif
Normal file
After Width: | Height: | Size: 925 B |
BIN
grendel/widgets/toolbar/mozilla/newmsg.gif
Normal file
After Width: | Height: | Size: 904 B |
BIN
grendel/widgets/toolbar/mozilla/newpost.gif
Normal file
After Width: | Height: | Size: 916 B |
BIN
grendel/widgets/toolbar/mozilla/newpost2.gif
Normal file
After Width: | Height: | Size: 917 B |
BIN
grendel/widgets/toolbar/mozilla/nextfolder.gif
Normal file
After Width: | Height: | Size: 893 B |
BIN
grendel/widgets/toolbar/mozilla/nextmsg.gif
Normal file
After Width: | Height: | Size: 893 B |
BIN
grendel/widgets/toolbar/mozilla/nextthread.gif
Normal file
After Width: | Height: | Size: 903 B |
BIN
grendel/widgets/toolbar/mozilla/nextunreadfolder.gif
Normal file
After Width: | Height: | Size: 913 B |
BIN
grendel/widgets/toolbar/mozilla/nextunreadmsg.gif
Normal file
After Width: | Height: | Size: 913 B |
BIN
grendel/widgets/toolbar/mozilla/nextunreadthread.gif
Normal file
After Width: | Height: | Size: 920 B |
BIN
grendel/widgets/toolbar/mozilla/offline.gif
Normal file
After Width: | Height: | Size: 885 B |
BIN
grendel/widgets/toolbar/mozilla/online.gif
Normal file
After Width: | Height: | Size: 884 B |
BIN
grendel/widgets/toolbar/mozilla/prevfolder.gif
Normal file
After Width: | Height: | Size: 891 B |
BIN
grendel/widgets/toolbar/mozilla/prevmsg.gif
Normal file
After Width: | Height: | Size: 896 B |
BIN
grendel/widgets/toolbar/mozilla/prevthread.gif
Normal file
After Width: | Height: | Size: 894 B |
BIN
grendel/widgets/toolbar/mozilla/prevunreadfolder.gif
Normal file
After Width: | Height: | Size: 911 B |
BIN
grendel/widgets/toolbar/mozilla/prevunreadmsg.gif
Normal file
After Width: | Height: | Size: 915 B |
BIN
grendel/widgets/toolbar/mozilla/prevunreadthread.gif
Normal file
After Width: | Height: | Size: 913 B |
BIN
grendel/widgets/toolbar/mozilla/print.gif
Normal file
After Width: | Height: | Size: 888 B |
BIN
grendel/widgets/toolbar/mozilla/properties.gif
Normal file
After Width: | Height: | Size: 912 B |
BIN
grendel/widgets/toolbar/mozilla/properties2.gif
Normal file
After Width: | Height: | Size: 915 B |
BIN
grendel/widgets/toolbar/mozilla/reply.gif
Normal file
After Width: | Height: | Size: 900 B |
BIN
grendel/widgets/toolbar/mozilla/replyall.gif
Normal file
After Width: | Height: | Size: 907 B |
BIN
grendel/widgets/toolbar/mozilla/replyboth.gif
Normal file
After Width: | Height: | Size: 918 B |
BIN
grendel/widgets/toolbar/mozilla/replyboth2.gif
Normal file
After Width: | Height: | Size: 917 B |
BIN
grendel/widgets/toolbar/mozilla/replygroup.gif
Normal file
After Width: | Height: | Size: 912 B |
BIN
grendel/widgets/toolbar/mozilla/replygroup2.gif
Normal file
After Width: | Height: | Size: 916 B |
BIN
grendel/widgets/toolbar/mozilla/replyprivate.gif
Normal file
After Width: | Height: | Size: 921 B |
BIN
grendel/widgets/toolbar/mozilla/save.gif
Normal file
After Width: | Height: | Size: 916 B |
BIN
grendel/widgets/toolbar/mozilla/send.gif
Normal file
After Width: | Height: | Size: 889 B |
BIN
grendel/widgets/toolbar/mozilla/spelling.gif
Normal file
After Width: | Height: | Size: 893 B |
BIN
grendel/widgets/toolbar/mozilla/stop.gif
Normal file
After Width: | Height: | Size: 896 B |
BIN
grendel/widgets/toolbar/mozilla/synchronize.gif
Normal file
After Width: | Height: | Size: 915 B |
BIN
grendel/widgets/toolbar/mozilla/watchthread.gif
Normal file
After Width: | Height: | Size: 908 B |