Examples of JDialog


Examples of javax.swing.JDialog

    dialog.hide();
  }

  public void initDialog(Widget parent) throws GUIException {
    if (parent == null)
      dialog = new JDialog(); // this is perfectly valid
    else if (parent instanceof Dialog)
      dialog = new JDialog((JDialog) parent.getRealWidget(), isModal);
    else if (parent instanceof Frame)
      dialog = new JDialog((JFrame) parent.getRealWidget(), isModal);
    else if (parent instanceof Wizard)
      dialog = new JDialog((JFrame) parent.getRealWidget(), isModal);
    else
      throw new GUIException("Invalid parent (no Dialog/Frame/Wizard/null)");
  }
View Full Code Here

Examples of javax.swing.JDialog

    JPanel contentPane = new JPanel();
    contentPane.setLayout(new BorderLayout());
    contentPane.add(comp, BorderLayout.CENTER);

    JDialog dialog = new JDialog();
    dialog.setModal(true);
    dialog.setContentPane(contentPane);
    dialog.setSize(800, 600);
    dialog.setVisible(true);
  }
View Full Code Here

Examples of javax.swing.JDialog

        JComponent previewPanel = ok.getTransparancyAdjustment(initColor.getAlpha());
        previewPanel.setSize(previewPanel.getPreferredSize());
        previewPanel.setBorder(BorderFactory.createEmptyBorder(0, 0, 1, 0));
        jcc.setPreviewPanel(previewPanel);
       
        JDialog colorDialog = JColorChooser.createDialog(component,
                title,
                true,
                jcc,
                ok,
                null);
        colorDialog.setVisible(true);
        return ok.getColor();
    }
View Full Code Here

Examples of javax.swing.JDialog

            bColor.addActionListener(new ActionListener() {
        public void actionPerformed(ActionEvent e) {
       
       
            DynamicColorChooser dialog = new DynamicColorChooser(
                            new JDialog(),
                            resources.getString("SelectAColor"),
                            null,color,colorMapperSource,colorMapper);


            if (dialog.isOk()){
View Full Code Here

Examples of javax.swing.JDialog

    cm.setMapping(new Long(3),new Double(1));
    cm.setMapping(new Long(4),new Double(2));
    cm.setMapping(5,10,new Double(3));
    cm.setMapping(8,20,new Double(1));
    cm.setMapping(-18,7,new Double(5));
    cm.editDialog(new JDialog());
    System.exit(0);   
  }
View Full Code Here

Examples of javax.swing.JDialog

    String title
    ) {
    if(dialog!=null){
      return null
    }
    dialog = new JDialog(parent, title, false);
 
    // TODO : should not be resizable if it worked correctly
    //dialog.setResizable(false);
     
    Container contentPane = dialog.getContentPane();
View Full Code Here

Examples of javax.swing.JDialog

            "SplitTabPane unexpected state : inconsistent owner ="+e.owner+"\n"+
            "Left="+sp.getLeftComponent()+"\n"+
            "Right="+sp.getRightComponent());
      }
    } else if(e.owner instanceof JDialog){
      JDialog jd=(JDialog)e.owner;
      jd.setVisible(false);
      jd.getContentPane().removeAll();
    }
    else {
      throw new RuntimeException(
          "SplitTabPane unexpected state : invalid owner");
    }
View Full Code Here

Examples of javax.swing.JDialog

   * @param c the component to be displayed
   * @param name the name used as a dialog title
   * @return the dialog
   */
  protected JDialog createDialog(final Component c, String name){
    JDialog jd=new JDialog(owner, name);
    jd.getContentPane().add(c);
    jd.setDefaultCloseOperation(JDialog.DISPOSE_ON_CLOSE);
    jd.addWindowListener(new WindowAdapter(){

      public void windowClosed(WindowEvent e) {
        Element el=getElement(c);
        changeElement(c,el.previousMode);
      }
    });
    jd.pack();
    jd.show();
    return jd;
  }
View Full Code Here

Examples of javax.swing.JDialog

          up.setInt(propRoot+".DIVIDER", ((JSplitPane)owner).getDividerLocation());
        }
       
      }
      else if(getMode()==DETACHED){
        JDialog jd=(JDialog)owner;
        up.setInt(propRoot+".X", jd.getX());
        up.setInt(propRoot+".Y", jd.getY());
        up.setInt(propRoot+".WIDTH", jd.getWidth());
        up.setInt(propRoot+".HEIGHT", jd.getHeight());
      }
    }
View Full Code Here

Examples of javax.swing.JDialog

          ((JSplitPane)e.owner).setDividerLocation(
              up.getInt(propRoot+".DIVIDER", 10));
        }
      }
      else if(e.getMode()==DETACHED){
        JDialog jd=(JDialog)e.owner;
        int x=up.getInt(propRoot+".X",0);
        int y=up.getInt(propRoot+".Y", 0);
        int w=up.getInt(propRoot+".WIDTH", 100);
        int h=up.getInt(propRoot+".HEIGHT", 100);
        jd.setSize(w,h);
        jd.validate();
        jd.setLocation(x,y);
      }
    }
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.