Package javax.swing

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


        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

            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

    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

    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

            "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

   * @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

          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

          ((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

    public void doAction(Object action) {
        if (action==null) return;
        if (action.equals(NodeResourcesManager.resources.getString("Properties"))) {
            TransformDataUI dui = new TransformDataUI(this,data, true);
            JDialog dialog = dui.createDialog(null, NodeResourcesManager.resources.getString("Properties"));
          
            dialog.show();
          
         
        }
    }
View Full Code Here

TOP

Related Classes of javax.swing.JDialog

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.