About window

cusax-fix
Yana Stamcheva 20 years ago
parent 6e216c7127
commit 5cf790f2ca

@ -0,0 +1,70 @@
/*
* SIP Communicator, the OpenSource Java VoIP and Instant Messaging client.
*
* Distributable under LGPL license.
* See terms of license at gnu.org.
*/
package net.java.sip.communicator.impl.gui.main.menus;
import java.awt.event.*;
import javax.swing.*;
import net.java.sip.communicator.impl.gui.i18n.*;
import net.java.sip.communicator.impl.gui.main.*;
import net.java.sip.communicator.util.*;
/**
* The <tt>HelpMenu</tt> is a menu in the main application menu bar.
*
* @author Yana Stamcheva
*/
public class HelpMenu
extends JMenu
implements ActionListener
{
private Logger logger = Logger.getLogger(HelpMenu.class.getName());
private JMenuItem aboutItem
= new JMenuItem(Messages.getString("about"));
private MainFrame mainFrame;
/**
* Creates an instance of <tt>HelpMenu</tt>.
* @param parentWindow The parent <tt>MainFrame</tt>.
*/
public HelpMenu(MainFrame mainFrame) {
super(Messages.getString("help"));
this.mainFrame = mainFrame;
this.add(aboutItem);
this.aboutItem.setName("about");
this.aboutItem.addActionListener(this);
this.setMnemonic(Messages.getString("help").charAt(0));
this.aboutItem.setMnemonic(
Messages.getString("about").charAt(0));
}
/**
* Handles the <tt>ActionEvent</tt> when one of the menu items is selected.
*/
public void actionPerformed(ActionEvent e) {
JMenuItem menuItem = (JMenuItem) e.getSource();
String itemName = menuItem.getName();
if (itemName.equals("about")) {
AboutWindow aboutWindow = new AboutWindow(mainFrame);
aboutWindow.setVisible(true);
}
}
}

@ -29,7 +29,7 @@ public class MainMenu
private ViewMenu viewMenu;
private JMenu helpMenu = new JMenu();
private HelpMenu helpMenu;
/**
* Creates an instance of <tt>Menu</tt>.
@ -39,6 +39,7 @@ public MainMenu(MainFrame mainFrame)
this.fileMenu = new FileMenu(mainFrame);
this.toolsMenu = new ToolsMenu(mainFrame);
this.viewMenu = new ViewMenu(mainFrame);
this.helpMenu = new HelpMenu(mainFrame);
this.init();
}
@ -68,9 +69,6 @@ private void init()
this.add(toolsMenu);
this.add(viewMenu);
this.add(helpMenu);
// Disable all menus that are not yet implemented.
this.helpMenu.setEnabled(false);
}
/**

Binary file not shown.

After

Width:  |  Height:  |  Size: 24 KiB

@ -235,12 +235,17 @@ public class Constants {
*/
public static final Color BLUE_GRAY_BORDER_DARKER_COLOR = new Color(131, 149,
178);
/**
* Light gray color used in the look and feel.
*/
public static final Color LIGHT_GRAY_COLOR = new Color(200, 200, 200);
/**
* Dark blue color used in the About Window.
*/
public static final Color DARK_BLUE = new Color(23, 65, 125);
/*
* ======================================================================
* --------------------------- FONT CONSTANTS ---------------------------

@ -412,8 +412,11 @@ public class ImageLoader {
public static final ImageID EXCLAMATION_MARK
= new ImageID("EXCLAMATION_MARK");
/**
* The image used for about window background.
*/
public static final ImageID ABOUT_WINDOW_BACKGROUND
= new ImageID("ABOUT_WINDOW_BACKGROUND");
// ///////////////////// Edit Text Toolbar icons //////////////////////////

@ -185,3 +185,5 @@ INCOMING_CALL=net/java/sip/communicator/impl/gui/resources/common/incomingCall.p
OUTGOING_CALL=net/java/sip/communicator/impl/gui/resources/common/outgoingCall.png
EXCLAMATION_MARK=net/java/sip/communicator/impl/gui/resources/common/exclamationMark.png
ABOUT_WINDOW_BACKGROUND=net/java/sip/communicator/impl/gui/resources/common/aboutWindowBackground.png

Loading…
Cancel
Save