Examples of Window


Examples of gnu.x11.Window

        screenVisual = new HashMap<Integer,Visual>();
 
  defaultDepth = display.default_depth;

        atomsWmSelection = new Atom[display.screens.length];
        Window wmSelectionWin = new Window(rootWin, 0,0, 1, 1, 0, new Window.Attributes());

  for (int i = 0; i< display.screens.length; i++) {
      Screen screen = display.screens[i];
      gnu.x11.Enum scrdepths = screen.depths();
      while (scrdepths.more()) {
          Depth depth = (Depth) scrdepths.next();
          screenDepth.put(depth.depth(), depth);
   
    gnu.x11.Enum enm = depth.visuals();       
    while (enm.more()) {
        Visual visual = (Visual) enm.next();             
        screenVisual.put(visual.id(), visual);
    }
      }

      // AWT in Java6u1 requires that the WM acquire these selections.
      // Note: even though the WM conventions recommend that CurrentTime
      // not be used we can use it here because the LG WM is the only one
      // acquiring these selections.

      atomsWmSelection[i] = (Atom)Atom.intern(display, "WM_S" + i);
      wmSelectionWin.set_selection_owner(atomsWmSelection[i], Display.CURRENT_TIME);
      display.check_error();
  }

  atomWmState = (Atom)Atom.intern(display, "WM_STATE");
  atomWmChangeState = (Atom)Atom.intern(display, "WM_CHANGE_STATE");
  atomWmProtocols = (Atom)Atom.intern(display, "WM_PROTOCOLS");
  atomWmDeleteWindow = (Atom)Atom.intern(display, "WM_DELETE_WINDOW");
  atomWmTakeFocus = (Atom)Atom.intern(display, "WM_TAKE_FOCUS");
  atomWmColormapWindows=(Atom)Atom.intern(display,"WM_COLORMAP_WINDOWS");
  atomWmTransientFor = (Atom)Atom.intern(display, "WM_TRANSIENT_FOR");
  atomCompoundText = (Atom)Atom.intern(display, "COMPOUND_TEXT");
  atomServerShutdown = (Atom)Atom.intern(display, "SERVER_SHUTDOWN");

  try {
            selectInput(rootWin);
  } catch (Error err) {
      if (err.code == Error.BAD_ACCESS && err.bad == rootWin.id) {
                logger.severe("Failed to access root window. Another WM is running?");
    throw new RuntimeException ("Failed to access root window\n"
        + "Another WM is running?"); // FIXME
      } else {
    throw err;
      }
  }
       
        // Remote Windows: Automatically composite redirect all root top-level windows
  compositeTopLevelWindows();

  // Init WmNET support for screen 0
  // TODO: multiscreen
  Window[] rootWins = new Window[1];
  Window[] checkWins = new Window[1];
  rootWins[0] = rootWin;
        checkWins[0] = new Window(rootWin, 0,0, 1, 1, 0, new Window.Attributes());
  X11WindowManagerHints.initWmNETSupport(display, rootWins, checkWins);

  // prepare for the event dispatch thread
  Thread eventThread = new Thread( this, "X11WindowManager" );
  // eventThread.setPriority(Thread.NORM_PRIORITY + 2); // FIXME
View Full Code Here

Examples of java.awt.Window

          title = mProgram.getTitle();
        } else {
          title = "";
        }
        AdvancedFavorite favorite = new AdvancedFavorite(title);
        Window parent = UiUtilities
            .getLastModalChildOf(MainFrame.getInstance());
        EditFavoriteDialog dlg = new EditFavoriteDialog(parent, favorite);
        UiUtilities.centerAndShow(dlg);
        if (dlg.getOkWasPressed()) {
          FavoriteTreeModel.getInstance().addFavorite(favorite, mParentNode);
View Full Code Here

Examples of java.awt.Window

    public void actionPerformed(ActionEvent e) {

      m_Backup = copyObject(m_Object);
      if ((getTopLevelAncestor() != null)
    && (getTopLevelAncestor() instanceof Window)) {
        Window w = (Window) getTopLevelAncestor();
        w.dispose();
      }
    }
  });
     
      m_cancelBut = new JButton("Cancel");
      m_cancelBut.setEnabled(true);
      m_cancelBut.addActionListener(new ActionListener() {
    public void actionPerformed(ActionEvent e) {    
      if (m_Backup != null) {
 
        m_Object = copyObject(m_Backup);
       
        // To fire property change
        m_Support.firePropertyChange("", null, null);
        m_ObjectNames = getClassesFromProperties();
        updateObjectNames();
        updateChildPropertySheet();
      }
      if ((getTopLevelAncestor() != null)
    && (getTopLevelAncestor() instanceof Window)) {
        Window w = (Window) getTopLevelAncestor();
        w.dispose();
      }
    }
  });
     
      setLayout(new BorderLayout());
View Full Code Here

Examples of java.awt.Window

      }
    });

    mChooseChannelsBtn.addActionListener(new ActionListener(){
      public void actionPerformed(ActionEvent e) {
        Window parent = UiUtilities.getBestDialogParent(mContent);
        ChannelChooserDlg dlg = new ChannelChooserDlg(parent, mChannelArr,
            null,
            ChannelChooserDlg.SELECTABLE_ITEM_LIST);
        UiUtilities.centerAndShow(dlg);
        Channel[] chArr = dlg.getChannels();
View Full Code Here

Examples of java.awt.Window

  /**
   * Show the Config-Dialog and update the SeachFormSettings
   */
  private void showConfigDialog() {
    Window parent = UiUtilities.getBestDialogParent(mSettingsPanel);
    MassFilterSettingsDialog dialog = new MassFilterSettingsDialog(parent,
        mNewSearchFormSettings);
    dialog.setVisible(true);

    mNewSearchFormSettings = dialog.getSearchFormSettings();
View Full Code Here

Examples of java.awt.Window

    }

    if (channelList.length == 1) {
      ChannelConfigDlg dialog;

      Window parent = UiUtilities.getBestDialogParent(mAllChannels);
      dialog = new ChannelConfigDlg(parent, channelList[0]);
      dialog.centerAndShow();
      MainFrame.getInstance().getProgramTableScrollPane()
          .updateChannelLabelForChannel(channelList[0]);
    } else if (channelList.length > 1) {
      MultiChannelConfigDlg dialog;

      Window parent = UiUtilities.getBestDialogParent(mAllChannels);
      dialog = new MultiChannelConfigDlg(parent, channelList);
      dialog.centerAndShow();
    }

    mSubscribedChannels.repaint();
View Full Code Here

Examples of java.awt.Window

      }
    }
    mIsShowing = true;

    synchronized (this) {
      Window window = UiUtilities.getLastModalChildOf(MainFrame.getInstance());
      // show busy cursor
      ProgramTable programTable = MainFrame.getInstance().getProgramTableScrollPane().getProgramTable();
      window.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
      programTable.setCursor(Cursor.getPredefinedCursor(Cursor.WAIT_CURSOR));
      // open dialog
      ProgramInfoDialog.getInstance(program, mLeftSplit, showSettings).show();
      window.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
      programTable.setCursor(Cursor.getPredefinedCursor(Cursor.DEFAULT_CURSOR));
      mIsShowing = false;
    }
  }
View Full Code Here

Examples of java.awt.Window

  /**
   * Creates the dialog an makes it visible
   */
  public void show() {
    Window parent = UiUtilities.getLastModalChildOf(MainFrame.getInstance());

    mDialog = new JDialog(parent);
    mDialog.setModal(true);

    mDialog.setTitle(mProgram.getTitle());
View Full Code Here

Examples of java.awt.Window

      pane.setMessageType(JOptionPane.QUESTION_MESSAGE);
      pane.setOptionType(JOptionPane.YES_NO_OPTION);
      pane.setInitialValue(cancel);
      pane.setMessage(mLocalizer.msg("betawarning.text","<html>The plugin <b>{0}</b> is a beta version.<br>Beta versions are possible unstable and could contain errors.<br><br>Are you sure that you want to install this version?</html>",getName() + " " + getVersion()));
     
      Window w = UiUtilities.getLastModalChildOf(MainFrame.getInstance());
     
      JDialog dialog = pane.createDialog(w, mLocalizer.msg("betawarning.title","Beta version"));
      dialog.setModal(true);
      dialog.setLocationRelativeTo(w);
      dialog.setVisible(true);
View Full Code Here

Examples of java.awt.Window

      Settings.propLastUsedChannelGroup.setString(null);
    }
  }

  protected void showPluginInfoDlg() {
    Window parent = UiUtilities.getLastModalChildOf(this);
    PluginInformationDialog dlg = new PluginInformationDialog(parent);

    Settings.layoutWindow("main.pluginInfoDlg",dlg, new Dimension(Sizes.dialogUnitXAsPixel(420,dlg),Sizes.dialogUnitYAsPixel(215,dlg)));

    dlg.setVisible(true);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.