Package javax.swing

Examples of javax.swing.JProgressBar$ModelChangeListener


//            assetLabel.setPreferredSize(getSize());
            add(assetLabel);

            // Create the progress bar and add it to the panel. Make sure it
            // is always of a maximum height
            progressBar = new JProgressBar();
//            progressBar.addComponentListener(new ComponentAdapter() {
//                @Override
//                public void componentResized(ComponentEvent e) {
//                    Dimension size = progressBar.getSize();
//                    size.setSize(size.getWidth(), 15);
View Full Code Here


  ExecutionPanel() {
    super(new BorderLayout());
    JPanel controlPanel = new JPanel(new BorderLayout());
    startButton = new JButton("Start");
    controlPanel.add(startButton, BorderLayout.WEST);
    progressBar = new JProgressBar(0, 100);
    controlPanel.add(progressBar, BorderLayout.CENTER);
    add(controlPanel, BorderLayout.NORTH);
    output = new JTextArea();
    output.setEditable(false);
    output.setLineWrap(true);
View Full Code Here

                        {
                                JPanel panel = new JPanel(new BorderLayout());
                                contentPane.add(panel, "progress");
                                panel.add(new JLabel("Connecting to " + host + "..."));
                                {
                                        panel.add(progressBar = new JProgressBar(), BorderLayout.SOUTH);
                                        progressBar.setIndeterminate(true);
                                }
                        }
                        {
                                JPanel panel = new JPanel(new BorderLayout());
View Full Code Here

        updateFrame.setTitle(messages.getString("update.updating.title"));
        updateFrame.setResizable(false);
        ImageIcon icon = new ImageIcon(EcSwingXMain.class.getResource(iconLocation));
        updateFrame.setIconImage(icon.getImage());

        final JProgressBar updateProgress = new JProgressBar(0, 100);
        updateProgress.setValue(0);
        updateProgress.setStringPainted(true);
        updateFrame.add(updateProgress);
        updateFrame.setPreferredSize(new Dimension(200, 100));
        updateFrame.pack();
        updateFrame.setLocationRelativeTo(null);
        updateFrame.setVisible(true);
        ecUpdater.addPropertyChangeListener(new PropertyChangeListener()
        {
          public void propertyChange(PropertyChangeEvent evt)
          {
            if ("progress".equals(evt.getPropertyName()))
            {
              updateProgress.setValue((Integer) evt.getNewValue());
            }
          }
        });
        ecUpdater.setUpdating(true);
        ecUpdater.execute();
View Full Code Here

        //
        // Initialization
        //
        final AboutDialog initDialog = new AboutDialog();
        final JProgressBar pb = new JProgressBar(0, 3);
        initDialog.getContentPane().add("South", pb);

        // Work around pack() bug on some platforms
        Dimension ss = initDialog.getToolkit().getScreenSize();
        Dimension ds = initDialog.getPreferredSize();

        initDialog.setLocation((ss.width  - ds.width) / 2,
                               (ss.height - ds.height) / 2);

        initDialog.setSize(ds);
        initDialog.setVisible(true);

        final JSVGViewerFrame v = new JSVGViewerFrame(this);
        JSVGCanvas c = v.getJSVGCanvas();
        c.addSVGDocumentLoaderListener(new SVGDocumentLoaderAdapter() {
            public void documentLoadingStarted(SVGDocumentLoaderEvent e) {
                pb.setValue(1);
            }
            public void documentLoadingCompleted(SVGDocumentLoaderEvent e) {
                pb.setValue(2);
            }
        });
        c.addGVTTreeBuilderListener(new GVTTreeBuilderAdapter() {
            public void gvtBuildCompleted(GVTTreeBuilderEvent e) {
                pb.setValue(3);
            }
        });
        c.addGVTTreeRendererListener(new GVTTreeRendererAdapter() {
            public void gvtRenderingCompleted(GVTTreeRendererEvent e) {
                initDialog.dispose();
View Full Code Here

        //
        // Initialization
        //
        final AboutDialog initDialog = new AboutDialog();
        final JProgressBar pb = new JProgressBar(0, 3);
        initDialog.getContentPane().add("South", pb);

        // Work around pack() bug on some platforms
        Dimension ss = initDialog.getToolkit().getScreenSize();
        Dimension ds = initDialog.getPreferredSize();

        initDialog.setLocation((ss.width  - ds.width) / 2,
                               (ss.height - ds.height) / 2);

        initDialog.setSize(ds);
        initDialog.setVisible(true);

        final JSVGViewerFrame v = new JSVGViewerFrame(this);
        JSVGCanvas c = v.getJSVGCanvas();
        c.addSVGDocumentLoaderListener(new SVGDocumentLoaderAdapter() {
            public void documentLoadingStarted(SVGDocumentLoaderEvent e) {
                pb.setValue(1);
            }
            public void documentLoadingCompleted(SVGDocumentLoaderEvent e) {
                pb.setValue(2);
            }
        });
        c.addGVTTreeBuilderListener(new GVTTreeBuilderAdapter() {
            public void gvtBuildCompleted(GVTTreeBuilderEvent e) {
                pb.setValue(3);
            }
        });
        c.addGVTTreeRendererListener(new GVTTreeRendererAdapter() {
            public void gvtRenderingCompleted(GVTTreeRendererEvent e) {
                initDialog.dispose();
View Full Code Here

  protected TaskGui(String title, int max, String units) {
    this.max = max;
    this.units = units;
    this.title = title;

    pb = new JProgressBar(0, max);
    pb.setString(title);
    pb.setStringPainted(true);
    pb.setIndeterminate(max == 0);

    Dimension d = new Dimension(379, 24);
View Full Code Here

        clearLabel = new ImageButton(primsProperties.getProperty("Clean Button"), imgFolder + primsProperties.getProperty("Clean Button image")
        , imgFolder + primsProperties.getProperty("Clean Button image hover"));
        graphBackgroundPanel = new JPanel();
        graphDrawPanel = new DrawingPanel(controller,primsProperties);
        statusPanel = new JPanel();
        progressBar = new JProgressBar();

       

        controlPanel.setBorder(BorderFactory.createTitledBorder(""));
View Full Code Here

        clearLabel = new ImageButton(primsProperties.getProperty("Clean Button"), imgFolder + primsProperties.getProperty("Clean Button image")
        , imgFolder + primsProperties.getProperty("Clean Button image hover"));
        graphBackgroundPanel = new JPanel();
        graphDrawPanel = new DrawingPanel(controller,primsProperties);
        statusPanel = new JPanel();
        progressBar = new JProgressBar();

       

        controlPanel.setBorder(BorderFactory.createTitledBorder(""));
View Full Code Here

        }

        // Initialization
        //
        final AboutDialog initDialog = new AboutDialog();
        final JProgressBar pb = new JProgressBar(0, 3);
        initDialog.getContentPane().add("South", pb);

        // Work around pack() bug on some platforms
        Dimension ss = initDialog.getToolkit().getScreenSize();
        Dimension ds = initDialog.getPreferredSize();

        initDialog.setLocation((ss.width  - ds.width) / 2,
                               (ss.height - ds.height) / 2);

        initDialog.setSize(ds);
        initDialog.setVisible(true);

        final JSVGViewerFrame v = new JSVGViewerFrame(this);
        JSVGCanvas c = v.getJSVGCanvas();
        c.addSVGDocumentLoaderListener(new SVGDocumentLoaderAdapter() {
            public void documentLoadingStarted(SVGDocumentLoaderEvent e) {
                pb.setValue(1);
            }
            public void documentLoadingCompleted(SVGDocumentLoaderEvent e) {
                pb.setValue(2);
            }
        });
        c.addGVTTreeBuilderListener(new GVTTreeBuilderAdapter() {
            public void gvtBuildCompleted(GVTTreeBuilderEvent e) {
                pb.setValue(3);
            }
        });
        c.addGVTTreeRendererListener(new GVTTreeRendererAdapter() {
            public void gvtRenderingCompleted(GVTTreeRendererEvent e) {
                initDialog.dispose();
View Full Code Here

TOP

Related Classes of javax.swing.JProgressBar$ModelChangeListener

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.