Package java.awt

Examples of java.awt.Frame


  // If the data source needs a source file...
  if (forceNeedsSourceFile || dataSource.needsSourceFile()) {
    // And if no source file has been selected yet...
    if (forceNeedsSourceFile || dataSource.getSourceFile() == null) {
      // Then ask the user to select the source file.
      Frame frame =
        Designer.findWindowFor(this) == null ?
        null : Designer.findWindowFor(this).getFrame();
      JFileChooser chooser = Designer.getChooser();
      chooser.setDialogTitle(I18N.get("Report.select_source_file"));
      Designer.setPrefsDir(chooser, "dataSourceDir");
View Full Code Here


   */
  public static void centerAndShow(Window win) {
    Dimension wD = win.getSize();
    Dimension frameD;
    Point framePos;
    Frame frame = JOptionPane.getFrameForComponent(win);

    // Should this window be centered to its parent frame?
    boolean centerToParentFrame = (frame != null) && (frame != win)
        && frame.isShowing();

    // Center to parent frame or to screen
    if (centerToParentFrame) {
      frameD = frame.getSize();
      framePos = frame.getLocation();
    } else {
      GraphicsEnvironment ge = GraphicsEnvironment
          .getLocalGraphicsEnvironment();
      // dual head, use first screen
      if (ge.getScreenDevices().length > 1) {
View Full Code Here

   * @param parent
   *          One component of the component tree.
   * @return the best dialog parent for a new JDialog.
   */
  public static Window getBestDialogParent(Component parent) {
    Frame root = JOptionPane.getFrameForComponent(parent);
    return getLastModalChildOf(root);
  }
View Full Code Here

     * @param type Description of Parameter
     * @return Description of the Returned Value
     * @since
     */
    protected File chooseFile(int type) {
        Frame frame = getFrame();
        File f = null;
        if (fileChooser == null)
            fileChooser = new JFileChooser();

        fileChooser.setCurrentDirectory(E00File);
View Full Code Here

    private void showWindow() {
        if (frame != null) {
            return;
        }
        frame = new Frame("H2 Console");
        frame.addWindowListener(this);
        Image image = loadImage("/org/h2/res/h2.png");
        if (image != null) {
            frame.setIconImage(image);
        }
View Full Code Here

      layout.marginWidth = 0;
      composite.setLayout(layout);
      GridData gridData = new GridData(GridData.FILL_BOTH);
      composite.setLayoutData(gridData);

      Frame f = SWT_AWT.new_Frame(composite);

      Panel pan = new Panel();

      f.add(pan);

      triggerEvent(UISWTViewEvent.TYPE_INITIALIZE, pan);
    } else if (iControlType == UISWTViewCore.CONTROLTYPE_SKINOBJECT) {
      triggerEvent(UISWTViewEvent.TYPE_INITIALIZE, getSkinObject());
    }
View Full Code Here

        WindowSupport ws = getWindowSupport();

        if (ws != null && !getUseAsTool()) {
            MapHandler mh = (MapHandler) getBeanContext();
            Frame frame = null;
            int xoffset = 0;
            int yoffset = 0;
            if (mh != null) {
                frame = (Frame) mh.get(java.awt.Frame.class);
                if (frame != null) {
                    xoffset = frame.getX();
                    yoffset = frame.getY();
                }
            }

            ws.displayInWindow(frame, WindowSupport.Dlg.class,
                    windowx + xoffset,
View Full Code Here

        return new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                WindowSupport ws = getWindowSupport();

                MapHandler mh = (MapHandler) getBeanContext();
                Frame frame = null;
                if (mh != null) {
                    frame = (Frame) mh.get(java.awt.Frame.class);
                }

                if (ws == null) {
View Full Code Here

        prefixTextField.setText(DefaultLayerName);

        WindowSupport ws = getWindowSupport();

        MapHandler mh = (MapHandler) getBeanContext();
        Frame frame = null;
        if (mh != null) {
            frame = (Frame) mh.get(java.awt.Frame.class);
        }

        if (ws == null) {
View Full Code Here

            ws.setContent(getGUI());
        }

        if (ws != null) {
            MapHandler mh = (MapHandler) getBeanContext();
            Frame frame = null;
            if (mh != null) {
                frame = (Frame) mh.get(java.awt.Frame.class);

                if (frame == null) {
                    MapBean mapBean = (MapBean) mh.get("com.bbn.openmap.MapBean");
View Full Code Here

TOP

Related Classes of java.awt.Frame

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.