Package javax.swing

Examples of javax.swing.JWindow


        public FullScreenAction() {}

        public void actionPerformed(ActionEvent e) {
            if (window == null || !window.isVisible()) {
                if (window == null) {
                    window = new JWindow(JSVGViewerFrame.this);
                    Dimension size = Toolkit.getDefaultToolkit().getScreenSize();
                    window.setSize(size);
                }
                // Go to full screen in JWindow)
                svgCanvas.getParent().remove(svgCanvas);
View Full Code Here


   
    public void run() {
        // Must find a graphics configuration with a depth of 32 bits
        GraphicsConfiguration gconfig = WindowUtils.getAlphaCompatibleGraphicsConfiguration();
        frame = new JFrame("Alpha Mask Demo");
        alphaWindow = new JWindow(frame, gconfig);
        MouseInputAdapter handler = new MouseInputAdapter() {
            private Point offset;
            public void mousePressed(MouseEvent e) {
                if (SwingUtilities.isLeftMouseButton(e))
                    offset = e.getPoint();
View Full Code Here

    public void run() {
        // Must find a graphics configuration with a depth of 32 bits
        GraphicsConfiguration gconfig = WindowUtils.getAlphaCompatibleGraphicsConfiguration();
        frame = new JFrame("Alpha Mask Demo");
        alphaWindow = new JWindow(frame, gconfig);
        icon = new JLabel();
        icon.setCursor(Cursor.getPredefinedCursor(Cursor.HAND_CURSOR));
        alphaWindow.getContentPane().add(icon);
        JButton quit = new JButton("Quit");
        JLabel label = new JLabel("Drag this window by its image");
View Full Code Here

    }

    Component c = getPopupComponent();

    if (c instanceof JWindow) {
      JWindow component = (JWindow) getPopupComponent();

      component.setLocation(ownerX, ownerY);
      component.getContentPane().add(contents, BorderLayout.CENTER);
      contents.invalidate();
      if (component.isVisible()) {
        // Do not call pack() if window is not visible to
        // avoid early native peer creation
        packPopup();
      }
    }
View Full Code Here

  }

  private static synchronized void initializeDummyDialog() {
    SwingUtilities.invokeLater(new Runnable() {
      public void run() {
        DUMMY_DIALOG = new JWindow();
        DUMMY_DIALOG.setLayout(null);
        DUMMY_DIALOG.setSize(MAX_WIDTH, MAX_HEIGHT);
        DUMMY_DIALOG.setLocation(-2 * MAX_WIDTH, -2 * MAX_HEIGHT);
        DUMMY_DIALOG.setVisible(true);
      }
 
View Full Code Here

      UIManager.setLookAndFeel(UIManager.getSystemLookAndFeelClassName());
    } catch (Exception e) {
      e.printStackTrace();
    }
   
    JWindow splash = ClusterMainUI.showSplash();
 
    try {
      Grid.startClusterManager();
    } catch (Exception e) {
      splash.setVisible(false);
      log.error("Exception while starting",e);
     
      JOptionPane.showMessageDialog(null, "Unable to start ClusterManager due to Exception." +
          "\nSee StackTrace (log) for details", "Nebula Cluster", JOptionPane.ERROR_MESSAGE);
      System.exit(1);
    }
   
    ClusterMainUI ui = ClusterMainUI.create();
    ui.setVisible(true);
    splash.setVisible(false);
    splash.dispose();
    log.info("[UI] Initialized");
  }
View Full Code Here

   *
   * @return Splash Screen reference
   */
  public static JWindow showSplash() {
   
    JWindow splash = new JWindow();
    splash.setSize(400, 250);
    splash.setLayout(null);
   
    JLabel status = new JLabel("Developed by Yohan Liyanage, 2008");
    JLabelAppender.setLabel(status);
    status.setFont(new Font("sansserif", Font.PLAIN, 10));
    status.setSize(350, 30);
    status.setLocation(10, 220);
    splash.add(status);
   
    JLabel lbl = new JLabel(new ImageIcon(ClassLoader.getSystemResource("META-INF/resources/nebula-startup.png")));
    lbl.setSize(400, 250);
    lbl.setLocation(0, 0);
    splash.add(lbl);
   
    splash.setVisible(true);
    splash.setLocationRelativeTo(null);
   
    return splash;
  }
View Full Code Here

   *
   * @return Splash Screen Reference
   */
  public static JWindow showSplash() {
   
    JWindow splash = new JWindow();
    splash.setSize(400, 250);
    splash.setLayout(null);
   
    JLabel status = new JLabel("Developed by Yohan Liyanage, 2008");
    JLabelAppender.setLabel(status);
    status.setFont(new Font("sansserif", Font.PLAIN, 10));
    status.setSize(350, 30);
    status.setLocation(10, 220);
    splash.add(status);
   
    JLabel lbl = new JLabel(new ImageIcon(ClassLoader.getSystemResource("META-INF/resources/nebula-startup.png")));
    lbl.setSize(400, 250);
    lbl.setLocation(0, 0);
    splash.add(lbl);
   
    splash.setVisible(true);
    splash.setLocationRelativeTo(null);
   
    return splash;
  }
View Full Code Here

   * @param pc The completion being described.
   */
  public ParameterizedCompletionDescriptionToolTip(Window owner,
            AutoCompletion ac, ParameterizedCompletion pc) {

    tooltip = new JWindow(owner);
    this.ac = ac;
    this.pc = pc;

    descLabel = new JLabel();
    descLabel.setBorder(BorderFactory.createCompoundBorder(
View Full Code Here

        public FullScreenAction() {}

        public void actionPerformed(ActionEvent e) {
            if (window == null || !window.isVisible()) {
                if (window == null) {
                    window = new JWindow(JSVGViewerFrame.this);
                    Dimension size = Toolkit.getDefaultToolkit().getScreenSize();
                    window.setSize(size);
                }
                // Go to full screen in JWindow)
                svgCanvas.getParent().remove(svgCanvas);
View Full Code Here

TOP

Related Classes of javax.swing.JWindow

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.