Package java.awt

Examples of java.awt.Container$WakingRunnable


                    frame.pack();
                }
            }
        );

        Container c = frame.getContentPane();
        c.add(playerpanel);

        frame.pack();
        frame.setVisible(true);

        //  Execute implementation-specific functionality
View Full Code Here


            mainPanel.add(panel, BorderLayout.CENTER);
            mainPanel.setBorder(
                BorderConstants.emptyBorder);

            Container c = cacheMonitor.getContentPane();
            c.add(mainPanel);

            cacheMonitor.pack();
            cacheMonitor.setVisible(true);
        }
View Full Code Here

     *
     * @param      frames
     *             The media to display
     */
    public ShowMultiImage(MultiImageFrame[] frames) {
        Container c = getContentPane();
        MultiImageRenderer m =
            new MultiImageRenderer(frames);
        c.add(m, BorderLayout.CENTER);
        pack();
        setVisible(true);
        m.start();
    }
View Full Code Here

  }
 
  private Frame getParentFrame()
  {
    // TODO: there must be a better way in swing to do this...
    Container c = getParent();
    while (c != null)
    {
      if (c instanceof Frame)
        return (Frame) c;
     
      c = c.getParent();
    }
    throw new RuntimeException("No parent frame");
  }
View Full Code Here

//    if (icon != null)
//    {
//      setIconImage(icon.getImage());
//    }

    final Container contentPane = getContentPane();
    contentPane.setLayout(new BorderLayout());

    // Label containing the location of the plugins at top of dialog.
    final JLabel pluginLoc = new JLabel(s_stringMgr.getString("PluginSummaryDialog.pluginloc",
          new ApplicationFiles().getPluginsDirectory().getAbsolutePath()));
    pluginLoc.setBorder(BorderFactory.createEmptyBorder(1, 4, 1, 4));

    contentPane.add(pluginLoc, BorderLayout.NORTH);

    // Table of loaded plugins in centre of dialog.
    final IPluginManager pmgr = _app.getPluginManager();
    final PluginInfo[] pluginInfo = pmgr.getPluginInformation();
    final PluginStatus[] pluginStatus = pmgr.getPluginStatuses();
    _pluginPnl = new PluginSummaryTable(pluginInfo, pluginStatus);
    contentPane.add(new JScrollPane(_pluginPnl), BorderLayout.CENTER);

    final JPanel btnsPnl = new JPanel();
    final JButton okBtn = new JButton(s_stringMgr.getString("PluginSummaryDialog.ok"));
    okBtn.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent evt)
      {
        saveSettings();
        dispose();
      }
    });
    btnsPnl.add(okBtn);
        final JButton unloadButton = new JButton(i18n.UNLOAD_LABEL);
        unloadButton.addActionListener(new ActionListener() {
            public void actionPerformed(ActionEvent evt) {
                int[] rows = _pluginPnl.getSelectedRows();
                if (rows.length == 0) {
                    // no rows selected.
                    return;
                }
                for (int row : rows) {
                    // column 1 is internal name
                    String internalName =
                        (String)_pluginPnl.getModel().getValueAt(row, 1);
                    _app.getPluginManager().unloadPlugin(internalName);
                    // column 3 is loaded status
                    _pluginPnl.setValueAt("false", row, 3);
                }
                _pluginPnl.repaint();
            }
        });
        btnsPnl.add(unloadButton);
    final JButton closeBtn = new JButton(s_stringMgr.getString("PluginSummaryDialog.close"));
    closeBtn.addActionListener(new ActionListener()
    {
      public void actionPerformed(ActionEvent evt)
      {
        dispose();
      }
    });
    btnsPnl.add(closeBtn);
    contentPane.add(btnsPnl, BorderLayout.SOUTH);


      AbstractAction closeAction = new AbstractAction()
      {
        private static final long serialVersionUID = 1L;
View Full Code Here

  
   private void createGUI(final List<ArtifactStatus> artifactStatus,
                          final UpdateController updateController) {
      setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);

      final Container contentPane = getContentPane();
      contentPane.setLayout(new BorderLayout());

      _installedVersionLabel = new JLabel();
      _installedVersionLabel.setBorder(BorderFactory.createEmptyBorder(1, 4, 1, 4));
     
      _availableVersionLabel = new JLabel();
      _availableVersionLabel.setBorder(BorderFactory.createEmptyBorder(1, 4, 1, 4));
     
      JPanel labelPanel = new JPanel();
      labelPanel.add(_installedVersionLabel);
      labelPanel.add(_availableVersionLabel);
      // Label panel containing the versions for the update at top of dialog.
      contentPane.add(labelPanel, BorderLayout.NORTH);

      UpdateSummaryTableModel model = new UpdateSummaryTableModel(artifactStatus);
      _updateSummaryTable = new UpdateSummaryTable(artifactStatus, model);
      contentPane.add(new JScrollPane(_updateSummaryTable), BorderLayout.CENTER);

      final JPanel btnsPnl = new JPanel();
      final JButton okBtn = new JButton(i18n.APPLY_LABEL);
      okBtn.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent evt) {
            List<ArtifactStatus> changes =
               _updateSummaryTable.getUserRequestedChanges();
            updateController.applyChanges(changes, _updateSummaryTable.getReleaseVersionWillChange());
         }
      });
      btnsPnl.add(okBtn);

      final JButton closeBtn = new JButton(i18n.CLOSE_LABEL);
      closeBtn.addActionListener(new ActionListener() {
         public void actionPerformed(ActionEvent evt) {
            dispose();
         }
      });
      btnsPnl.add(closeBtn);
      contentPane.add(btnsPnl, BorderLayout.SOUTH);

      AbstractAction closeAction = new AbstractAction() {
         private static final long serialVersionUID = 1L;

         public void actionPerformed(ActionEvent actionEvent) {
View Full Code Here

      }
  });
        if(c.getParent() != null) new java.awt.dnd.DropTarget(c, dropListener);
        if(recursive && (c instanceof Container)) {
            // Get the container
            Container cont = (Container) c;
            // Get it's components
            Component[] comps = cont.getComponents();
            // Set it's components as listeners also
            for(int i = 0; i < comps.length; i++)
                makeDropTarget(out, comps[i], recursive);
        }
    }
View Full Code Here

    // i18n[rowDataInputFrame.propName=Input New Row Data]
    super(parent, s_stringMgr.getString("rowDataInputFrame.propName"), false);

    // get the ConentPane into a variable for convenience
    Container pane = getContentPane();

    // save data passed in to us 
    _caller = caller;

    // set layout
    pane.setLayout(new BorderLayout());

    // create the JTable for input and put in the top of window
    table = new RowDataJTable(colDefs, initialValues);
    // tell scrollpane to use table size with the height adjusted to leave
    // room for the scrollbar at the bottom if needed
    Dimension tableDim = table.getPreferredSize();
    tableDim.setSize(tableDim.getWidth(), tableDim.getHeight() + 15);
    table.setPreferredScrollableViewportSize(tableDim);
    JScrollPane scrollPane = new JScrollPane(table);

    // add row headers to help user understand what the second row is
    JPanel rowHeaderPanel = new JPanel();
    rowHeaderPanel.setLayout(new BorderLayout());
    // i18n[rowDataInputFrame.data=Data]
    JTextArea r1 = new JTextArea(s_stringMgr.getString("rowDataInputFrame.data"), 1, 10);
    r1.setBackground(Color.lightGray);
    r1.setBorder(BorderFactory.createLineBorder(Color.black));
    r1.setEditable(false);
    rowHeaderPanel.add(r1, BorderLayout.NORTH);
    // i18n[rowDataInputFrame.colDescription=\nColumn\nDescription\n]
    JTextArea r2 = new JTextArea(s_stringMgr.getString("rowDataInputFrame.colDescription"), 4, 10);
    r2.setBackground(Color.lightGray);
    r2.setBorder(BorderFactory.createLineBorder(Color.black));
    r2.setEditable(false);
    rowHeaderPanel.add(r2, BorderLayout.CENTER);
    scrollPane.setRowHeaderView(rowHeaderPanel);

    pane.add(scrollPane, BorderLayout.NORTH);

    // create the buttons for input done and cancel
    JPanel buttonPanel = new JPanel();


    // i18n[rowDataInputFrame.insert=Insert]
    JButton insertButton = new JButton(s_stringMgr.getString("rowDataInputFrame.insert"));
    buttonPanel.add(insertButton);
    insertButton.setActionCommand("insert");
    insertButton.addActionListener(this);

    // i18n[rowDataInputFrame.cancel=Cancel]
    JButton cancelButton = new JButton(s_stringMgr.getString("rowDataInputFrame.cancel"));
    buttonPanel.add(cancelButton);
    cancelButton.setActionCommand("cancel");
    cancelButton.addActionListener(this);

    pane.add(buttonPanel, BorderLayout.SOUTH);

    // this frame should really go away when done
    setDefaultCloseOperation(WindowConstants.DISPOSE_ON_CLOSE);

    // display the frame
View Full Code Here

    }
  }
 
  private void setToolTipText(JComponent source, AWTEvent event) {
   
    Container parent = source.getParent();
    String sourceName = source.getName();
    String sourceClassName = source.getClass().toString();
    String parentClassName = parent == null ? null : parent.getClass().toString();
   
    StringBuilder toolTipText = new StringBuilder(getEventMessagePrefix(event));
   
    if (source instanceof AbstractButton) {
      toolTipText.append("Button with parentClass=");
View Full Code Here

    source.setToolTipText(toolTipText.toString());
  }

  private void printDebugInfo(JComponent source, AWTEvent event)
  {
    Container parent = source.getParent();
    String sourceName = source.getName();
    String sourceClassName = source.getClass().toString();     
    String parentName = parent == null ? null : parent.getName();
    String parentClassName = parent == null ? null : parent.getClass().toString();
   
    StringBuilder msg = new StringBuilder(getEventMessagePrefix(event));
    msg.append("\n");
    msg.append("\t sourceName:").append(sourceName).append("\n");
    msg.append("\t sourceClassName:").append(sourceClassName).append("\n");
View Full Code Here

TOP

Related Classes of java.awt.Container$WakingRunnable

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.