java.awt.Dialog.ModalExclusionType Java Examples

The following examples show how to use java.awt.Dialog.ModalExclusionType. You can vote up the ones you like or vote down the ones you don't like, and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example #1
Source File: ShowReport.java    From Hotel-Properties-Management-System with GNU General Public License v2.0 5 votes vote down vote up
public void loadReport(String reportName, ReportObject reportObject) {

		logging = LoggingEngine.getInstance();
		
		try {
			
			final InputStream inputStream = ShowReport.class
					.getResourceAsStream("/com/coder/hms/reportTemplates/" + reportName + ".jrxml");
			JasperReport report = JasperCompileManager.compileReport(inputStream);

			HashMap<String, Object> parameters = new HashMap<String, Object>();	
			List<ReportObject> list = new ArrayList<ReportObject>();
			list.add(reportObject);
			JRBeanCollectionDataSource beanColDataSource = new JRBeanCollectionDataSource(list);
			JasperPrint jasperPrint = JasperFillManager.fillReport(report, parameters, beanColDataSource);
			final JRViewer viewer = new JRViewer(jasperPrint);

			setType(Type.POPUP);
			setResizable(false);
			setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);
			this.setTitle("Reservation [Report]");
			this.setExtendedState(Frame.MAXIMIZED_BOTH);
			this.setAlwaysOnTop(isAlwaysOnTopSupported());
			this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
			getContentPane().setLayout(new BorderLayout());
			this.setIconImage(Toolkit.getDefaultToolkit().
					getImage(LoginWindow.class.getResource(LOGOPATH)));
			this.setResizable(false);
			getContentPane().add(viewer, BorderLayout.CENTER);

		} catch (JRException e) {
			logging.setMessage("JRException report error!");
		}

	}
 
Example #2
Source File: MyHeadlessToolkit.java    From ghidra with Apache License 2.0 4 votes vote down vote up
@Override
public boolean isModalExclusionTypeSupported(
		ModalExclusionType modalExclusionType) {
	return localToolKit.isModalExclusionTypeSupported(modalExclusionType);
}
 
Example #3
Source File: UtilitiesTest.java    From netbeans with Apache License 2.0 4 votes vote down vote up
@Override
public boolean isModalExclusionTypeSupported(ModalExclusionType modalExclusionType) {
    throw new UnsupportedOperationException("Not supported yet.");
}
 
Example #4
Source File: DialogFrame.java    From Hotel-Properties-Management-System with GNU General Public License v2.0 4 votes vote down vote up
public DialogFrame() {
	
	setType(Type.POPUP);
	setResizable(false);
	
	setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);
	this.setTitle("Approving question");
	this.setPreferredSize(new Dimension(400, 190));
	this.setAlwaysOnTop(isAlwaysOnTopSupported());
	this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	getContentPane().setLayout(new BorderLayout());
	
	final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
	
	this.setLocation(screenSize.width / 2 - 150, screenSize.height / 2 - 75);
	
	this.setIconImage(Toolkit.getDefaultToolkit().
			getImage(getClass().getResource(LOGOPATH)));
	
	final JPanel panel = new JPanel();
	panel.setAutoscrolls(true);
	getContentPane().add(panel, BorderLayout.CENTER);
	panel.setLayout(null);
	
	btnYes = new JButton("YES");
	btnYes.setBorder(new SoftBevelBorder(BevelBorder.RAISED, null, null, null, null));
	btnYes.setBounds(291, 129, 91, 29);
	panel.add(btnYes);
	
	btnNo = new JButton("NO");
	btnNo.setBorder(new SoftBevelBorder(BevelBorder.RAISED, null, null, null, null));
	btnNo.setBounds(199, 129, 91, 29);
	panel.add(btnNo);
	
	lblIcon = new JLabel("");
	lblIcon.setIcon(new ImageIcon(DialogFrame.class.getResource("/com/coder/hms/icons/dialogPane_question.png")));
	lblIcon.setBounds(14, 40, 69, 70);
	panel.add(lblIcon);
	
	
	textArea = new JTextArea();
	textArea.setDisabledTextColor(new Color(153, 204, 255));
	textArea.setBounds(95, 32, 287, 85);
	textArea.setBackground(UIManager.getColor("ComboBox.background"));
	textArea.setBorder(null);
	textArea.setComponentOrientation(ComponentOrientation.LEFT_TO_RIGHT);
	textArea.setEditable(false);
	textArea.setFont(new Font("Monospaced", Font.PLAIN, 14));
	textArea.setLineWrap(true);
	panel.add(textArea);
	
	this.pack();
}
 
Example #5
Source File: InformationFrame.java    From Hotel-Properties-Management-System with GNU General Public License v2.0 4 votes vote down vote up
public InformationFrame() {
	
	setType(Type.POPUP);
	setResizable(false);
	
	setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);
	this.setTitle("Approving question");
	this.setPreferredSize(new Dimension(350, 170));
	this.setAlwaysOnTop(isAlwaysOnTopSupported());
	this.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
	getContentPane().setLayout(new BorderLayout());
	
	final Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();
	
	this.setLocation(screenSize.width / 2 - 150, screenSize.height / 2 - 75);
	
	this.setIconImage(Toolkit.getDefaultToolkit().getImage(InformationFrame.class.getResource(LOGOPATH)));
	
	final JPanel panel = new JPanel();
	getContentPane().add(panel, BorderLayout.CENTER);
	panel.setLayout(null);
	
	okBtn = new JButton("OK");
	okBtn.setIcon(new ImageIcon(InformationFrame.class.getResource("/com/coder/hms/icons/info_ok.png")));
	okBtn.setFont(new Font("Lucida Grande", Font.PLAIN, 15));
	okBtn.setBorder(new SoftBevelBorder(BevelBorder.RAISED, null, null, null, null));
	okBtn.setBounds(119, 102, 132, 35);
	okBtn.addActionListener(getAction());
	panel.add(okBtn);
	
	lblMessage = new JLabel("");
	lblMessage.setHorizontalTextPosition(SwingConstants.CENTER);
	lblMessage.setHorizontalAlignment(SwingConstants.LEFT);
	lblMessage.setBounds(87, 21, 246, 74);
	panel.add(lblMessage);
	
	lblIcon = new JLabel("");
	lblIcon.setIcon(new ImageIcon(InformationFrame.class.getResource("/com/coder/hms/icons/dialogPane_question.png")));
	lblIcon.setBounds(6, 36, 69, 70);
	panel.add(lblIcon);
	
	this.pack();
}
 
Example #6
Source File: ConsoleWindow.java    From importer-exporter with Apache License 2.0 4 votes vote down vote up
private void init() {
	setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
	setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);
	setIconImage(Toolkit.getDefaultToolkit().getImage(ConsoleWindow.class.getResource("/org/citydb/gui/images/common/logo_small.png")));
	setLayout(new GridBagLayout());
}
 
Example #7
Source File: DatabaseServerPreparingInitializer.java    From Hotel-Properties-Management-System with GNU General Public License v2.0 3 votes vote down vote up
public DatabaseServerPreparingInitializer() {
	
	setType(Type.POPUP);
	setResizable(false);
	this.setAlwaysOnTop(isAlwaysOnTopSupported());
	setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);
			
	this.pack();
	
}