Package javax.swing

Examples of javax.swing.JComponent$AncestorComponentNotifier


    if (qtcMovie == null)
      return null;
    // by putting it in a panel, we prevent it from scaling if put into a different sized container.
    final JPanel result = new JPanel();

    final JComponent jComponent = qtcMovie.asJComponent();
    result.add(jComponent);
    result.setPreferredSize(jComponent.getPreferredSize());
   
    return result;

  }
View Full Code Here


        buttonhelp.addActionListener( this );

        c.fill = GridBagConstraints.NONE;
        c.gridwidth = GridBagConstraints.REMAINDER;

        JComponent desc;
        if ( description instanceof String )
        {
            desc = new JLabel( ( String )description );
        }
        else if ( description instanceof JComponent )
View Full Code Here

  public void eventDispatched(AWTEvent event)
  {
    Object o = event.getSource();
    if (o instanceof JComponent && o != null)
    {
      JComponent source = (JComponent) o;
      switch (event.getID())
      {
      case MouseEvent.MOUSE_DRAGGED:
        printDebugInfo(source, event);
        break;
View Full Code Here

               
                layeredPane.addComponentListener(new ComponentAdapter() {

                    @Override
                    public void componentResized(ComponentEvent e) {
                        JComponent c = (JComponent) e.getComponent();
                        Rectangle r = c.getBounds();
                        full.setBounds(r);
                        pip.setBounds(r);
                        controls.setBounds(r);
                        c.revalidate();
                    }
                   
                });
                for (int i = 1; i < files.length; ++i) {
                    String uri = files[i];                   
View Full Code Here

    JMenuBar menuBar = new JMenuBar();
    setJMenuBar(menuBar);
   
    fileMenu = new JMenu();
    menuBar.add(fileMenu);
    JComponent item = Builder.createMenuItem(sendAction);
    sendActionShortcut.setMenuItem((JMenuItem)item);
    fileMenu.add(item);
    fileMenu.add(Builder.createMenuItem(pollAction));
    fileMenu.addSeparator();
    item = Builder.createMenuItem(updateStatusAction);
View Full Code Here

                ta = new FileListEditor(frame, bPanel.metaData(), fields[i], null, parent);
            else
                ta = new FieldTextArea(fields[i], null);
            //ta.addUndoableEditListener(bPanel.undoListener);
           
            JComponent ex = parent.getExtra(fields[i], ta);

            // Add autocompleter listener, if required for this field:
            AbstractAutoCompleter autoComp = bPanel.getAutoCompleter(fields[i]);
            AutoCompleteListener acl = null;
            if (autoComp != null) {
View Full Code Here

        GeometryDirectLayer geometryLayer = (GeometryDirectLayer) layer;
        builder.addVectorLayer(null, geometryLayer.getTitle(), geometryLayer.getStyle().featureTypeStyles()
            .get(0).rules().get(0), font);
      }
    }
    JComponent c = builder.buildComponent();
    BufferedImage image = new BufferedImage(c.getWidth(), c.getHeight(), BufferedImage.TYPE_4BYTE_ABGR);
    Graphics2D graphics = image.createGraphics();
    RenderingHints renderingHints = new Hints();
    renderingHints.put(RenderingHints.KEY_ANTIALIASING, RenderingHints.VALUE_ANTIALIAS_ON);
    graphics.setRenderingHints(renderingHints);
    c.print(graphics);
    return image;
  }
View Full Code Here

    menubar.addMenuItem("Feedback...",new ActionListener() {
      public void actionPerformed(ActionEvent actionEvent) {
        JPanel feedback = new JPanel();
        feedback.setLayout(new BoxLayout(feedback, BoxLayout.Y_AXIS));
        JComponent tmp = new JLabel("Please report bugs at ");
        tmp.setAlignmentX((float) 0.0);
        feedback.add(tmp);
        final String bugsURL = "http://sourceforge.net/tracker/?group_id=84593&atid=573298";
        tmp = new JTextField(bugsURL);
        // tmp.setAlignmentX((float) 1.0);
        feedback.add(tmp);
        JButton yesB = new JButton("Report Bug");
        yesB.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent arg0) {
            displayURL(bugsURL);
          }
        });
        feedback.add(yesB);

        tmp = new JLabel("Please request features at ");
        tmp.setAlignmentX((float) 0.0);
        feedback.add(tmp);
        final String featureURL = "https://sourceforge.net/tracker/?group_id=84593&atid=573301";
        tmp = new JTextField(featureURL);
        // tmp.setAlignmentX((float) 1.0);
        feedback.add(tmp);
        yesB = new JButton("Request Feature");
        yesB.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent arg0) {
            displayURL(featureURL);
          }
        });
        feedback.add(yesB);

        tmp = new JLabel("For support, send email to ");
        tmp.setAlignmentX((float) 0.0);
        feedback.add(tmp);
        final String supportURL = "jtreeview-users@lists.sourceforge.net";
        tmp = new JTextField(supportURL);
        // tmp.setAlignmentX((float) 1.0);
        feedback.add(tmp);
        yesB = new JButton("Email Support");
        yesB.addActionListener(new ActionListener() {
          public void actionPerformed(ActionEvent arg0) {
            displayURL("mailto:"+supportURL);
          }
        });
        feedback.add(yesB);

        tmp = new JLabel("You may also search the list archives at ");
        tmp.setAlignmentX((float) 0.0);
        feedback.add(tmp);
        final String archiveURL = "http://sourceforge.net/mailarchive/forum.php?forum_id=36027";
        tmp = new JTextField(archiveURL);
        // tmp.setAlignmentX((float) 1.0);
        feedback.add(tmp);
View Full Code Here

    public Component getComponent(Action[] choiceChangeActions,
            GPOptionGroup[] choiceOptions, int selectedGroupIndex) {
        JComponent[] choiceComponents = new JComponent[choiceOptions.length];
        for (int i = 0; i < choiceChangeActions.length; i++) {
            GPOptionGroup nextOptions = choiceOptions[i];
            JComponent nextOptionComponent = nextOptions == null ? new JPanel()
                    : myOptionPageBuilder
                            .buildPlanePage(new GPOptionGroup[] { nextOptions });
            choiceComponents[i] = nextOptionComponent;
        }
        return getComponent(choiceChangeActions, choiceComponents, selectedGroupIndex);
View Full Code Here

            nextButton.setBorder(BorderFactory.createEmptyBorder(0, 0, 5, 0));
            JPanel nextExporterPanel = new JPanel(new BorderLayout());
            nextExporterPanel.add(nextButton, BorderLayout.NORTH);
            myButtons[i] = nextButton;
            myExporterToggles.add(nextButton);
            JComponent nextOptionComponent = choiceComponents[i];
            myOptionComponents[i] = nextOptionComponent;
            nextOptionComponent.setBorder(BorderFactory.createEmptyBorder(
                    0, 30, 20, 0));
            nextExporterPanel.add(nextOptionComponent, BorderLayout.CENTER);
            setEnabledTree(nextOptionComponent, false);
            result.add(nextExporterPanel);
//            if (i == 0) {
View Full Code Here

TOP

Related Classes of javax.swing.JComponent$AncestorComponentNotifier

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.