Java 类java.awt.Dialog.ModalExclusionType 实例源码

项目:Hotel-Properties-Management-System    文件:ShowReport.java   
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!");
        }

    }
项目:Hotel-Properties-Management-System    文件:InformationFrame.java   
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();
}
项目:metasfresh    文件:ReadPaymentDocumentForm.java   
@Override
public void init(final int WindowNo, final FormFrame frame) throws Exception
{
    final ProcessInfo pi = frame.getProcessInfo();

    invoice = pi.getRecord(I_C_Invoice.class);
    Check.assumeNotNull(invoice, "invoice not null");

    final int AD_Org_ID = invoice.getAD_Org_ID();

    dialogComponent = createAndBindPanel(WindowNo, frame, AD_Org_ID);

    //
    // Configure frame
    frame.setMenuBar(null); // no menu
    frame.setJMenuBar(null); // no menu
    frame.setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);
    frame.getContentPane().add(dialogComponent.getComponent());
    frame.pack();
    frame.setResizable(false);

    //
    // Add to window manager
    AEnv.addToWindowManager(frame);
}
项目:UiL-OTS-Video-Coding-System    文件:projectOpener.java   
/**
 * Constructor of the project opener frame
 */
public projectOpener(Globals g)
{
    setIconImages(Globals.getIcons());
    c = g.getController();
    prefs = g.getPreferencesModel();
    setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);
    setTitle("New Project");
    this.setSize(742, 400);
    this.setLocation(450, 200);

    panel = new JPanel();
    getContentPane().add(panel, BorderLayout.CENTER);

    createLabels();
    try {
    createTextFields(); } catch (Exception e) {System.out.println(e);}
    createCheckBoxes();
    createButtons();
    createLayout();
}
项目:keystore-explorer    文件:HelpAction.java   
private void createAndDisplayHelp() throws HelpSetException {
    URL hsUrl = getClass().getResource(res.getString("HelpAction.HelpSet"));
    HelpSet hs = new HelpSet(getClass().getClassLoader(), hsUrl);

    if (LnfUtil.isDarculaAvailable()) {
        URL hsDarculaUrl = getClass().getResource(res.getString("HelpAction.DarculaHelpSet"));
        HelpSet hsDarcula = new HelpSet(getClass().getClassLoader(), hsDarculaUrl);
        hs.add(hsDarcula);
    }

    helpBroker = new DefaultHelpBroker(hs);

    WindowPresentation windowPresentation = helpBroker.getWindowPresentation();
    windowPresentation.createHelpWindow();

    // Make window immune to modal dialogs in application
    Window helpWindow = windowPresentation.getHelpWindow();
    helpWindow.setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);

    // Set help icons - set lots of different sizes to give each OS the most
    // flexibility in choosing an icon for display
    ArrayList<Image> icons = new ArrayList<Image>();
    icons.add(Toolkit.getDefaultToolkit().createImage(
            getClass().getResource(res.getString("HelpAction.image.16x16"))));
    icons.add(Toolkit.getDefaultToolkit().createImage(
            getClass().getResource(res.getString("HelpAction.image.24x24"))));
    icons.add(Toolkit.getDefaultToolkit().createImage(
            getClass().getResource(res.getString("HelpAction.image.32x32"))));

    helpWindow.setIconImages(icons);

    helpBroker.setLocation(new Point(frame.getX() + 25, frame.getY() + 25));
    helpBroker.setSize(new Dimension(850, 600));
    helpBroker.setCurrentID(START_ID);

    helpBroker.setDisplayed(true);
}
项目:vocobox    文件:VocoboxAppFile.java   
public VocoboxAppFile(){
    super();
    System.out.println("vocobox app file!");
    //setModal(false);
    setModalExclusionType(ModalExclusionType.NO_EXCLUDE);
    LookAndFeel.apply();
    windowExitListener(this);
    show();
    setVisible(true);
}
项目:siteplan    文件:AboutBox.java   
/** Creates new form AboutBox */
 public AboutBox() {
     try {
         initComponents();
         BufferedReader br = new BufferedReader(new InputStreamReader(getClass().
                getResourceAsStream("/org/twak/siteplan/resources/help.txt")));
         StringBuffer sb = new StringBuffer();
         while (br.ready()) {
             sb.append(br.readLine()+"\n");
         }
         logoBox.image = ImageU.cacheResource.get( "/org/twak/siteplan/resources/icon256.png" );
         helpTextBox.setText(sb.toString());
         setSize(getPreferredSize());
         WindowManager.register(this);
         setVisible(true);
         setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);

         SwingUtilities.invokeLater( new Runnable() {

    @Override
    public void run() {
        jScrollPane1.getVerticalScrollBar().setValue( 0 );
    }
} );

     } catch (Throwable ex) {
         ex.printStackTrace();
     }
 }
项目:UiL-OTS-Video-Coding-System    文件:SaveAs.java   
private void createLayout()
{
    setIconImages(Globals.getIcons());
    setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);

    setTitle("Save project as");

    this.setSize(500, 210);
    this.setLocation(450, 200);

    lblProjectName = new JLabel("Project Name");
    lblProjectLocation = new JLabel("Project Location");
}
项目:vocobox    文件:VocoboxAppFile.java   
public VocoboxAppFile(){
    super();
    System.out.println("vocobox app file!");
    //setModal(false);
    setModalExclusionType(ModalExclusionType.NO_EXCLUDE);
    LookAndFeel.apply();
    windowExitListener(this);
    show();
    setVisible(true);
}
项目:incubator-netbeans    文件:UtilitiesTest.java   
@Override
public boolean isModalExclusionTypeSupported(ModalExclusionType modalExclusionType) {
    throw new UnsupportedOperationException("Not supported yet.");
}
项目:Hotel-Properties-Management-System    文件:DialogFrame.java   
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();
}
项目:Mujeed-Arabic-Prolog    文件:SwitechWorkSpaceWindow.java   
/**
 * Initialize the contents of the frame.
 */
private void initialize() {
    frameSwitchWorkSpace = new JDialog();
    frameSwitchWorkSpace.setComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
    frameSwitchWorkSpace.setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
    frameSwitchWorkSpace.setSize(540, 250);
    frameSwitchWorkSpace.setLocationRelativeTo(null); 
    frameSwitchWorkSpace.setFont(new Font("Arial", Font.BOLD, 13));
    frameSwitchWorkSpace.setResizable(false);
    frameSwitchWorkSpace.setModalExclusionType(ModalExclusionType.TOOLKIT_EXCLUDE);
    frameSwitchWorkSpace.setTitle("\u062A\u0628\u062F\u064A\u0644 \u0645\u0633\u0627\u062D\u0629 \u0627\u0644\u0639\u0645\u0644");
    frameSwitchWorkSpace.getContentPane().setLayout(new BorderLayout(0, 0));

    JPanel panelCenter = new JPanel();
    panelCenter.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);

    JPanel panelNorth = new JPanel();
    panelNorth.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
    panelNorth.setBackground(Color.WHITE);
    panelNorth.setBorder(new MatteBorder(0, 0, 1, 0, (Color) Color.GRAY));
    panelNorth.setLayout(new GridLayout(2, 1, 0, 0));

    JLabel lblTitle = new JLabel("\u062A\u0628\u062F\u064A\u0644 \u0645\u0633\u0627\u062D\u0629 \u0627\u0644\u0639\u0645\u0644");
    lblTitle.setFont(new Font("Arial", Font.BOLD, 20));
    lblTitle.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
    lblTitle.setBorder(new EmptyBorder(10, 0, 0, 30));
    panelNorth.add(lblTitle);

    JLabel lblDescription = new JLabel("\u064A\u0645\u0643\u0646\u0643 \u062D\u0641\u0638 \u0627\u0644\u0645\u0634\u0627\u0631\u064A\u0639 \u0627\u0644\u062E\u0627\u0635\u0629 \u0628\u0643 \u0641\u064A \u0645\u062C\u0644\u062F \u064A\u0633\u0645\u0649 \u0645\u0633\u0627\u062D\u0629 \u0627\u0644\u0639\u0645\u0644");
    lblDescription.setVerticalAlignment(SwingConstants.TOP);
    lblDescription.setFont(new Font("Arial", Font.BOLD, 14));
    lblDescription.applyComponentOrientation(ComponentOrientation.RIGHT_TO_LEFT);
    lblDescription.setBorder(new EmptyBorder(10, 0, 0, 50));
    panelNorth.add(lblDescription);

    panelCenter.setLayout(new GridLayout(1, 1, 0, 0));

    JFilePicker filePicker = new JFilePicker("مساحة العمل", "استعراض...");
    filePicker.setBorder(new MatteBorder(45, 1, 1, 1, (Color) new Color(240, 240, 240)));
    panelCenter.add(filePicker);
    frameSwitchWorkSpace.getContentPane().add(panelCenter, BorderLayout.CENTER);

    JPanel panelSouth = new JPanel();
    frameSwitchWorkSpace.getContentPane().add(panelSouth);
    panelSouth.setLayout(new FlowLayout(FlowLayout.CENTER, 5, 5));

    btnCancel = new JButton("إلغاء الأمر");
    btnCancel.setFont(new Font("Arial", Font.BOLD, 14));
    btnCancel.setHorizontalAlignment(SwingConstants.RIGHT);
    panelSouth.add(btnCancel);

    btnOK = new JButton("موافق");
    btnOK.setHorizontalAlignment(SwingConstants.RIGHT);
    btnOK.setFont(new Font("Arial", Font.BOLD, 14));
    panelSouth.add(btnOK);

    btnCancel.addActionListener(this);
    btnOK.addActionListener(this);

    frameSwitchWorkSpace.getContentPane().add(panelNorth, BorderLayout.NORTH);
    frameSwitchWorkSpace.getContentPane().add(panelCenter, BorderLayout.CENTER);
    frameSwitchWorkSpace.getContentPane().add(panelSouth, BorderLayout.SOUTH);
}
项目:javify    文件:XToolkit.java   
@Override
public boolean isModalExclusionTypeSupported(ModalExclusionType modalExclusionType)
{
  // TODO Auto-generated method stub
  return false;
}
项目:jvm-stm    文件:XToolkit.java   
@Override
public boolean isModalExclusionTypeSupported(ModalExclusionType modalExclusionType)
{
  // TODO Auto-generated method stub
  return false;
}
项目:JamVM-PH    文件:XToolkit.java   
@Override
public boolean isModalExclusionTypeSupported(ModalExclusionType modalExclusionType)
{
  // TODO Auto-generated method stub
  return false;
}
项目:GhostAWT    文件:GhostToolkit.java   
@Override
public boolean isModalExclusionTypeSupported(ModalExclusionType modalExclusionType) {
    return false;
}
项目:classpath    文件:XToolkit.java   
@Override
public boolean isModalExclusionTypeSupported(ModalExclusionType modalExclusionType)
{
  // TODO Auto-generated method stub
  return false;
}
项目:importer-exporter    文件:ConsoleWindow.java   
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());
}
项目:importer-exporter-oracle    文件:ConsoleWindow.java   
private void init() {
    setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
    setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);
    setIconImage(Toolkit.getDefaultToolkit().getImage(ConsoleWindow.class.getResource("/resources/img/common/logo_small.png")));
    setLayout(new GridBagLayout());
}
项目:importer-exporter-postgis    文件:ConsoleWindow.java   
private void init() {
    setDefaultCloseOperation(JFrame.DO_NOTHING_ON_CLOSE);
    setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);
    setIconImage(Toolkit.getDefaultToolkit().getImage(ConsoleWindow.class.getResource("/resources/img/common/logo_small.png")));
    setLayout(new GridBagLayout());
}
项目:terminal-recall    文件:CustomLVLMenuItemFactory.java   
private void showLVLDialog(){
    final CustomLVLDialog dialog = new CustomLVLDialog();
    dialog.setTvF3Game(getTarget());
    dialog.setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);
    dialog.setVisible(true);
}
项目:Hotel-Properties-Management-System    文件:DatabaseServerPreparingInitializer.java   
public DatabaseServerPreparingInitializer() {

    setType(Type.POPUP);
    setResizable(false);
    this.setAlwaysOnTop(isAlwaysOnTopSupported());
    setModalExclusionType(ModalExclusionType.APPLICATION_EXCLUDE);

    this.pack();

}