mirror of https://github.com/sipwise/jitsi.git
parent
fe7db0c9b1
commit
ed2a57ae16
@ -0,0 +1,30 @@
|
||||
package net.java.sip.communicator.impl.gui.main.customcontrols;
|
||||
|
||||
import java.awt.Graphics;
|
||||
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.JMenu;
|
||||
|
||||
import net.java.sip.communicator.impl.gui.main.utils.AntialiasingManager;
|
||||
|
||||
public class AntialiasedMenu extends JMenu {
|
||||
|
||||
public AntialiasedMenu(String text){
|
||||
|
||||
super(text);
|
||||
}
|
||||
|
||||
public AntialiasedMenu(String text, Icon icon){
|
||||
|
||||
super(text);
|
||||
|
||||
this.setIcon(icon);
|
||||
}
|
||||
|
||||
public void paint(Graphics g){
|
||||
|
||||
AntialiasingManager.activateAntialiasing(g);
|
||||
|
||||
super.paint(g);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,26 @@
|
||||
package net.java.sip.communicator.impl.gui.main.customcontrols;
|
||||
|
||||
import java.awt.Graphics;
|
||||
|
||||
import javax.swing.Icon;
|
||||
import javax.swing.JMenuItem;
|
||||
|
||||
import net.java.sip.communicator.impl.gui.main.utils.AntialiasingManager;
|
||||
|
||||
public class AntialiasedMenuItem extends JMenuItem{
|
||||
|
||||
public AntialiasedMenuItem(String text){
|
||||
super(text);
|
||||
}
|
||||
|
||||
public AntialiasedMenuItem(String text, Icon icon){
|
||||
super(text, icon);
|
||||
}
|
||||
|
||||
public void paint(Graphics g){
|
||||
|
||||
AntialiasingManager.activateAntialiasing(g);
|
||||
|
||||
super.paint(g);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,22 @@
|
||||
package net.java.sip.communicator.impl.gui.main.customcontrols;
|
||||
|
||||
import java.awt.Graphics;
|
||||
import java.awt.LayoutManager;
|
||||
|
||||
import javax.swing.JPanel;
|
||||
|
||||
import net.java.sip.communicator.impl.gui.main.utils.AntialiasingManager;
|
||||
|
||||
public class AntialiasedPanel extends JPanel {
|
||||
|
||||
public AntialiasedPanel(LayoutManager layout){
|
||||
super(layout);
|
||||
}
|
||||
|
||||
public void paint(Graphics g){
|
||||
|
||||
AntialiasingManager.activateAntialiasing(g);
|
||||
|
||||
super.paint(g);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,82 @@
|
||||
package net.java.sip.communicator.impl.gui.main.customcontrols;
|
||||
|
||||
import java.awt.BorderLayout;
|
||||
import java.awt.FlowLayout;
|
||||
import java.awt.Frame;
|
||||
import java.awt.Graphics;
|
||||
|
||||
import javax.swing.BorderFactory;
|
||||
import javax.swing.ImageIcon;
|
||||
import javax.swing.JButton;
|
||||
import javax.swing.JCheckBox;
|
||||
import javax.swing.JDialog;
|
||||
import javax.swing.JLabel;
|
||||
import javax.swing.JPanel;
|
||||
|
||||
import net.java.sip.communicator.impl.gui.main.i18n.Messages;
|
||||
import net.java.sip.communicator.impl.gui.main.utils.AntialiasingManager;
|
||||
import net.java.sip.communicator.impl.gui.main.utils.Constants;
|
||||
|
||||
public class MessageDialog extends JDialog {
|
||||
|
||||
private JButton noButton = new JButton(Messages.getString("cancel"));
|
||||
private JButton yesButton = new JButton(Messages.getString("remove"));
|
||||
|
||||
private JCheckBox doNotAskAgain = new JCheckBox(Messages.getString("doNotAskAgain"));
|
||||
|
||||
private JLabel iconLabel = new JLabel(new ImageIcon(Constants.WARNING_ICON));
|
||||
|
||||
private JLabel messageLabel = new JLabel();
|
||||
|
||||
private AntialiasedPanel buttonsPanel = new AntialiasedPanel(new FlowLayout(FlowLayout.CENTER));
|
||||
|
||||
private AntialiasedPanel checkBoxPanel = new AntialiasedPanel(new FlowLayout(FlowLayout.LEADING));
|
||||
|
||||
private AntialiasedPanel messagePanel = new AntialiasedPanel(new BorderLayout(5, 5));
|
||||
|
||||
public MessageDialog(Frame owner){
|
||||
super(owner);
|
||||
|
||||
this.setLocationRelativeTo(owner);
|
||||
|
||||
this.setTitle(Messages.getString("removeContact"));
|
||||
|
||||
this.setModal(true);
|
||||
|
||||
this.setSize(Constants.OPTION_PANE_WIDTH, Constants.OPTION_PANE_HEIGHT);
|
||||
|
||||
this.getContentPane().setLayout(new BorderLayout(5, 5));
|
||||
|
||||
this.messagePanel.setBorder(BorderFactory.createEmptyBorder(10, 10, 0, 10));
|
||||
this.checkBoxPanel.setBorder(BorderFactory.createEmptyBorder(0, 10, 10, 10));
|
||||
|
||||
this.init();
|
||||
}
|
||||
|
||||
private void init(){
|
||||
|
||||
this.checkBoxPanel.add(doNotAskAgain);
|
||||
|
||||
this.buttonsPanel.add(yesButton);
|
||||
this.buttonsPanel.add(noButton);
|
||||
|
||||
this.messagePanel.add(iconLabel, BorderLayout.WEST);
|
||||
this.messagePanel.add(messageLabel, BorderLayout.CENTER);
|
||||
|
||||
this.getContentPane().add(messagePanel, BorderLayout.NORTH);
|
||||
this.getContentPane().add(checkBoxPanel, BorderLayout.CENTER);
|
||||
this.getContentPane().add(buttonsPanel, BorderLayout.SOUTH);
|
||||
|
||||
}
|
||||
|
||||
public void setMessage(String message) {
|
||||
this.messageLabel.setText(message);
|
||||
}
|
||||
|
||||
public void paint(Graphics g){
|
||||
|
||||
AntialiasingManager.activateAntialiasing(g);
|
||||
|
||||
super.paint(g);
|
||||
}
|
||||
}
|
||||
@ -0,0 +1,15 @@
|
||||
package net.java.sip.communicator.impl.gui.main.customcontrols;
|
||||
|
||||
import java.awt.Image;
|
||||
|
||||
import net.java.sip.communicator.impl.gui.main.utils.Constants;
|
||||
|
||||
public class MsgToolbarButton extends SIPCommButton {
|
||||
|
||||
|
||||
public MsgToolbarButton(Image iconImage){
|
||||
super( Constants.MSG_TOOLBAR_BUTTON_BG,
|
||||
Constants.MSG_TOOLBAR_ROLLOVER_BUTTON_BG,
|
||||
iconImage);
|
||||
}
|
||||
}
|
||||
Loading…
Reference in new issue