New 'blue' look and feel for icons

This commit is contained in:
edwin%woudt.nl 1999-04-17 23:53:53 +00:00
parent 698f9b8c42
commit d883d78698
58 changed files with 103 additions and 30 deletions

View File

@ -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;
}

View File

@ -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);

View File

@ -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)

View File

@ -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);
}
}

Binary file not shown.

After

Width:  |  Height:  |  Size: 922 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 895 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 913 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 887 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 897 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 913 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 902 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 899 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 906 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 905 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 912 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 921 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 899 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 906 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 909 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 925 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 904 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 903 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 913 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 913 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 920 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 885 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 884 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 891 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 896 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 894 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 911 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 915 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 913 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 888 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 912 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 915 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 900 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 907 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 918 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 917 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 912 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 921 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 916 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 889 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 893 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 896 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 915 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 908 B